main
html 34 lines 1.47 KB
Raw
1 <!-- Material nav.html (https://github.com/squidfunk/mkdocs-material/blob/9.7.7/material/templates/partials/nav.html) with navigation.prune applied to the API reference only -->
2 {% import "partials/nav-item.html" as item with context %}
3 {% set features = features + ["navigation.prune"] %}
4 {% import "partials/nav-item.html" as pruned_item with context %}
5 {% set class = "md-nav md-nav--primary" %}
6 {% if "navigation.tabs" in features %}
7 {% set class = class ~ " md-nav--lifted" %}
8 {% endif %}
9 {% if "toc.integrate" in features %}
10 {% set class = class ~ " md-nav--integrated" %}
11 {% endif %}
12 <nav class="{{ class }}" aria-label="{{ lang.t('nav') }}" data-md-level="0">
13 <label class="md-nav__title" for="__drawer">
14 <a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-nav__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
15 {% include "partials/logo.html" %}
16 </a>
17 {{ config.site_name }}
18 </label>
19 {% if config.repo_url %}
20 <div class="md-nav__source">
21 {% include "partials/source.html" %}
22 </div>
23 {% endif %}
24 <ul class="md-nav__list" data-md-scrollfix>
25 {% for nav_item in nav.items %}
26 {% set path = "__nav_" ~ loop.index %}
27 {% if nav_item.children and (nav_item.children | first).url == "api/" %}
28 {{ pruned_item.render(nav_item, path, 1) }}
29 {% else %}
30 {{ item.render(nav_item, path, 1) }}
31 {% endif %}
32 {% endfor %}
33 </ul>
34 </nav>