You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.0 KiB
HTML

{{ $align := .Get "align" | default "center" }}
{{ $caption := .Get "caption" | markdownify }}
{{ $cite := (.Get 0 | default (.Get "cite")) | markdownify }}
{{ $float := .Get "float" }}
{{ $content := .Inner | markdownify }}
{{ $margins := "" }}
{{ if $float }}
{{ if eq $float "start" }}
{{ $margins = "me-4" }}
{{ else if eq $float "end" }}
{{ $margins = "ms-4" }}
{{ else }}
{{ errorf "invalid float: %q" $float }}
{{ end }}
{{ end }}
<figure class="align-items-center d-flex flex-column {{ with $float }} float-{{ . }} {{ end }} {{ with $margins }} {{ . }} {{ end }} paige-figure">
<div>
<blockquote class="blockquote {{ if $caption }} mb-2 {{ end }} text-{{ $align }}">{{ $content }}</blockquote>
{{ with $caption }}
<figcaption class="figure-caption text-center">{{ . }}</figcaption>
{{ end }}
{{ with $cite }}
<figcaption class="blockquote-footer figure-caption text-{{ $align }}">{{ . }}</figcaption>
{{ end }}
</div>
</figure>