mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
perf(feed): lazy load
This commit is contained in:
parent
d60df69825
commit
64827402ee
14 changed files with 38 additions and 38 deletions
|
@ -17,7 +17,7 @@
|
|||
{/block}
|
||||
|
||||
{block preview}
|
||||
<img src="{$x->getThumbnailURL()}" width="75" alt="{$x->getName(tr('__lang'))}" />
|
||||
<img src="{$x->getThumbnailURL()}" width="75" alt="{$x->getName(tr('__lang'))}" loading=lazy />
|
||||
{/block}
|
||||
|
||||
{block name}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{block content}
|
||||
<div class="gift_grid">
|
||||
<div n:foreach="$gifts as $gift" n:class="gift_sel, !$gift->canUse($thisUser) ? disabled" data-gift="{$gift->getId()}">
|
||||
<img class="gift_pic" src="{$gift->getImage(2)}" alt="{_gift}" />
|
||||
<img class="gift_pic" src="{$gift->getImage(2)}" alt="{_gift}" loading=lazy />
|
||||
|
||||
<strong class="gift_price">
|
||||
{if $gift->isFree()}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
{/block}
|
||||
|
||||
{block preview}
|
||||
<img src="{$x->gift->getImage(2)}" width="75" alt="{_gift}" />
|
||||
<img src="{$x->gift->getImage(2)}" width="75" alt="{_gift}" loading=lazy />
|
||||
{/block}
|
||||
|
||||
{block name}
|
||||
|
|
|
@ -289,7 +289,7 @@
|
|||
|
||||
<img
|
||||
src="{is_null($cover)?'/assets/packages/static/openvk/img/camera_200.png':$cover->getURL()}"
|
||||
style="max-width: 80px; max-height: 54pt;" />
|
||||
style="max-width: 80px; max-height: 54pt;" loading=lazy />
|
||||
</div>
|
||||
<div>
|
||||
<b><a href="/album{$album->getPrettyId()}">{$album->getName()}</a></b><br>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<div class="crp-entry--image">
|
||||
<img src="{$recipient->getAvatarURL('miniscule')}"
|
||||
alt="Фотография пользователя" />
|
||||
alt="Фотография пользователя" loading=lazy />
|
||||
</div>
|
||||
<div class="crp-entry--info">
|
||||
<a href="{$recipient->getURL()}">{$recipient->getCanonicalName()}</a><br/>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</a>
|
||||
|
||||
<a href="/photo{$photo->getPrettyId()}?from=album{$album->getId()}">
|
||||
<img class="album-photo--image" src="{$photo->getURLBySizeId('tinier')}" alt="{$photo->getDescription()}" />
|
||||
<img class="album-photo--image" src="{$photo->getURLBySizeId('tinier')}" alt="{$photo->getDescription()}" loading=lazy />
|
||||
</a>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
{var $preview = is_null($cover) ? "/assets/packages/static/openvk/img/camera_200.png" : $cover->getURLBySizeId("normal")}
|
||||
|
||||
<a href="/album{$x->getPrettyId()}">
|
||||
<img src="{$preview}" alt="{$x->getName()}" style="height: 130px; width: 170px; object-fit: cover" />
|
||||
<img src="{$preview}" alt="{$x->getName()}" style="height: 130px; width: 170px; object-fit: cover" loading=lazy />
|
||||
</a>
|
||||
{/block}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
{/block}
|
||||
|
||||
{block preview}
|
||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография пользователя" />
|
||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография пользователя" loading=lazy />
|
||||
{/block}
|
||||
|
||||
{block name}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
{/block}
|
||||
|
||||
{block preview}
|
||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="{_photo}" />
|
||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="{_photo}" loading=lazy />
|
||||
{/block}
|
||||
|
||||
{block name}
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
{/block}
|
||||
|
||||
{block preview}
|
||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография пользователя" />
|
||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография пользователя" loading=lazy />
|
||||
{/block}
|
||||
|
||||
{block name}
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
{/block}
|
||||
|
||||
{block preview}
|
||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография группы" />
|
||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография группы" loading=lazy />
|
||||
{/block}
|
||||
|
||||
{block name}{/block}
|
||||
|
|
|
@ -304,7 +304,7 @@
|
|||
|
||||
<img
|
||||
src="{is_null($cover)?'/assets/packages/static/openvk/img/camera_200.png':$cover->getURLBySizeId('small')}"
|
||||
style="max-width: 80px; max-height: 54pt;" />
|
||||
style="max-width: 80px; max-height: 54pt;" loading=lazy />
|
||||
</div>
|
||||
<div style="overflow: hidden; overflow-wrap: break-word;">
|
||||
<b><a href="/album{$album->getPrettyId()}">{$album->getName()}</a></b><br>
|
||||
|
@ -656,7 +656,7 @@
|
|||
<img style="width: 70px; max-height: 70px;"
|
||||
src="{$giftDescriptor->gift->getImage(2)}"
|
||||
alt="{$hideInfo ? tr('gift') : ($giftDescriptor->caption ?? tr('gift'))}"
|
||||
title="{$hideInfo ? tr('gift') : ($giftDescriptor->caption ?? tr('gift'))}" />
|
||||
title="{$hideInfo ? tr('gift') : ($giftDescriptor->caption ?? tr('gift'))}" loading=lazy />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{if !$attachment->isDeleted()}
|
||||
{var $link = "/photo" . ($attachment->isAnonymous() ? ("s/" . base_convert((string) $attachment->getId(), 10, 32)) : $attachment->getPrettyId())}
|
||||
<a href="{$link}" onclick="OpenMiniature(event, {$attachment->getURLBySizeId('normal')}, {$parent->getPrettyId()}, {$attachment->getPrettyId()}, {$parentType})">
|
||||
<img class="media media_makima" src="{$attachment->getURLBySizeId('normal')}" alt="{$attachment->getDescription()}" />
|
||||
<img class="media media_makima" src="{$attachment->getURLBySizeId('normal')}" alt="{$attachment->getDescription()}" loading=lazy />
|
||||
</a>
|
||||
{else}
|
||||
<a href="javascript:alert('{_attach_no_longer_available}');">
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<tr>
|
||||
<td width="54" valign="top">
|
||||
<a href="{$author->getURL()}">
|
||||
<img src="{$author->getAvatarURL('miniscule')}" class="post-avatar" width="50" />
|
||||
<img src="{$author->getAvatarURL('miniscule')}" class="post-avatar" width="50" loading=lazy />
|
||||
<span n:if="!$post->isPostedOnBehalfOfGroup() && !($compact ?? false) && $author->isOnline()" class="post-online">{_online}</span>
|
||||
</a>
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue