changed display_all_items macro to display_all_species and added display_all_articles macro

This commit is contained in:
TussockyJoker committed 2026-04-05 23:33:52 +01:00
1 parent 9ddc6f3771
commit 5bd1ec7fa4
1 file changed
+17 -2
+17 -2
View File
@@ -1,6 +1,6 @@
{% macro display_all_items(items)%}
{% macro display_all_species(items)%}
{# Displays all species in the provided 'items' array #}
{# Used in the species database and species results pages #}
{# Used in the species database and search species results pages #}
<section class="species-grid">
{% for item in items %}
<a href="/species/{{ item['species_english'] }}" class="container-lite">
@@ -15,4 +15,19 @@
{% endfor %}
</section>
{% endmacro %}
{% macro display_all_articles(items)%}
{# Displays all articles in the provided 'items' array #}
{# Used in the article library and article search results pages #}
<section class="species-grid">
{% for item in items %}
<a href="/articles/{{ item['article_id'] }}" class="container-lite">
<h3 class="plain-white-text">{{ item['article_title'] }}</h3>
<p style="color: var(--text)">
Main category: {{ item['category'] }}
</p>
</a>
{% endfor %}
</section>
{% endmacro %}