diff options
| author | 2020-05-10 20:12:13 +0000 | |
|---|---|---|
| committer | 2020-05-10 22:12:13 +0200 | |
| commit | bd8f6f19b60f478c8b1ac1f480f3894829ee9ba9 (patch) | |
| tree | 6576e67ccc1e374f94f4286ae8922ce549aa407d | |
| parent | aea38065901408c8b6d0bb0b619f21fd81fc9347 (diff) | |
add lazy loading on favicon (#2962)
| -rw-r--r-- | app/layout/aside_feed.phtml | 2 | ||||
| -rw-r--r-- | app/views/helpers/index/normal/entry_header.phtml | 2 | ||||
| -rw-r--r-- | app/views/index/global.phtml | 2 | ||||
| -rw-r--r-- | app/views/index/reader.phtml | 2 | ||||
| -rw-r--r-- | app/views/subscription/index.phtml | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 499844a2b..191413184 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -94,7 +94,7 @@ <a class="dropdown-toggle" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a> <?php /* feed_config_template */ ?> </div> - <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /><?php endif; ?> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'f_' . $feed->id()) ?>"><?= $feed->name() ?></a> </li> <?php } ?> diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 3b8aafbb2..1bca764d4 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -28,7 +28,7 @@ } } ?><li class="item website"><a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>"> - <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" /><?php endif; ?> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> <span><?= $this->feed->name() ?></span></a></li> <li class="item title" dir="auto"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>"><?= $this->entry->title() ?><?php if ($topline_display_authors): diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index e173b1b59..af16a0bfa 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -38,7 +38,7 @@ $url_base['params']['get'] = 'f_' . $feed->id(); ?> <li id="f_<?= $feed->id() ?>" class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> - <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /><?php endif; ?> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $feed->name() ?></a> </li> <?php } ?> diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index c982c1132..289c62662 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -48,7 +48,7 @@ $content_width = FreshRSS_Context::$user_conf->content_width; <?= _i($item->isFavorite() ? 'starred' : 'non-starred') ?> </a> <a class="website" href="<?= _url('index', 'reader', 'get', 'f_' . $feed->id()) ?>"> - <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /><?php endif; ?> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> <span><?= $feed->name() ?></span> </a> <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?= $item->link() ?>"><?= $item->title() ?></a></h1> diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml index 9e0aaa8c6..a92359151 100644 --- a/app/views/subscription/index.phtml +++ b/app/views/subscription/index.phtml @@ -98,7 +98,7 @@ data-feed-id="<?= $feed->id() ?>" dropzone="move"> <a class="configure open-slider" href="<?= _url('subscription', 'feed', 'id', $feed->id()) ?>"><?= _i('configure') ?></a> - <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /><?php endif; ?> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> <?= $feed->name() ?> </li> <?php } |
