forked from raviriley/agency-jekyll-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nav.html
67 lines (67 loc) · 2.15 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!-- Navigation -->
<nav
class="navbar navbar-expand-lg navbar-dark fixed-top"
id="mainNav"
style="background-color: #212529"
>
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="{{ site.baseurl }}/#">
{%- if site.logo -%}
<img
height="{{ site.logo.height | default: 52 }}"
src="{{ site.logo.path }}"
/>
{%- else -%} {{ site.title }} {%- endif -%}
</a>
<button
class="navbar-toggler navbar-toggler-right"
type="button"
data-toggle="collapse"
data-target="#navbarResponsive"
aria-controls="navbarResponsive"
aria-expanded="false"
aria-label="Toggle navigation"
>
Menu<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav text-uppercase ml-auto">
{% if site.locale and site.locale != "" and site.locale != nil %} {%-
for link in site.data.navigation[site.locale].nav -%}
<li class="nav-item">
{%- if link.url -%}
<a class="nav-link js-scroll-trigger" href="{{ link.url }}"
>{{ link.title }}</a
>
{%- elsif link.section -%}
<a
class="nav-link js-scroll-trigger"
href="{{ site.baseurl }}/#{{ link.section }}"
>{{ link.title }}</a
>
{%- else -%}
<a class="nav-link js-scroll-trigger" href="#">{{ link.title }}</a>
{%- endif -%}
</li>
{%- endfor -%} {% else %} {%- for link in site.data.navigation.nav -%}
<li class="nav-item">
{%- if link.url -%}
<a class="nav-link js-scroll-trigger" href="{{ link.url }}"
>{{ link.title }}</a
>
{%- elsif link.section -%}
<a
class="nav-link js-scroll-trigger"
href="{{ site.baseurl }}/#{{ link.section }}"
>{{ link.title }}</a
>
{%- else -%}
<a class="nav-link js-scroll-trigger" href="#">{{ link.title }}</a>
{%- endif -%}
</li>
{%- endfor -%} {% endif %}
</ul>
</div>
</div>
</nav>
<!-- End Navigation -->