lennartalff.net/layouts/shortcodes/centerfigure.html
2022-09-19 12:34:58 +02:00

10 lines
359 B
HTML

<figure id='{{ .Get "id" }}'>
<div style="display: flex;justify-content: center">
<img src='{{ .Get "src" }}'
{{- with .Get "width" }} width="{{ . }}" {{end}}
{{- with .Get "height" }} height="{{ . }}" {{end}} />
</div>
{{ with (.Get "caption") -}}
<figcaption>{{ . }}</figcaption>
{{- end }}
</figure>