Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/humrochagf/colordrop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHumberto Rocha <humrochagf@gmail.com>2019-08-07 23:42:18 +0300
committerHumberto Rocha <humrochagf@gmail.com>2019-08-07 23:42:18 +0300
commita55919fd662dd0817f816d9a3c142b2929ee323d (patch)
tree23f6becf6c79c57473c6fa1c6ce86ebf069ef0a6 /layouts
parent5f78c95c64ef49f1cf59460737e9133588713431 (diff)
Add videogif shortcode
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/videogif.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/layouts/shortcodes/videogif.html b/layouts/shortcodes/videogif.html
new file mode 100644
index 0000000..a668126
--- /dev/null
+++ b/layouts/shortcodes/videogif.html
@@ -0,0 +1,17 @@
+<video class="videogif" autoplay loop muted inline>
+ {{ range .Params }}
+ {{ $extension := path.Ext . }}
+
+ {{ if eq $extension ".webm" }}
+ <source src="{{ . }}" type="video/webm">
+ {{ end }}
+
+ {{ if eq $extension ".mp4" }}
+ <source src="{{ . }}" type="video/mp4">
+ {{ end }}
+
+ {{ if eq $extension ".gif" }}
+ <img src="{{ . }}" />
+ {{ end }}
+ {{ end }}
+</video>