small fixes

This commit is contained in:
teldra 2022-06-15 21:56:48 +02:00
parent 335c101475
commit 09c6000c1a
1 changed files with 2 additions and 2 deletions

View File

@ -85,13 +85,13 @@
{{- end -}}
{{- $banner := .Resources.GetMatch "banner*" -}}
{{- if $banner -}}
{{- $c = printf "<img src=\"%s\" width=\"%d\" height=\"%d\" />%s" $banner.Permalink $banner.Width $banner.Height $c -}}
{{- $c = printf "<img loading=\"lazy\" src=\"%s\" width=\"%d\" height=\"%d\" />%s" $banner.Permalink $banner.Width $banner.Height $c -}}
{{- end -}}
{{- range .Resources.ByType "image" -}}
{{ $img := . }}
{{- if not (hasPrefix $img.Name "banner") }}
{{- $c = printf "%s<img src=\"%s\" width=\"%d\" height=\"%d\" />" $c $img.Permalink $img.Width $img.Height -}}
{{- $c = printf "<img loading=\"lazy\" src=\"%s\" width=\"%d\" height=\"%d\" />%s" $img.Permalink $img.Width $img.Height $c -}}
{{- end -}}
{{- end -}}