mirror of https://github.com/jpanther/congo.git
16 lines
568 B
HTML
16 lines
568 B
HTML
{{ if .Get "default" }}
|
|
{{ template "_internal/shortcodes/figure.html" . }}
|
|
{{ else }}
|
|
{{ $src := .Get "src" }}
|
|
{{ $alt := .Get "alt" }}
|
|
{{ $caption := .Get "caption" }}
|
|
{{ $href := .Get "href" }}
|
|
{{ $class := .Get "class" }}
|
|
<figure{{ with $class }} class="{{ . }}"{{ end }}>
|
|
{{ with $href }}<a href="{{ . }}">{{ end }}
|
|
{{ partial "picture.html" (dict "context" . "src" $src "alt" $alt) }}
|
|
{{ with $href }}</a>{{ end }}
|
|
{{ with $caption }}<figcaption class="text-center">{{ . | markdownify }}</figcaption>{{ end }}
|
|
</figure>
|
|
{{ end }}
|