1
0
Fork 0

Add support for RTL feed content

This commit is contained in:
Mohamad Safadieh 2020-06-25 00:46:37 -04:00 committed by GitHub
parent f7273e5cdf
commit c70bebb2aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 49 additions and 48 deletions

View file

@ -27,7 +27,7 @@ var templateCommonMap = map[string]string{
<div class="items">
{{ range .feeds }}
<article class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ end }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if .Icon }}
<img src="{{ route "icon" "iconID" .Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Title }}">
@ -44,7 +44,7 @@ var templateCommonMap = map[string]string{
</div>
<div class="item-meta">
<ul class="item-meta-info">
<li>
<li dir="auto">
<a href="{{ .SiteURL | safeURL }}" title="{{ .SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ domain .SiteURL }}</a>
</li>
<li>
@ -78,7 +78,8 @@ var templateCommonMap = map[string]string{
</article>
{{ end }}
</div>
{{ end }}`,
{{ end }}
`,
"feed_menu": `{{ define "feed_menu" }}
<ul>
<li>
@ -506,7 +507,7 @@ SOFTWARE.
var templateCommonMapChecksums = map[string]string{
"entry_pagination": "cdca9cf12586e41e5355190b06d9168f57f77b85924d1e63b13524bc15abcbf6",
"feed_list": "4f0bddcc6596aca9f42d2aace7f676ed26a3c6b33a3793e2376d9446d6abe392",
"feed_list": "30acc9ecc413811e73a1dad120b5d44e29564de3ba794fb07ee886b30addfb19",
"feed_menu": "318d8662dda5ca9dfc75b909c8461e79c86fb5082df1428f67aaf856f19f4b50",
"icons": "3dbe754a98f524a227111191d76b8c6944711b13613cc548ee9e9808fe0bffb4",
"item_meta": "a5b07cc6597e5c8f3ca849ee486acb3f16f062d8a1eaa47d2fb402ae6825b7ef",

View file

@ -11,7 +11,7 @@
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">

View file

@ -16,7 +16,7 @@
<div class="items">
{{ range .categories }}
<article class="item">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
</span>

View file

@ -2,7 +2,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ .category.Title }} ({{ .total }})</h1>
<h1 dir="auto">{{ .category.Title }} ({{ .total }})</h1>
<ul>
{{ if .entries }}
<li>
@ -36,7 +36,7 @@
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">

View file

@ -2,7 +2,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ .category.Title }} &gt; {{ t "page.feeds.title" }} ({{ .total }})</h1>
<h1 dir="auto">{{ .category.Title }} &gt; {{ t "page.feeds.title" }} ({{ .total }})</h1>
<ul>
<li>
<a href="{{ route "categoryEntries" "categoryID" .category.ID }}">{{ t "menu.feed_entries" }}</a>

View file

@ -2,7 +2,7 @@
<div class="items">
{{ range .feeds }}
<article class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ end }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if .Icon }}
<img src="{{ route "icon" "iconID" .Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Title }}">
@ -19,7 +19,7 @@
</div>
<div class="item-meta">
<ul class="item-meta-info">
<li>
<li dir="auto">
<a href="{{ .SiteURL | safeURL }}" title="{{ .SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ domain .SiteURL }}</a>
</li>
<li>
@ -53,4 +53,4 @@
</article>
{{ end }}
</div>
{{ end }}
{{ end }}

View file

@ -2,7 +2,7 @@
{{ define "content"}}
<section class="page-header">
<h1>{{ .feed.Title }}</h1>
<h1 dir="auto">{{ .feed.Title }}</h1>
<ul>
<li>
<a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a>

View file

@ -3,7 +3,7 @@
{{ define "content"}}
<section class="entry" data-id="{{ .entry.ID }}">
<header class="entry-header">
<h1>
<h1 dir="auto">
<a href="{{ .entry.URL | safeURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .entry.Title }}</a>
</h1>
{{ if .user }}
@ -77,7 +77,7 @@
</ul>
</div>
{{ end }}
<div class="entry-meta">
<div class="entry-meta" dir="auto">
<span class="entry-website">
{{ if and .user (ne .entry.Feed.Icon.IconID 0) }}
<img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .entry.Feed.Title }}">
@ -118,7 +118,7 @@
</div>
{{ end }}
{{ end }}
<article class="entry-content">
<article class="entry-content" dir="auto">
{{ if .user }}
{{ noescape (proxyFilter .entry.Content) }}
{{ else }}

View file

@ -2,7 +2,7 @@
{{ define "content"}}
<section class="page-header">
<h1>
<h1 dir="auto">
<a href="{{ .feed.SiteURL | safeURL }}" title="{{ .feed.SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ .feed.Title }}</a>
({{ .total }})
</h1>
@ -64,7 +64,7 @@
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">

View file

@ -33,7 +33,7 @@
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">

View file

@ -11,7 +11,7 @@
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">

View file

@ -27,7 +27,7 @@
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">

View file

@ -33,7 +33,7 @@
<div class="items hide-read-items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">

View file

@ -180,7 +180,7 @@ var templateViewsMap = map[string]string{
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
@ -216,7 +216,7 @@ var templateViewsMap = map[string]string{
<div class="items">
{{ range .categories }}
<article class="item">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
</span>
@ -262,7 +262,7 @@ var templateViewsMap = map[string]string{
{{ define "content"}}
<section class="page-header">
<h1>{{ .category.Title }} ({{ .total }})</h1>
<h1 dir="auto">{{ .category.Title }} ({{ .total }})</h1>
<ul>
{{ if .entries }}
<li>
@ -296,7 +296,7 @@ var templateViewsMap = map[string]string{
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
@ -333,7 +333,7 @@ var templateViewsMap = map[string]string{
{{ define "content"}}
<section class="page-header">
<h1>{{ .category.Title }} &gt; {{ t "page.feeds.title" }} ({{ .total }})</h1>
<h1 dir="auto">{{ .category.Title }} &gt; {{ t "page.feeds.title" }} ({{ .total }})</h1>
<ul>
<li>
<a href="{{ route "categoryEntries" "categoryID" .category.ID }}">{{ t "menu.feed_entries" }}</a>
@ -521,7 +521,7 @@ var templateViewsMap = map[string]string{
{{ define "content"}}
<section class="page-header">
<h1>{{ .feed.Title }}</h1>
<h1 dir="auto">{{ .feed.Title }}</h1>
<ul>
<li>
<a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a>
@ -659,7 +659,7 @@ var templateViewsMap = map[string]string{
{{ define "content"}}
<section class="entry" data-id="{{ .entry.ID }}">
<header class="entry-header">
<h1>
<h1 dir="auto">
<a href="{{ .entry.URL | safeURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .entry.Title }}</a>
</h1>
{{ if .user }}
@ -733,7 +733,7 @@ var templateViewsMap = map[string]string{
</ul>
</div>
{{ end }}
<div class="entry-meta">
<div class="entry-meta" dir="auto">
<span class="entry-website">
{{ if and .user (ne .entry.Feed.Icon.IconID 0) }}
<img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .entry.Feed.Title }}">
@ -774,7 +774,7 @@ var templateViewsMap = map[string]string{
</div>
{{ end }}
{{ end }}
<article class="entry-content">
<article class="entry-content" dir="auto">
{{ if .user }}
{{ noescape (proxyFilter .entry.Content) }}
{{ else }}
@ -831,7 +831,7 @@ var templateViewsMap = map[string]string{
{{ define "content"}}
<section class="page-header">
<h1>
<h1 dir="auto">
<a href="{{ .feed.SiteURL | safeURL }}" title="{{ .feed.SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ .feed.Title }}</a>
({{ .total }})
</h1>
@ -893,7 +893,7 @@ var templateViewsMap = map[string]string{
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
@ -977,7 +977,7 @@ var templateViewsMap = map[string]string{
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
@ -1212,7 +1212,7 @@ var templateViewsMap = map[string]string{
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
@ -1377,7 +1377,7 @@ var templateViewsMap = map[string]string{
<div class="items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
@ -1455,7 +1455,7 @@ var templateViewsMap = map[string]string{
<div class="items hide-read-items">
{{ range .entries }}
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
@ -1545,28 +1545,28 @@ var templateViewsMapChecksums = map[string]string{
"about": "4035658497363d7af7f79be83190404eb21ec633fe8ec636bdfc219d9fc78cfc",
"add_subscription": "0dbea93b6fc07423fa066122ad960c69616b829533371a2dbadec1e22d4f1ae0",
"api_keys": "27d401b31a72881d5232486ba17eb47edaf5246eaedce81de88698c15ebb2284",
"bookmark_entries": "65588da78665699dd3f287f68325e9777d511f1a57fee4131a5bb6d00bb68df8",
"categories": "21d2efb06d8330ab1fd363449c7144ce7191779bafa33d5c0cec63f2c443ec03",
"category_entries": "dee7b9cd60c6c46f01dd4289940679df31c1fce28ce4aa7249fa459023e1eeb4",
"category_feeds": "02b255603dc58122afbbcce573e88d648cad176b9cd0a7bba7e07f95694de75d",
"bookmark_entries": "892fe6cbf5a3301416dfb76e62935b495ca194275cfe113105a85b40ce7c200f",
"categories": "9dfc3cb7bb91c7750753fe962ee4540dd1843e5f75f9e0a575ee964f6f9923e9",
"category_entries": "8fa0e0b8f85e2572c40dee855b6d636207c3561086b234c93100673774c06746",
"category_feeds": "07154127087f9b127f7290abad6020c35ad9ceb2490b869120b7628bc4413808",
"choose_subscription": "84c9730cadd78e6ee5a6b4c499aab33acddb4324ac01924d33387543eec4d702",
"create_api_key": "5f74d4e92a6684927f5305096378c8be278159a5cd88ce652c7be3280a7d1685",
"create_category": "6b22b5ce51abf4e225e23a79f81be09a7fb90acb265e93a8faf9446dff74018d",
"create_user": "9b73a55233615e461d1f07d99ad1d4d3b54532588ab960097ba3e090c85aaf3a",
"edit_category": "b1c0b38f1b714c5d884edcd61e5b5295a5f1c8b71c469b35391e4dcc97cc6d36",
"edit_feed": "635bb8f7b927f3216ccd35cc6d9edd4b2af96e8677a14766a86fb77fa9fb4e38",
"edit_feed": "ff90b1883e2934e0236d530d8b778affe7665a6b08cdf9ae612c7e56469818ef",
"edit_user": "c692db9de1a084c57b93e95a14b041d39bf489846cbb91fc982a62b72b77062a",
"entry": "d8c30d412d58e14c946ba682166f7c582948e7b0f657d04dcbc3d004267627bb",
"feed_entries": "614357a9369237e54be45b40c516fe70a751bfb4311660746ae229e6be88fdac",
"entry": "c503dcf77de37090b9f05352bb9d99729085eec6e7bc22be94f2b4b244b4e48c",
"feed_entries": "ea5b88e3ad6b166d83b70e021d7b420d025f80decb6e24c79d13f8ce7c910b04",
"feeds": "ec7d3fa96735bd8422ba69ef0927dcccddc1cc51327e0271f0312d3f881c64fd",
"history_entries": "93c0c4cc541eec7f07f5c2634f250ea82ac64024939179276b6f636b72c189bf",
"history_entries": "341f0da8b6c27a8377901aa80bb1d5c923672af32f689d36de14deabce5c737f",
"import": "1b59b3bd55c59fcbc6fbb346b414dcdd26d1b4e0c307e437bb58b3f92ef01ad1",
"integrations": "30329452743b35c668278f519245fd9be05c1726856e0384ba542f7c307f2788",
"login": "79ff2ca488c0a19b37c8fa227a21f73e94472eb357a51a077197c852f7713f11",
"search_entries": "274950d03298c24f3942e209c0faed580a6d57be9cf76a6c236175a7e766ac6a",
"search_entries": "c0786ddc6b17e865007b975eefb97417935cbc601f5917cca1ee0d3f584594bc",
"sessions": "5d5c677bddbd027e0b0c9f7a0dd95b66d9d95b4e130959f31fb955b926c2201c",
"settings": "3ab566c3220c62edc3edc51f2e93c1101b728e9f62f52f23de6bc6322d86aeb6",
"shared_entries": "19caea053664220bb9519df295eb2a17cf5836eaa9104b7ee24c60b88bb524e9",
"unread_entries": "e38f7ffce17dfad3151b08cd33771a2cefe8ca9db42df04fc98bd1d675dd6075",
"shared_entries": "1494d81e46f6af534a73cf6a91f8dfda1932a477bb3a70143513896ac0f0220b",
"unread_entries": "e0080d0cf3583cda51d865422960137c8556c432853657086e43daf6bd5b73be",
"users": "d7ff52efc582bbad10504f4a04fa3adcc12d15890e45dff51cac281e0c446e45",
}