PaperModX/layouts/shortcodes/figure-img-size.html

13 lines
342 B
HTML

{{- $width := .Get 1 }}
{{- $height := .Get 2 }}
<figure class="center align-center">
<div class="image-size-control" style="
{{- with $width }}max-width: {{ . }};{{ end -}}
{{- with $height }}height: {{ . }};{{ end -}}
">
{{ .Page.RenderString .Inner }}
</div>
<figcaption><p>{{ .Get 0 | markdownify }}</p></figcaption>
</figure>