Add a class argument to the figures/image shortcode

This commit is contained in:
Eryn Wells 2023-12-31 12:17:27 -08:00
parent 5f14f1cea2
commit 9584896363

View file

@ -10,13 +10,15 @@
{{ errorf "Missing name or names parameter to figures/image" }}
{{- end -}}
{{- $class := .Get "class" -}}
{{- if lt (len $imgs) 0 -}}
{{ errorf "No images found for name(s) parameter" }}
{{- end -}}
{{- $shouldShowTitle := (.Get "shouldShowTitle") | default true -}}
<figure>
<figure {{with $class }}class="{{ . }}"{{ end }}>
<div class=container>
{{ range $img := $imgs -}}
{{- $resizedImg := $img.Fit "1280x1280" -}}