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

Loading…
Cancel
Save