Feat: expand sidebar on category index

This commit is contained in:
Bertrand Benjamin 2020-06-26 10:13:48 +02:00
parent 548aecf9e3
commit c7ecf06733

View File

@ -1,7 +1,7 @@
<ul class="toctree">
{% 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>
{% 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 %}
@ -13,7 +13,7 @@
</ul>
</li>
{% else %}
<li class="toctree-l1"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | capitalize }}</a>
<li class="toctree-l1"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | upper }}</a>
{% endif %}
{% endfor %}
</ul>