diff options
Diffstat (limited to 'themes/default/layouts/shortcodes/video-imgur.html')
-rw-r--r-- | themes/default/layouts/shortcodes/video-imgur.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/video-imgur.html b/themes/default/layouts/shortcodes/video-imgur.html new file mode 100644 index 0000000..2edb9a4 --- /dev/null +++ b/themes/default/layouts/shortcodes/video-imgur.html @@ -0,0 +1,14 @@ +{{- $id := default "rQIb4Vw" (.Get "id" | default (.Get 0)) -}} +{{- $title := default "Imgur Gif" (.Get "title" | default (.Get 1)) -}} +{{- $caption := default $title (.Get "caption" | default (.Get 2)) -}} + +{{- $options := default "controls autoplay loop muted playsinline" + (.Get "options" | default (.Get 3)) +-}} + +{{- $source := print "https://i.imgur.com/" $id ".mp4" -}} + +{{- printf `{{< video source="%s" title="%s" caption="%s" options="%s" >}}` + $source $title $caption $options + | .Page.RenderString +-}} |