2021-10-27 09:48:13 -05:00
|
|
|
{{ $hidecaption := index . "hidecaption" }}
|
|
|
|
|
2021-11-10 21:46:07 -06:00
|
|
|
{{ if index . "noborder" }}
|
2021-11-22 02:21:15 -06:00
|
|
|
<figure>
|
2021-11-10 21:46:07 -06:00
|
|
|
{{ else }}
|
2021-11-22 02:21:15 -06:00
|
|
|
<figure class="border">
|
2021-10-27 09:48:13 -05:00
|
|
|
{{ end }}
|
2021-10-19 14:19:23 -05:00
|
|
|
|
2021-11-22 02:21:15 -06:00
|
|
|
{{ with index . "src" }}
|
|
|
|
{{ $media := . }}
|
|
|
|
{{ if eq .MediaType.MainType "image" }}
|
|
|
|
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" />
|
|
|
|
{{ else if eq .MediaType.MainType "video" }}
|
|
|
|
<video controls>
|
|
|
|
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
|
|
|
|
{{ i18n "browser_no_video_support" }}
|
|
|
|
</video>
|
|
|
|
{{ end }}
|
2021-10-27 09:48:13 -05:00
|
|
|
|
2021-11-22 02:21:15 -06:00
|
|
|
{{ if not $hidecaption }}
|
|
|
|
{{ with $media.Title }}
|
|
|
|
<figcaption>
|
|
|
|
{{ . | markdownify }}
|
|
|
|
</figcaption>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2021-10-27 09:48:13 -05:00
|
|
|
{{ end }}
|
2021-10-19 14:19:23 -05:00
|
|
|
</figure>
|