X-Git-Url: https://git.danix.xyz/?a=blobdiff_plain;f=layouts%2Fshortcodes%2Fvideo.html;fp=layouts%2Fshortcodes%2Fvideo.html;h=ec9612593010f4ff6cbef085cc489f2e3885a66e;hb=2882a244f06ed28dbd9148e7b36241242c836629;hp=0000000000000000000000000000000000000000;hpb=00bd3a19ecce5fbf041471128751311dc7c60b0a;p=theme-danix.xyz.git diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html new file mode 100644 index 0000000..ec96125 --- /dev/null +++ b/layouts/shortcodes/video.html @@ -0,0 +1,36 @@ +{{/* + * The video shortcode: + * All arguments are optional, except for src which is where you define your video file + * This shortcode supports only webm video files. + * Args: + * class: [string] The class(es) to give to the video block. + * width: [int] The width of the video + * height: [int] The height of the video + * autoplay: [bool] true or false for autoplay - defaults to false + * loop: [bool] true or false for loop - defaults to false + * mute: [bool] true or false for mute - defaults to false + * + * Usage: + * {{< video src="my-awesome-video.mp4" width=600 height=600 autoplay=true loop=true mute=true class="some class" >}} + * + * Output: + * + * + */}} + +{{ $ext := (.Get "src") | path.Ext }} +{{ $filetype := slicestr $ext 1}} + + + +