small fixes

This commit is contained in:
teldra 2022-06-15 22:18:30 +02:00
parent 141a289187
commit 33c6988d21
1 changed files with 2 additions and 2 deletions

View File

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