site_opytex/theme/templates/partial/toctree.html

22 lines
720 B
HTML
Raw Normal View History

<ul class="toctree">
2020-06-25 14:10:24 +00:00
{% for cat, articles in categories|sort %}
{% if article and article.category == cat %}
<li class="toctree-l1 current"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | capitalize }}</a>
<ul>
{% for art in articles | sort(attribute="date") %}
{% if article == art %}
<li class="toctree-l2 current"><span>{{ art.title }}</span></li>
{% else %}
2020-06-25 14:10:24 +00:00
<li class="toctree-l2"><a href="{{ SITEURL }}/{{ art.url }}">{{ art.title }}</a></li>
{% endif %}
2020-06-25 14:10:24 +00:00
{% endfor %}
</ul>
</li>
{% else %}
<li class="toctree-l1"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | capitalize }}</a>
{% endif %}
{% endfor %}
</ul>