only skip "posts", simplify

This commit is contained in:
madrilene 2024-05-27 09:55:55 +02:00
parent 8fb113a644
commit 57b7861182

View file

@ -9,26 +9,19 @@
<a href="{{ item.url | url }}">{{ item.data.title }}</a> <a href="{{ item.url | url }}">{{ item.data.title }}</a>
</h3> </h3>
{% endif %} {% endif %}
<div class="cluster"> <div class="cluster text-step-min-1">
<span class="text-step-min-1"> {% set definedDate = item.date %}
{% set definedDate = item.date %} {% include "components/date.njk" %}
{% include "components/date.njk" %} {%
{% if
if activateTags and item.data.tags.length > 1
activateTags and item.data.tags.length > 1 %}
%} {% for tag in item.data.tags %}
{# For cards with multiple tags, show all tags for the card #} {% if tag != "posts" %}
{% for tagButton in range( 0, item.data.tags.length ) %} <span class="button post-tag"> {{ tag }} </span>
{# Skip "administrative" tags like 'posts' and 'feature' #} {% endif %}
{% if {% endfor %}
(item.data.tags[ tagButton ] != "posts") and {% endif %}
(item.data.tags[ tagButton ] != "feature")
%}
<span class="button post-tag"> {{ item.data.tags[ tagButton ] }} </span>
{% endif %}
{% endfor %}
{% endif %}
</span>
</div> </div>
<p>{{ item.data.description }}</p> <p>{{ item.data.description }}</p>
</div> </div>