From 54cee49bc3edb1ea8f8ef878b67837a078a144a1 Mon Sep 17 00:00:00 2001 From: Rohan Faiyaz Khan Date: Sat, 31 Aug 2019 11:12:33 +0600 Subject: [PATCH] Added video shortcode Added a video shortcode based on the figure shortcode. --- layouts/shortcodes/video.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 layouts/shortcodes/video.html diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html new file mode 100644 index 00000000..34cc54a5 --- /dev/null +++ b/layouts/shortcodes/video.html @@ -0,0 +1,21 @@ + +{{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }} +
+
+
+
+ {{ with .Get "link" | default (.Get "src") }}{{ end }} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} +
+ {{- with .Get "title" }}

{{.}}

{{ end }} + {{- if or (.Get "caption") (.Get "attr")}} +

+ {{- .Get "caption" -}} + {{- with .Get "attrlink"}}{{ .Get "attr" }}{{ else }}{{ .Get "attr"}}{{ end -}} +

+ {{- end }} +
+ {{- end }} +
+