forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar-guides.html
33 lines (33 loc) · 1.32 KB
/
sidebar-guides.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<ul class="sidebar-categories">
{% for category in product[1].categories %}
<li class="sidebar-category {% if breadcrumbs.category.href == category[1].href %}active{% endif %}">
<a href="{{category[1].href}}">{{ category[1].title }}</a>
<!-- some categories have topics with child articles -->
{% if category[1].maptopics %}
<ul class="sidebar-maptopics">
{% for maptopic in category[1].maptopics %}
<li class="sidebar-maptopic {% if breadcrumbs.maptopic.href == maptopic[1].href %}active{% endif %}">
<a href="{{maptopic[1].href}}">{{ maptopic[1].title }}</a>
<ul class="sidebar-articles">
{% for article in maptopic[1].articles %}
<li class="sidebar-article {% if currentPath == article[1].href %}active{% endif %}">
<a href="{{article[1].href}}">{{ article[1].title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
<!-- some categories have no maptopics, only articles -->
{% else %}
<ul class="sidebar-articles">
{% for article in category[1].articles %}
<li class="sidebar-article{% if currentPath == article[1].href %} active{% endif %}">
<a href="{{article[1].href}}">{{ article[1].title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>