small fixes

This commit is contained in:
teldra 2022-06-15 22:03:30 +02:00
parent 60962764ad
commit 5277ea6be1
1 changed files with 4 additions and 3 deletions

View File

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