mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-28 09:20:52 +01:00
a42fdb33ed
* Fix ids not being unique enough in templates * Revert disqus id change
34 lines
1.3 KiB
HTML
34 lines
1.3 KiB
HTML
{% import "partials/language.html" as lang with context %}
|
|
<nav class="md-nav md-nav--secondary">
|
|
{% set toc_ = page.toc %}
|
|
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
|
|
{% set toc_ = (toc_ | first).children %}
|
|
{% endif %}
|
|
{% if toc_ | first is defined %}
|
|
<label class="md-nav__title" for="__toc">{{ lang.t("toc.title") }}</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
{% for toc_item in toc_ %}
|
|
{% include "partials/toc-item.html" %}
|
|
{% endfor %}
|
|
{% if page.meta.source and page.meta.source | length > 0 %}
|
|
<li class="md-nav__item">
|
|
<a href="#__source" title="{{ lang.t('meta.source') }}" class="md-nav__link md-nav__link--active">
|
|
{{ lang.t("meta.source") }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% set disqus = config.extra.disqus %}
|
|
{% if page and page.meta and page.meta.disqus is string %}
|
|
{% set disqus = page.meta.disqus %}
|
|
{% endif %}
|
|
{% if not page.is_homepage and disqus %}
|
|
<li class="md-nav__item">
|
|
<a href="#__comments" title="{{ lang.t('meta.comments') }}" class="md-nav__link md-nav__link--active">
|
|
{{ lang.t("meta.comments") }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
{% endif %}
|
|
</nav>
|