1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-28 17:30:56 +01:00
mkdocs-material/material/partials/toc.html

16 lines
498 B
HTML
Raw Normal View History

2017-01-06 18:48:32 +01:00
{% import "partials/i18n.html" as i18n %}
2016-09-23 11:56:25 +02:00
<nav class="md-nav md-nav--secondary">
2017-01-02 08:57:19 +01:00
{% set toc_ = page.toc %}
{% if "\x3ch1 id=" in page.content %}
2017-01-02 08:57:19 +01:00
{% set toc_ = (toc_ | first).children %}
2016-09-23 11:56:25 +02:00
{% endif %}
2017-01-02 08:57:19 +01:00
{% if toc_ and (toc_ | first) %}
2017-01-06 18:48:32 +01:00
<label class="md-nav__title" for="toc">{{ i18n.t('toc.title') }}</label>
2016-12-29 14:19:26 +01:00
<ul class="md-nav__list" data-md-scrollfix>
2017-01-02 08:57:19 +01:00
{% for toc_item in toc_ %}
2016-09-23 11:56:25 +02:00
{% include "partials/toc-item.html" %}
{% endfor %}
</ul>
{% endif %}
</nav>