{#
  Material for MkDocs Jinja2 template:
  https://github.com/squidfunk/mkdocs-material/blob/9.4.8/src/templates/partials/nav.html
#}

{% import "partials/nav-item.html" as item with context %}

<!-- Determine classes -->
{% set class = "md-nav md-nav--primary" %}
{% if "navigation.tabs" in features %}
  {% set class = class ~ " md-nav--lifted" %}
{% endif %}
{% if "toc.integrate" in features %}
  {% set class = class ~ " md-nav--integrated" %}
{% endif %}

<!-- Navigation -->
<nav class="{{ class }}" aria-label="{{ lang.t('nav') }}" data-md-level="0">

  <h2 class="md-nav__custom-title">Содержание</h2>

  <!-- Navigation list -->
  <ul class="md-nav__list" data-md-scrollfix>
    {% for nav_item in nav %}
      {% set path = "__nav_" ~ loop.index %}
      {{ item.render(nav_item, path, 1) }}
    {% endfor %}
  </ul>
</nav>
