mkdocs-material/material/partials/toc.html

16 lines
502 B
HTML
Raw Permalink Normal View History

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