mirror of
https://github.com/SebastianStork/kita.git
synced 2026-01-21 14:31:35 +01:00
25 lines
645 B
HTML
25 lines
645 B
HTML
{% if page.toc %}
|
|
<nav class="block-bg prose-a:secondary-link mb-12 flex rounded-lg p-2 text-lg">
|
|
<details>
|
|
<summary class="cursor-pointer py-1 pl-4">
|
|
<span class="ml-2">Table of Contents</span>
|
|
</summary>
|
|
<ul class="mx-2">
|
|
{% for h1 in page.toc %}
|
|
<li>
|
|
<a href="#{{ h1.id | safe }}">{{ h1.title }}</a>
|
|
{% if h1.children %}
|
|
<ul>
|
|
{% for h2 in h1.children %}
|
|
<li>
|
|
<a href="#{{ h2.id | safe }}">{{ h2.title }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</details>
|
|
</nav>
|
|
{% endif %}
|