diff options
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/cover.html | 9 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 |
2 files changed, 2 insertions, 9 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 }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9a840e3..9e11322 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -366,7 +366,7 @@ If not using Hugo server, remove every "console.log()" --> -{{ with resources.Get "js/prepone.js" | resources.ExecuteAsTemplate .Page . | minify }} +{{ with resources.Get "js/prepone.js" | resources.ExecuteAsTemplate .Page . }} <script> {{ if $.Site.IsServer }} |