️ refactor: improve table of contents accessibility

main
welpo 2 years ago
parent e4c6705843
commit 1c93df0a6f
No known key found for this signature in database
GPG Key ID: A2F978CF4EC1F5A6

@ -144,7 +144,7 @@
{# Optional table of contents #}
{% if page.extra.toc | default(value=false) %}
{% if page.toc %}
<div class="toc-container">
<div class="toc-container">
<h3>Table of Contents</h3>
<ul>
{% for h1 in page.toc %}
@ -155,24 +155,23 @@
{% for h2 in h1.children %}
<li>
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
{% if h2.children %}
<ul>
{% for h3 in h2.children %}
<li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% if h2.children %}
<ul>
{% for h3 in h2.children %}
<li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% endif %}

Loading…
Cancel
Save