1
0
Fork 0
mirror of https://github.com/Findus23/guides.git synced 2024-09-19 16:03:51 +02:00
guides/layouts/shortcodes/video.html

14 lines
547 B
HTML
Raw Normal View History

2022-05-17 15:02:45 +02:00
<figure>
<video {{if .Get "loop"}} autoplay loop {{else}} preload="metadata"{{ end }}muted controls playsinline>
{{ with .Page.Resources.GetMatch (printf "*%s*" (.Get "src_webm")) }}
<source src="{{ .Permalink }}" type="video/webm; codecs=vp9">
{{ end }}
{{ with .Page.Resources.GetMatch (printf "*%s*" (.Get "src_mp4")) }}
<source src="{{ .Permalink }}" type="video/mp4">
{{ end }}
</video>
{{if .Get "title"}}
<figcaption>{{ .Get "title" }}</figcaption>
{{end}}
</figure>