commit d59ec4cdbf06c4d01398d7fd72cf5d763e10b0e1
parent ff7c9a3f5c9ec64800b4a6052f7a990beb4ec4c6
Author: FIGBERT <figbert@figbert.com>
Date: Mon, 24 Jan 2022 09:11:52 -0800
Clean up spacing of shortcode outputs
Diffstat:
4 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/templates/shortcodes/audio.html b/templates/shortcodes/audio.html
@@ -1,8 +1,7 @@
<audio controls>
- {% for source in sources %}
- {% set type = source | split(pat=".") | last %}
+ {% for source in sources -%}
+ {% set type = source | split(pat=".") | last -%}
<source src="{{ config.base_url | safe }}{{ page.path | safe }}{{ source | safe }}" type="{{ 'audio/' ~ type }}">
- {% endfor %}
+ {% 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
@@ -1,8 +1,7 @@
<video autoplay loop muted playsinline>
- {% for source in sources %}
- {% set type = source | split(pat=".") | last %}
+ {% for source in sources -%}
+ {% set type = source | split(pat=".") | last -%}
<source src="{{ config.base_url | safe }}{{ page.path | safe }}{{ source | safe }}" type="{{ 'video/' ~ type }}">
- {% endfor %}
+ {% 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
@@ -1,8 +1,7 @@
<picture>
- {% for source in sources %}
- {% set type = source | split(pat=".") | last %}
+ {% for source in sources -%}
+ {% set type = source | split(pat=".") | last -%}
<source srcset="{{ config.base_url | safe}}{{ page.path | safe }}{{ source | safe }}" type="{{ 'img/' ~ type }}">
- {% endfor %}
+ {% endfor -%}
<img src="{{ fallback_path }}" alt="{{ fallback_alt }}"/>
</picture>
-
diff --git a/templates/shortcodes/video.html b/templates/shortcodes/video.html
@@ -1,8 +1,7 @@
<video controls>
- {% for source in sources %}
- {% set type = source | split(pat=".") | last %}
+ {% for source in sources -%}
+ {% set type = source | split(pat=".") | last -%}
<source src="{{ config.base_url | safe }}{{ page.path | safe }}{{ source | safe }}" type="{{ 'video/' ~ type }}">
- {% endfor %}
+ {% endfor -%}
Your browser doesn't support the video tag and/or the video formats in use here – sorry!
</video>
-