diff options
Diffstat (limited to 'layouts/partials/cover.html')
-rw-r--r-- | layouts/partials/cover.html | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html index 308374c..4e741b6 100644 --- a/layouts/partials/cover.html +++ b/layouts/partials/cover.html @@ -12,16 +12,9 @@ {{ end }} {{ with $.Page.Resources.GetMatch $file }} - - <!-- - HACK - Reduce reflow by generating a placeholder with similar size - --> {{ $mediumRes := (index $imageProc.mediumRes 0) }} - {{ $encodedPlaceholder := (printf "data:image/png;base64,%s" (((resources.Get "img/pixel.gif").Resize (printf "%vx%v %s" (.Resize $mediumRes).Width (.Resize $mediumRes).Height "png")).Content | base64Encode)) | safeURL }} - {{ $outputSet := slice }} {{ $inputFile := . }} @@ -33,7 +26,7 @@ class="cover" loading="lazy" srcset='{{ delimit $outputSet ", " }}' - src="{{ $encodedPlaceholder }}" + src="{{ (.Resize $mediumRes).RelPermalink }}" width="{{ (.Resize $mediumRes).Width }}" height="{{ (.Resize $mediumRes).Height }}" {{ with $altText }}alt="{{ . }}"{{ end }} |