commit 987fd01451210aa071db9b67555bce44b31bb9f7
parent edc2d1dedeed798928f8166efa0d39d19584aac0
Author: FIGBERT <figbert@figbert.com>
Date: Sun, 16 Aug 2020 09:41:44 -0700
:sparkles: Add audio, video, image, and gif shortcodes
Diffstat:
4 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/templates/shortcodes/audio.html b/templates/shortcodes/audio.html
@@ -0,0 +1,7 @@
+<audio controls>
+ {% for source in sources %}
+ <source src="{{ source }}">
+ {% endfor %}
+ Your browser doesn't support the audio tag and/or the audio formats in use here – sorry!
+</audio>
+
diff --git a/templates/shortcodes/gif.html b/templates/shortcodes/gif.html
@@ -0,0 +1,7 @@
+<video autoplay loop muted playsinline>
+ {% for source in sources %}
+ <source src="{{ source }}">
+ {% endfor %}
+ Your browser doesn't support the video tag, which I use in place of .gifs, and/or the video formats in use here – sorry!
+</video>
+
diff --git a/templates/shortcodes/image.html b/templates/shortcodes/image.html
@@ -0,0 +1,7 @@
+<picture>
+ {% for source in sources %}
+ <source srcset="{{ source }}">
+ {% endfor %}
+ <img src="{{ fallback-path }}" alt="{{ fallback-alt }}"/>
+</picture>
+
diff --git a/templates/shortcodes/video.html b/templates/shortcodes/video.html
@@ -0,0 +1,7 @@
+<video controls>
+ {% for source in sources %}
+ <source src="{{ source }}">
+ {% endfor %}
+ Your browser doesn't support the video tag and/or the video formats in use here – sorry!
+</video>
+