small fixes
This commit is contained in:
parent
09c6000c1a
commit
60962764ad
|
@ -80,18 +80,19 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $when -}}
|
||||
{{- $c = printf "<p><b>%s</b></p>%s" $when $c -}}
|
||||
{{- end -}}
|
||||
{{- $banner := .Resources.GetMatch "banner*" -}}
|
||||
{{- if $banner -}}
|
||||
{{- $c = printf "<img loading=\"lazy\" src=\"%s\" width=\"%d\" height=\"%d\" />%s" $banner.Permalink $banner.Width $banner.Height $c -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $when -}}
|
||||
{{- $c = printf "<p><b>%s</b></p>%s" $when $c -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range .Resources.ByType "image" -}}
|
||||
{{ $img := . }}
|
||||
{{- if not (hasPrefix $img.Name "banner") }}
|
||||
{{- $c = printf "<img loading=\"lazy\" src=\"%s\" width=\"%d\" height=\"%d\" />%s" $img.Permalink $img.Width $img.Height $c -}}
|
||||
{{- $c = printf "%s<img loading=\"lazy\" src=\"%s\" width=\"%d\" height=\"%d\" />" $c $img.Permalink $img.Width $img.Height -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user