bobatheme/layouts/shortcodes/figure.html
BBaoVanC 7ffa6c068c
Improve figures
- Add option to disable border and caption
2021-10-27 09:49:21 -05:00

16 lines
338 B
HTML

{{ $resource := $.Page.Resources.GetMatch (.Get "src") }}
{{ $border := false }}
{{ if .Get "border" }}
{{ $border = true }}
{{ end }}
{{ $hidecaption := false }}
{{ if .Get "hidecaption" }}
{{ $hidecaption = true }}
{{ end }}
<p>
{{ partial "figure.html" (dict "src" $resource "border" $border "hidecaption" $hidecaption) }}
</p>