2021-10-27 09:48:13 -05:00
|
|
|
{{ $hidecaption := index . "hidecaption" }}
|
|
|
|
|
|
|
|
{{ if index . "border" }}
|
|
|
|
<figure class="border">
|
|
|
|
{{ else }}
|
2021-10-19 14:19:23 -05:00
|
|
|
<figure>
|
2021-10-27 09:48:13 -05:00
|
|
|
{{ end }}
|
|
|
|
{{ with index . "src" }}
|
|
|
|
|
2021-11-02 01:08:46 -05:00
|
|
|
{{ $media := . }}
|
2021-10-19 14:19:23 -05:00
|
|
|
{{ 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
|
|
|
{{ if not $hidecaption }}
|
2021-10-19 14:19:23 -05:00
|
|
|
{{ with $media.Title }}
|
|
|
|
<figcaption>
|
|
|
|
{{ . | markdownify }}
|
|
|
|
</figcaption>
|
|
|
|
{{ end }}
|
2021-10-27 09:48:13 -05:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|
2021-10-19 14:19:23 -05:00
|
|
|
</figure>
|