File: nav.html

package info (click to toggle)
python-mkdocs 1.4.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,640 kB
  • sloc: python: 12,310; javascript: 2,315; perl: 142; sh: 84; makefile: 24; xml: 12
file content (22 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<a class="{% if not nav_item.is_link %}reference internal{% endif %}{% if nav_item.active%} current{%endif%}" href="{% if not nav_item.is_section %}{{ nav_item.url|url }}{% else %}#{% endif %}">{{ nav_item.title }}</a>
{%- set navlevel = navlevel + 1 %}
{%- if navlevel <= config.theme.navigation_depth
    and ((nav_item.is_page and nav_item.toc.items
    and (not config.theme.titles_only
    and (nav_item == page or not config.theme.collapse_navigation)))
    or (nav_item.is_section and nav_item.children)) %}
    <ul{% if nav_item.active %} class="current"{% endif %}>
        {%- if nav_item.is_page %}
            {#- Skip first level of toc which is page title. #}
            {%- set toc_item = nav_item.toc.items[0] %}
            {%- include 'toc.html' %}
        {%- elif nav_item.is_section %}
            {%- for nav_item in nav_item.children %}
                <li class="toctree-l{{ navlevel }}{% if nav_item.active%} current{%endif%}">
                    {%- include 'nav.html' %}
                </li>
            {%- endfor %}
        {%- endif %}
    </ul>
{%- endif %}
{%- set navlevel = navlevel - 1 %}