Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Aguiar <rmaguiar@tuta.io>2021-02-25 05:50:31 +0300
committerRaphael Aguiar <rmaguiar@tuta.io>2021-02-25 05:50:31 +0300
commitf8f1e723e149e2ca1adc13d8305571bf91f994ed (patch)
tree7afff24974355a6718fb5cc4ea1da130c18b7800 /layouts/partials/cover.html
parent6b016d23b9f5fa6917908e77920c395e68b7ddca (diff)
Remove image placeholder hack and minor changes
* Remove image placeholder hack (now obsolete) * Fix minor issue related to JS minification on 0.81.0 * Other minor changes
Diffstat (limited to 'layouts/partials/cover.html')
-rw-r--r--layouts/partials/cover.html9
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 }}