small fixes

This commit is contained in:
teldra 2022-06-15 22:14:51 +02:00
parent 7ce041fa4b
commit 7daff8fff9

View File

@ -82,7 +82,7 @@
{{- $banner := .Resources.GetMatch "banner*" -}}
{{- if $banner -}}
{{- $c = printf "<p><img loading=\"lazy\" src=\"%s\" width=\"%d\" height=\"%d\" /></p>%s" $banner.Permalink $banner.Width $banner.Height $c -}}
{{- $c = printf "<p style=\"width: 65%;\"><img loading=\"lazy\" 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><img loading=\"lazy\" src=\"%s\" width=\"%d\" height=\"%d\" /></p>" $c $img.Permalink $img.Width $img.Height -}}
{{- $c = printf "%s<p style=\"width: 65%;\""><img loading=\"lazy\" src=\"%s\" width=\"%d\" height=\"%d\" /></p>" $c $img.Permalink $img.Width $img.Height -}}
{{- end -}}
{{- end -}}