22 lines
731 B
HTML
22 lines
731 B
HTML
<ul class="toctree">
|
|
{% for cat, articles in categories|sort %}
|
|
{% if (article and article.category == cat) or category == cat %}
|
|
<li class="toctree-l1 current"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | upper }}</a>
|
|
<ul>
|
|
{% for art in articles | sort(attribute="date") %}
|
|
{% if article == art %}
|
|
<li class="toctree-l2 current"><span>{{ art.title }}</span></li>
|
|
{% else %}
|
|
<li class="toctree-l2"><a href="{{ SITEURL }}/{{ art.url }}">{{ art.title }}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|
|
{% else %}
|
|
<li class="toctree-l1"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | upper }}</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
|