From d6ac0fc244cc0666bae99833c7e5e835308b9eb9 Mon Sep 17 00:00:00 2001 From: mms Date: Fri, 28 Jun 2024 14:57:08 +0200 Subject: chore: lazy load content images --- layouts/partials/blog/cross-site-post.html | 21 +++++++++++---------- layouts/partials/button-15.html | 3 ++- layouts/partials/button-31.html | 3 ++- layouts/shortcodes/img-c.html | 3 ++- layouts/shortcodes/img-center.html | 3 ++- layouts/shortcodes/img-pull-right.html | 3 ++- layouts/shortcodes/img-r.html | 3 ++- layouts/shortcodes/imgproc.html | 2 +- layouts/shortcodes/youtube.html | 3 ++- layouts/shortcodes/yt.html | 3 ++- 10 files changed, 28 insertions(+), 19 deletions(-) (limited to 'layouts') diff --git a/layouts/partials/blog/cross-site-post.html b/layouts/partials/blog/cross-site-post.html index 3a13af8..2a9f77b 100644 --- a/layouts/partials/blog/cross-site-post.html +++ b/layouts/partials/blog/cross-site-post.html @@ -16,15 +16,16 @@ {{- $img2x := $img.Resize "64x webp" }}
Arrow + alt="Arrow" + loading="lazy" + src="{{ $img1x.Permalink }}" + srcset=" + {{ $img1x.Permalink }} 1x, + {{ $img2x.Permalink }} 2x + " + width="{{ $img1x.Width }}" + height="{{ $img1x.Height }}" + >
+ diff --git a/layouts/partials/button-15.html b/layouts/partials/button-15.html index b715d2a..a155f05 100644 --- a/layouts/partials/button-15.html +++ b/layouts/partials/button-15.html @@ -5,7 +5,8 @@ {{- $img2x := $img.Resize "160x30 webp q90"}} {{- if $.href }} {{ end }} - {{ $.alt }} {{ end }} - {{ $.alt }} - {{ $caption }} - {{ $caption }} - {{ $caption }} + {{ $caption }}
{{ $caption }} diff --git a/layouts/shortcodes/youtube.html b/layouts/shortcodes/youtube.html index b59cac1..6a2409b 100644 --- a/layouts/shortcodes/youtube.html +++ b/layouts/shortcodes/youtube.html @@ -7,7 +7,8 @@
- -