-
Notifications
You must be signed in to change notification settings - Fork 0
/
_nav.html
33 lines (32 loc) · 1.29 KB
/
_nav.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
<nav id="header" role="navigation">
<div class="container-fluid">
<div class="row">
<div id="logo" class="col-sm-4">
<img src="http://via.placeholder.com/328x70" alt="TODO">
</div>
<div id="navigation" class="col-sm-8">
<ul>
{% for child in site.root_nav_pages %}
{% if child.leaf? or child.nav_children.size == 0 %}
<li {% if child.is_or_is_ancestor_of_current_page? %}class="active"{% endif %}>
<a href="{{ child.url }}">{{ child.name }}</a>
</li>
{% else %}
<li class="{% if child.is_or_is_ancestor_of_current_page? %}active{% endif %} dropdown">
<a href="{{ child.url }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{{ child.name }} <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
{% if site.show_parent_in_nav_dropdown? %}
<li><a href="{{ child.url }}">{{ child.name }}</a></li>
{% endif %}
{% for child2 in child.nav_children %}
<li><a href="{{ child2.url }}">{{ child2.name }}</a></li>
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
</nav>