mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +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}
|
||||||
|
|
||||||
{block preview}
|
{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}
|
||||||
|
|
||||||
{block name}
|
{block name}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
{block content}
|
{block content}
|
||||||
<div class="gift_grid">
|
<div class="gift_grid">
|
||||||
<div n:foreach="$gifts as $gift" n:class="gift_sel, !$gift->canUse($thisUser) ? disabled" data-gift="{$gift->getId()}">
|
<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">
|
<strong class="gift_price">
|
||||||
{if $gift->isFree()}
|
{if $gift->isFree()}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block preview}
|
{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}
|
||||||
|
|
||||||
{block name}
|
{block name}
|
||||||
|
|
|
@ -289,7 +289,7 @@
|
||||||
|
|
||||||
<img
|
<img
|
||||||
src="{is_null($cover)?'/assets/packages/static/openvk/img/camera_200.png':$cover->getURL()}"
|
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>
|
||||||
<div>
|
<div>
|
||||||
<b><a href="/album{$album->getPrettyId()}">{$album->getName()}</a></b><br>
|
<b><a href="/album{$album->getPrettyId()}">{$album->getName()}</a></b><br>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
<div class="crp-entry--image">
|
<div class="crp-entry--image">
|
||||||
<img src="{$recipient->getAvatarURL('miniscule')}"
|
<img src="{$recipient->getAvatarURL('miniscule')}"
|
||||||
alt="Фотография пользователя" />
|
alt="Фотография пользователя" loading=lazy />
|
||||||
</div>
|
</div>
|
||||||
<div class="crp-entry--info">
|
<div class="crp-entry--info">
|
||||||
<a href="{$recipient->getURL()}">{$recipient->getCanonicalName()}</a><br/>
|
<a href="{$recipient->getURL()}">{$recipient->getCanonicalName()}</a><br/>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="/photo{$photo->getPrettyId()}?from=album{$album->getId()}">
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
{var $preview = is_null($cover) ? "/assets/packages/static/openvk/img/camera_200.png" : $cover->getURLBySizeId("normal")}
|
{var $preview = is_null($cover) ? "/assets/packages/static/openvk/img/camera_200.png" : $cover->getURLBySizeId("normal")}
|
||||||
|
|
||||||
<a href="/album{$x->getPrettyId()}">
|
<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>
|
</a>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block preview}
|
{block preview}
|
||||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография пользователя" />
|
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография пользователя" loading=lazy />
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name}
|
{block name}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block preview}
|
{block preview}
|
||||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="{_photo}" />
|
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="{_photo}" loading=lazy />
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name}
|
{block name}
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block preview}
|
{block preview}
|
||||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография пользователя" />
|
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография пользователя" loading=lazy />
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name}
|
{block name}
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block preview}
|
{block preview}
|
||||||
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография группы" />
|
<img src="{$x->getAvatarUrl('miniscule')}" width="75" alt="Фотография группы" loading=lazy />
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name}{/block}
|
{block name}{/block}
|
||||||
|
|
|
@ -304,7 +304,7 @@
|
||||||
|
|
||||||
<img
|
<img
|
||||||
src="{is_null($cover)?'/assets/packages/static/openvk/img/camera_200.png':$cover->getURLBySizeId('small')}"
|
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>
|
||||||
<div style="overflow: hidden; overflow-wrap: break-word;">
|
<div style="overflow: hidden; overflow-wrap: break-word;">
|
||||||
<b><a href="/album{$album->getPrettyId()}">{$album->getName()}</a></b><br>
|
<b><a href="/album{$album->getPrettyId()}">{$album->getName()}</a></b><br>
|
||||||
|
@ -656,7 +656,7 @@
|
||||||
<img style="width: 70px; max-height: 70px;"
|
<img style="width: 70px; max-height: 70px;"
|
||||||
src="{$giftDescriptor->gift->getImage(2)}"
|
src="{$giftDescriptor->gift->getImage(2)}"
|
||||||
alt="{$hideInfo ? tr('gift') : ($giftDescriptor->caption ?? tr('gift'))}"
|
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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{if !$attachment->isDeleted()}
|
{if !$attachment->isDeleted()}
|
||||||
{var $link = "/photo" . ($attachment->isAnonymous() ? ("s/" . base_convert((string) $attachment->getId(), 10, 32)) : $attachment->getPrettyId())}
|
{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})">
|
<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>
|
</a>
|
||||||
{else}
|
{else}
|
||||||
<a href="javascript:alert('{_attach_no_longer_available}');">
|
<a href="javascript:alert('{_attach_no_longer_available}');">
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td width="54" valign="top">
|
<td width="54" valign="top">
|
||||||
<a href="{$author->getURL()}">
|
<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>
|
<span n:if="!$post->isPostedOnBehalfOfGroup() && !($compact ?? false) && $author->isOnline()" class="post-online">{_online}</span>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in a new issue