1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-13 18:40:54 +01:00
mkdocs-material/material/nav.html
2016-02-09 12:58:55 +01:00

38 lines
1.0 KiB
HTML

{% if nav_item.children %}
<li>
<hr>
<span class="section">{{ nav_item.title }}</span>
<ul>
{% for nav_item in nav_item.children %}
{% include 'nav.html' %}
{% endfor %}
</ul>
</li>
{% else %}
<li>
<a class="{% if nav_item.active %}current{% endif %}" title="{{ nav_item.title }}" href="{{ nav_item.url }}">
{{ nav_item.title }}
</a>
{% if nav_item == current_page %}
<ul>
{% for toc_item in toc %}
{% if h1 %}
{% for toc_item in toc_item.children %}
<li class="anchor">
<a title="{{ toc_item.title }}" href="{{ toc_item.url }}">
{{ toc_item.title }}
</a>
</li>
{% endfor %}
{% else %}
<li class="anchor">
<a title="{{ toc_item.title }}" href="{{ toc_item.url }}">
{{ toc_item.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endif %}