zelda-planted/layouts/shortcodes/video.html

7 lines
339 B
HTML
Raw Permalink Normal View History

2020-10-15 04:39:37 +00:00
<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
<video controls preload="{{ .Get "preload" | default "metadata" }}" {{ with .Get "width" }}width="{{ . }}"{{ end }}>
{{ with .Get "src" }}<source src="{{ . | relURL }}" type="video/mp4">{{ end }}
</video>
{{ with .Get "caption" }}<figcaption>{{ . }}</figcaption>{{ end }}
</figure>