diff options
author | tdro <tdro@noreply.example.com> | 2023-06-18 18:32:33 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-06-18 18:32:33 -0400 |
commit | fe545971fcd7db887c52f394f08ee2be0dd17894 (patch) | |
tree | 035c1cef5f4c5f5224e30abc5f313cf4b1798ad7 /themes/default/layouts/shortcodes/video-imgur.html | |
parent | eaa731e5eddf263e12d46481a036cce9882bf72e (diff) | |
download | canory-fe545971fcd7db887c52f394f08ee2be0dd17894.tar.gz canory-fe545971fcd7db887c52f394f08ee2be0dd17894.tar.bz2 canory-fe545971fcd7db887c52f394f08ee2be0dd17894.zip |
themes/default/layouts/shortcodes: Cleanup
Remove some shortcodes, probably better to target formats over embeds
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 +-}} |