summary refs log tree commit diff stats
path: root/src/themes/serene/templates/shortcodes/collection.html
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-25 12:09:21 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-25 12:09:21 +0200
commit6acf4ab874c58ee14f35da671029e56972745ce6 (patch)
treebc6dfe4f3661332e8c1fc6ff4ca657185db488e4 /src/themes/serene/templates/shortcodes/collection.html
parentfix(flake): Ensure that the `dead-trees` directory exists (diff)
downloadb-peetz.de-6acf4ab874c58ee14f35da671029e56972745ce6.zip
feat(treewide): Migrate to zola
Diffstat (limited to 'src/themes/serene/templates/shortcodes/collection.html')
-rw-r--r--src/themes/serene/templates/shortcodes/collection.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/themes/serene/templates/shortcodes/collection.html b/src/themes/serene/templates/shortcodes/collection.html
new file mode 100644
index 0000000..c217a0c
--- /dev/null
+++ b/src/themes/serene/templates/shortcodes/collection.html
@@ -0,0 +1,23 @@
+{% import 'macros/collection.html' as marcos -%}
+
+{% set data = load_data(path="content" ~ section.path ~ file, format="toml") %}
+
+<section class="collection-wrapper">
+{% for item in data.collection %}
+  {% if item.type == "card" %}
+    {{ marcos::card(item=item) }}
+  {% elif item.type == "card_simple" %}
+    {{ marcos::card_simple(item=item) }}
+  {% elif item.type == "entry" %}
+    {{ marcos::entry(item=item) }}
+  {% elif item.type == "box" %}
+    {{ marcos::box(item=item) }}
+  {% elif item.type == "art" %}
+    {{ marcos::art(item=item) }}
+  {% elif item.type == "art_simple" %}
+    {{ marcos::art_simple(item=item) }}
+  {% elif item.type == "br" %}
+    <br />
+  {% endif %}
+{% endfor %}
+</section>