-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy pathdocs_nav.html
22 lines (22 loc) · 1006 Bytes
/
docs_nav.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
{% for section in site.data.docs %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-{{forloop.index}}" aria-expanded="false" aria-controls="collapse-{{forloop.index}}">
{{ section.title }}
</a>
</h4>
</div>
<div id="collapse-{{forloop.index}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<ul class="list-group">
{% for item in section.docs %}
{% assign item_url = item | prepend:"/docs/" | append:"/" %}
{% assign p = site.docs | where:"url", item_url | first %}
<a class="list-group-item {% if item_url == page.url %}active{% endif %}" href="{{ p.url | prepend: site.baseurl }}">{{ p.title }}</a>
{% endfor %}
</ul>
</div>
</div>
{% endfor %}
</div>