aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/author-header.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-06-12 00:29:44 -0400
committertdro <tdro@noreply.example.com>2022-06-12 00:29:44 -0400
commit9ee284498ef70d3b7b29300b9a34a417807185e6 (patch)
treef5f3d364ed1020c65ac59819a136ad3425fee914 /themes/default/layouts/partials/author-header.html
parent448e8d47685657394811e704188abf85687d47a7 (diff)
downloadcanory-9ee284498ef70d3b7b29300b9a34a417807185e6.tar.gz
canory-9ee284498ef70d3b7b29300b9a34a417807185e6.tar.bz2
canory-9ee284498ef70d3b7b29300b9a34a417807185e6.zip
themes/default/layouts/partials/author-header: Resize header only
Don't lazy load.
Diffstat (limited to 'themes/default/layouts/partials/author-header.html')
-rw-r--r--themes/default/layouts/partials/author-header.html7
1 files changed, 3 insertions, 4 deletions
diff --git a/themes/default/layouts/partials/author-header.html b/themes/default/layouts/partials/author-header.html
index 18738c4..0590358 100644
--- a/themes/default/layouts/partials/author-header.html
+++ b/themes/default/layouts/partials/author-header.html
@@ -3,18 +3,17 @@
{{- $image := resources.Get $path -}}
{{- $404origin := print "/images/404.png" -}}
{{- $404image := imageConfig (print "static/" $404origin) -}}
-{{- $dimensions := "600x360" -}}
+{{- $dimensions := "x600" -}}
{{- with $image -}}
{{- $image = .Content | resources.FromString (print "/data/static/images/" (. | urlize)) -}}
- <source srcset="{{- ($image.Fit (print $dimensions " webp")).RelPermalink -}}" type="image/webp" />
+ <source srcset="{{- ($image.Resize (print $dimensions " webp")).RelPermalink -}}" type="image/webp" />
{{- end -}}
<img
- loading="lazy"
{{ if fileExists $path }}
{{- with $image -}}
- {{- $image = (.Content | resources.FromString (print "/data/static/images/" ($image | urlize))).Fit $dimensions -}}
+ {{- $image = (.Content | resources.FromString (print "/data/static/images/" ($image | urlize))).Resize $dimensions -}}
width="{{ $image.Width }}"
height="{{ $image.Height }}"
src="{{ $image.RelPermalink }}"