-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnav.html
executable file
·50 lines (48 loc) · 1.7 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{% comment %}
Displays the site's navigation using the jekyll-menus plugin
{% endcomment %}
{% assign url = page.url | remove:'index.html' %}
<header class="site-header">
<div class="container">
<h1 class="logo">
<a href="{{ "/" | absolute_url }}">{{ site.name }}</a>
</h1>
<nav class="main-nav">
<ul class="navigation">
{% for link in site.menus.navigation %}
<li class="{% if link.children %}nested {% endif %}{% if url == link.url %}current{% endif %}">
{% if link.children %}
<ul class="first-level">
{% for child in link.children %}
<li>
{% if child.children %}
<ul class="second-level">
{% for child in child.children %}
<li>
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
<a href="{{ child.url | absolute_url }}"{% if child.target %} target="_blank" {% endif %}>
{{ child.title }}
{% if child.childen %}
<i class='icon-right-dir-2'></i>
{% endif %}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
<a href="{{ link.url | absolute_url }}"{% if link.target %} target="_blank" {% endif %}>
{{ link.title }}
{% if link.childen %}
<i class='icon-chevron-down'></i>
{% endif %}
</a>
</li>
{% endfor %}
</ul>
</nav>
</div>
</header>