bobatheme/layouts/shortcodes/figvideo.html

19 lines
481 B
HTML
Raw Normal View History

2021-10-19 13:57:39 -05:00
<figure>
{{ $vid := $.Page.Resources.GetMatch (.Get "src") | resources.Fingerprint "sha512" }}
{{ if .Get "href" }}<a href="{{ .Get "href" }}">{{ end }}
<video controls>
<source src="{{ $vid.Permalink }}" alt="{{ $vid.Title }}">
{{ i18n "browser_no_video_support" }}
</video>
{{ if .Get "href" }}</a>{{ end }}
{{ with $vid.Title }}
<figcaption>
{{ . | markdownify }}
</figcaption>
{{ end }}
</figure>