From b7cba51048a3881651faf7fc7e3649f66c195337 Mon Sep 17 00:00:00 2001 From: xenua Date: Mon, 17 Apr 2023 09:36:48 +0200 Subject: [PATCH] add gallery shortcode --- templates/shortcodes/gallery.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 templates/shortcodes/gallery.html diff --git a/templates/shortcodes/gallery.html b/templates/shortcodes/gallery.html new file mode 100644 index 0000000..dbef034 --- /dev/null +++ b/templates/shortcodes/gallery.html @@ -0,0 +1,16 @@ +{# {{ gallery(images=[], cols=2, caption="") }} #} + +{% if not cols %} + {% set cols = 2 %} +{% endif %} + +
+
+ {% for image in images %} + {% set url = image | first %} + {% set alt = image | last %} + {{ alt }} + {% endfor %} +
+ {% if caption %}
{{ caption }}
{% endif %} +
\ No newline at end of file