1
1
{# loop through all navigation items #}
2
- {# if the current item has children #}
3
- {% if nav_item.children %}
4
- {# if the current item title does not start with _ #}
5
- {% if not nav_item.title.startswith("_") %}
2
+
3
+ {# if the current item title does not start with _ #}
4
+ {% if not nav_item.title.startswith("_") %}
5
+ {# if the current item has children #}
6
+ {% if nav_item.children %}
6
7
< ul class ="subnav ">
7
8
< li > < span > {{ nav_item.title }}</ span > </ li >
9
+ {# output children #}
8
10
{% for nav_item in nav_item.children %}
9
11
{% include 'toc.html' %}
10
12
{% endfor %}
11
13
</ ul >
12
- {# if current page title is _Tools #}
13
- {% elif nav_item.title == "_Tools" %}
14
- {% if current_page and current_page.title == "Tools" %}
15
- < ul class ="subnav ">
16
- {% for nav_item in nav_item.children %}
17
- {% include 'toc.html' %}
18
- {% endfor %}
19
- </ ul >
20
- {% else %}
21
- {% if current_page and current_page.ancestors %}
22
- {% for doc in current_page.ancestors %}
23
- {% if nav_item.title == doc.title %}
24
- < ul class ="subnav ">
25
- {% for nav_item in nav_item.children %}
26
- {% include 'toc.html' %}
27
- {% endfor %}
28
- </ ul >
29
- {% endif %}
30
- {% endfor %}
31
- {% endif %}
32
- {% endif %}
33
- {% endif %}
34
- {# if the current item does not have children #}
35
- {% else %}
36
- {# if the current item title does not start with _ #}
37
- {% if not nav_item.title.startswith("_") %}
14
+ {# if the current item does not have children #}
15
+ {% else %}
38
16
< li class ="toctree-l1
39
17
{# if current item is active #}
40
18
{% if nav_item.active %}current{% endif %}
61
39
</ li >
62
40
{% endif %}
63
41
{% endif %}
42
+
43
+ {# if current page title is _Tools #}
44
+ {% if nav_item.title == "_Tools" %}
45
+ {% if current_page and current_page.title == "Tools" %}
46
+ < ul class ="subnav ">
47
+ {% for nav_item in nav_item.children %}
48
+ {% include 'toc.html' %}
49
+ {% endfor %}
50
+ </ ul >
51
+ {% else %}
52
+ {% if current_page and current_page.ancestors %}
53
+ {% for doc in current_page.ancestors %}
54
+ {% if nav_item.title == doc.title %}
55
+ < ul class ="subnav ">
56
+ {% for nav_item in nav_item.children %}
57
+ {% include 'toc.html' %}
58
+ {% endfor %}
59
+ </ ul >
60
+ {% endif %}
61
+ {% endfor %}
62
+ {% endif %}
63
+ {% endif %}
64
+ {% endif %}
0 commit comments