-
Notifications
You must be signed in to change notification settings - Fork 1
/
nav.html
35 lines (34 loc) · 1.72 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
<nav class="navbar fixed-top d-flex align-items-center navbar-expand-lg navbar-dark bg-primary justify-content-between">
<div class="container">
<a class="d-flex align-items-center navbar-brand logo" href="{{ "/" | relative_url }}">
<img class="mr-3" src="{{ "/img/clair-cloud-white.svg" | relative_url }}"/>
{{ site.title }}
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
{% for item in site.data.nav.links %}
{% if item.submenu %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="{{ item.title | slugify }}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ item.title }}
</a>
<div class="dropdown-menu" aria-labelledby="{{ item.title | slugify }}">
{% for subitem in item.submenu %}
<a class="dropdown-item" href="{{ subitem.url | relative_url }}">{{ subitem.title }}</a>
{% endfor %}
</div>
</li>
{% else %}
<li class="nav-item{% if item.url == page.url %} active{% endif %}">
<a class="nav-link" href="{{ item.url | relative_url }}">{{ item.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
<a class="btn btn-outline-light mt-3 mt-lg-0 ml-0 ml-lg-3" href="{{ site.data.nav.login.url | relative_url }}">{{ site.data.nav.login.title }}</a>
</div>
</div>
</nav>