ParkerTenBroeck.github.io/templates/taxonomy_list.html
2026-01-20 20:06:28 -05:00

27 lines
No EOL
854 B
HTML

{% extends "base.html" %}
{% import "macros/post.html" as post %}
{% import "macros/taxonomy.html" as macros %}
{% block main %}
<h1>{{ taxonomy.name | title }}</h1>
{%- set num_terms = terms | length %}
<ul class="taxonomy-list{%- if num_terms > 16 %} three-column{%- elif num_terms > 8 %} two-column{%- endif -%}">
{%- for term in terms %}
{# {%- set page_count = [term.page_count ~ " post", term.page_count | pluralize] | join %} #}
<li>
<h4 style="margin-bottom: 0.25em;margin-top: 0.5em"><a href="{{ term.permalink | safe }}">{{ macros::prettify(term=term.name) }}</a></h4>
<ul>
{% for page in term.pages%}
<li>{{post::page_link(path=page.relative_path)}}</li>
{%- endfor %}
</ul>
</li>
{%- endfor %}
</ul>
{% endblock main %}