aboutsummaryrefslogtreecommitdiffhomepage
path: root/template/html
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-09-10 21:12:38 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-09-10 21:22:19 -0700
commit8d8f78241d303381abf6879cc007ca9cbc2a12e2 (patch)
tree9c6b8028bd0ff04e2fc6b26992c6de61336b10be /template/html
parent937492f6f554d51d8cae62829b6229071cac994e (diff)
Add native lazy loading for images and iframes
This feature is available only in Chrome >= 76 for now. See https://web.dev/native-lazy-loading
Diffstat (limited to 'template/html')
-rw-r--r--template/html/bookmark_entries.html2
-rw-r--r--template/html/category_entries.html2
-rw-r--r--template/html/entry.html4
-rw-r--r--template/html/feed_entries.html2
-rw-r--r--template/html/feeds.html2
-rw-r--r--template/html/history_entries.html2
-rw-r--r--template/html/search_entries.html2
-rw-r--r--template/html/unread_entries.html2
8 files changed, 9 insertions, 9 deletions
diff --git a/template/html/bookmark_entries.html b/template/html/bookmark_entries.html
index f2cdcf1..3cb87c0 100644
--- a/template/html/bookmark_entries.html
+++ b/template/html/bookmark_entries.html
@@ -14,7 +14,7 @@
<div class="item-header">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
- <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
+ <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
{{ end }}
<a href="{{ route "starredEntry" "entryID" .ID }}">{{ .Title }}</a>
</span>
diff --git a/template/html/category_entries.html b/template/html/category_entries.html
index a4076b9..48bf205 100644
--- a/template/html/category_entries.html
+++ b/template/html/category_entries.html
@@ -36,7 +36,7 @@
<div class="item-header">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
- <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
+ <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
{{ end }}
<a href="{{ route "categoryEntry" "categoryID" .Feed.Category.ID "entryID" .ID }}">{{ .Title }}</a>
</span>
diff --git a/template/html/entry.html b/template/html/entry.html
index 7e57390..b10cea6 100644
--- a/template/html/entry.html
+++ b/template/html/entry.html
@@ -57,7 +57,7 @@
<div class="entry-meta">
<span class="entry-website">
{{ if ne .entry.Feed.Icon.IconID 0 }}
- <img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" alt="{{ .entry.Feed.Title }}">
+ <img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .entry.Feed.Title }}">
{{ end }}
<a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}">{{ .entry.Feed.Title }}</a>
</span>
@@ -105,7 +105,7 @@
</div>
{{ else if hasPrefix .MimeType "image/" }}
<div class="enclosure-image">
- <img src="{{ proxyURL .URL }}" title="{{ .URL }} ({{ .MimeType }})" alt="{{ .URL }} ({{ .MimeType }})">
+ <img src="{{ proxyURL .URL }}" title="{{ .URL }} ({{ .MimeType }})" loading="lazy" alt="{{ .URL }} ({{ .MimeType }})">
</div>
{{ end }}
diff --git a/template/html/feed_entries.html b/template/html/feed_entries.html
index c162faf..13edd55 100644
--- a/template/html/feed_entries.html
+++ b/template/html/feed_entries.html
@@ -64,7 +64,7 @@
<div class="item-header">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
- <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
+ <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
{{ end }}
<a href="{{ route "feedEntry" "feedID" .Feed.ID "entryID" .ID }}">{{ .Title }}</a>
</span>
diff --git a/template/html/feeds.html b/template/html/feeds.html
index 0bad59a..e4a3231 100644
--- a/template/html/feeds.html
+++ b/template/html/feeds.html
@@ -28,7 +28,7 @@
<div class="item-header">
<span class="item-title">
{{ if .Icon }}
- <img src="{{ route "icon" "iconID" .Icon.IconID }}" width="16" height="16" alt="{{ .Title }}">
+ <img src="{{ route "icon" "iconID" .Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Title }}">
{{ end }}
{{ if .Disabled }} 🚫 {{ end }}
<a href="{{ route "feedEntries" "feedID" .ID }}">{{ .Title }}</a>
diff --git a/template/html/history_entries.html b/template/html/history_entries.html
index 109e1a2..4b1d5a9 100644
--- a/template/html/history_entries.html
+++ b/template/html/history_entries.html
@@ -27,7 +27,7 @@
<div class="item-header">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
- <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
+ <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
{{ end }}
<a href="{{ route "readEntry" "entryID" .ID }}">{{ .Title }}</a>
</span>
diff --git a/template/html/search_entries.html b/template/html/search_entries.html
index f09c27d..707511e 100644
--- a/template/html/search_entries.html
+++ b/template/html/search_entries.html
@@ -14,7 +14,7 @@
<div class="item-header">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
- <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
+ <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
{{ end }}
<a href="{{ route "searchEntry" "entryID" .ID }}?q={{ $.searchQuery }}">{{ .Title }}</a>
</span>
diff --git a/template/html/unread_entries.html b/template/html/unread_entries.html
index 3ac37b6..b1c73b3 100644
--- a/template/html/unread_entries.html
+++ b/template/html/unread_entries.html
@@ -36,7 +36,7 @@
<div class="item-header">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}
- <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
+ <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
{{ end }}
<a href="{{ route "unreadEntry" "entryID" .ID }}">{{ .Title }}</a>
</span>