feat: add video shortcode

This commit is contained in:
Henk Verlinde
2021-04-20 20:05:47 +02:00
parent 7a7a2f46b0
commit 51fdde560f
4 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,11 @@
<div class="ratio ratio-{{ with .Get "ratio" }}{{.}}{{ end }}">
<video{{ with .Get "attributes" }} {{ . | safeHTMLAttr }}{{ end }}>
{{ with .Get "webm-src" -}}
<source src="{{ . | relURL }}" type="video/webm">
{{ end -}}
{{ with .Get "mp4-src" -}}
<source src="{{ . | relURL }}" type="video/mp4">
{{ end -}}
Sorry, your browser doesn't support embedded videos.
</video>
</div>