From 57b78611821a0d283a996a28a9639ee114ae927c Mon Sep 17 00:00:00 2001 From: madrilene Date: Mon, 27 May 2024 09:55:55 +0200 Subject: [PATCH] only skip "posts", simplify --- src/_includes/components/card.njk | 33 ++++++++++++------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/src/_includes/components/card.njk b/src/_includes/components/card.njk index 5d8ce96..acca62c 100644 --- a/src/_includes/components/card.njk +++ b/src/_includes/components/card.njk @@ -9,26 +9,19 @@ {{ item.data.title }} {% endif %} -
- - {% set definedDate = item.date %} - {% include "components/date.njk" %} - {% - if - activateTags and item.data.tags.length > 1 - %} - {# For cards with multiple tags, show all tags for the card #} - {% for tagButton in range( 0, item.data.tags.length ) %} - {# Skip "administrative" tags like 'posts' and 'feature' #} - {% if - (item.data.tags[ tagButton ] != "posts") and - (item.data.tags[ tagButton ] != "feature") - %} - - {% endif %} - {% endfor %} - {% endif %} - +
+ {% set definedDate = item.date %} + {% include "components/date.njk" %} + {% + if + activateTags and item.data.tags.length > 1 + %} + {% for tag in item.data.tags %} + {% if tag != "posts" %} + + {% endif %} + {% endfor %} + {% endif %}

{{ item.data.description }}