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

13 lines
346 B
HTML
Raw Normal View History

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