d3c3nt

[DORMANT] a fairly decent theme for the zola static site engine
git clone git://git.figbert.com/d3c3nt.git
Log | Files | Refs | README | LICENSE

commit 79ca8bb8f241a8f9c3096587c80da415ce90b483
parent ccc1b012feafe1b1cf49242c48909eabcc6de531
Author: FIGBERT <figbert@figbert.com>
Date:   Wed, 26 Aug 2020 16:32:19 -0700

:sparkles: Add Tera shortcodes

Diffstat:
Atemplates/shortcodes/audio.html | 8++++++++
Atemplates/shortcodes/emoji.html | 2++
Atemplates/shortcodes/gif.html | 8++++++++
Atemplates/shortcodes/image.html | 8++++++++
Atemplates/shortcodes/video.html | 8++++++++
5 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/templates/shortcodes/audio.html b/templates/shortcodes/audio.html @@ -0,0 +1,8 @@ +<audio controls> + {% for source in sources %} + {% set type = source | split(pat=".") | last %} + <source src="{{ source }}" type="{{ 'audio/' ~ type }}"> + {% endfor %} + Your browser doesn't support the audio tag and/or the audio formats in use here – sorry! +</audio> + diff --git a/templates/shortcodes/emoji.html b/templates/shortcodes/emoji.html @@ -0,0 +1,2 @@ +<span class="emoji" role="img" aria-label="{{ alt }}">{{ load_data(path="static/emoji/" ~ name ~ ".svg", format="plain") | safe }}</span> + diff --git a/templates/shortcodes/gif.html b/templates/shortcodes/gif.html @@ -0,0 +1,8 @@ +<video autoplay loop muted playsinline> + {% for source in sources %} + {% set type = source | split(pat=".") | last %} + <source src="{{ source }}" type="{{ 'video/' ~ type }}"> + {% 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,8 @@ +<picture> + {% for source in sources %} + {% set type = source | split(pat=".") | last %} + <source srcset="{{ source }}" type="{{ 'img/' ~ type }}"> + {% endfor %} + <img src="{{ fallback_path }}" alt="{{ fallback_alt }}"/> +</picture> + diff --git a/templates/shortcodes/video.html b/templates/shortcodes/video.html @@ -0,0 +1,8 @@ +<video controls> + {% for source in sources %} + {% set type = source | split(pat=".") | last %} + <source src="{{ source }}" type="{{ 'video/' ~ type }}"> + {% endfor %} + Your browser doesn't support the video tag and/or the video formats in use here – sorry! +</video> +