gh23.de-Homepage/templates/macros/docs-toc.html

24 lines
665 B
HTML
Raw Normal View History

2023-02-01 15:53:12 +01:00
{% macro docs_toc(page) %}
{% if page.extra.toc %}
<nav class="docs-toc d-none d-xl-block col-xl-3" aria-label="Secondary navigation">
<div class="page-links">
<h3>Navigation</h3>
<nav id="TableOfContents">
<ul>
{% for h1 in page.toc %}
<li><a href="{{ h1.permalink | safe}}">{{ h1.title }}</a></li>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
</nav>
</div>
</nav>
{% endif %}
{% endmacro %}