Add a class argument to the figures/image shortcode
This commit is contained in:
parent
5f14f1cea2
commit
9584896363
1 changed files with 3 additions and 1 deletions
|
@ -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" -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue