Merge pull request #244 from h-enk/video-shortcode

 Adds video shortcode
This commit is contained in:
Henk Verlinde 2021-06-15 13:47:16 +02:00 committed by GitHub
commit ecae47df4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 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>

BIN
static/videos/flower.mp4 Normal file

Binary file not shown.

BIN
static/videos/flower.webm Normal file

Binary file not shown.