mirror of
https://github.com/GuerillaStudio/now-playing
synced 2024-12-21 08:21:56 +00:00
index: not lazyload the first 3 images (first line on desktop)
This commit is contained in:
parent
b605c7db94
commit
4e9e51e48d
1 changed files with 4 additions and 1 deletions
|
@ -31,7 +31,7 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="grid grid-catalog">
|
<div class="grid grid-catalog">
|
||||||
{{ range sort $paginator.Pages "Date" "desc" }}
|
{{ range $albumIndex, $album := sort $paginator.Pages "Date" "desc" }}
|
||||||
{{ $original := resources.Get .Params.cover }}
|
{{ $original := resources.Get .Params.cover }}
|
||||||
{{ $originalPermalink := $original.Permalink }}
|
{{ $originalPermalink := $original.Permalink }}
|
||||||
{{ $cover := $original.Resize "x320 webp" }}
|
{{ $cover := $original.Resize "x320 webp" }}
|
||||||
|
@ -48,7 +48,10 @@
|
||||||
style="background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});"
|
style="background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});"
|
||||||
src="{{ $cover.Permalink }}"
|
src="{{ $cover.Permalink }}"
|
||||||
srcset="{{ $cover.Permalink }} 1x, {{ $cover2x.Permalink }} 2x"
|
srcset="{{ $cover.Permalink }} 1x, {{ $cover2x.Permalink }} 2x"
|
||||||
|
{{ if ( gt $albumIndex 3) }}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
|
decoding="async"
|
||||||
|
{{ end }}
|
||||||
alt="{{ .Title }} album's cover"
|
alt="{{ .Title }} album's cover"
|
||||||
title="{{ .Title }} album's cover"
|
title="{{ .Title }} album's cover"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue