-
Notifications
You must be signed in to change notification settings - Fork 1
/
navbar.html
46 lines (46 loc) · 2.16 KB
/
navbar.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
<nav id="header_bar" class="navbar sticky-top navbar-expand-lg navbar-dark">
<div class="container-fluid">
<a class="navbar-brand short" href="{{ site.url }}"><i class="fas fa-home"></i> {{site.name_short}}</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
{%- for menu in site.data.topnavigation -%}
{%- if menu.nav_items -%}
{%- assign nav_items = menu.nav_items -%}
{%- assign linkclass = "dropdown-item" -%}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown-{{menu.groupId}}" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ menu.title }}</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown-{{menu.groupId}}">
{%- else -%}
{%- assign nav_items = "" | split: "," -%}
{%- assign nav_items = nav_items | push: menu -%}
{%- assign linkclass = "nav-link" -%}
{%- assign listclass = "nav-item" -%}
{%- endif -%}
{%- for item in nav_items -%}
{%- include common/navbar_item.html item=item -%}
{%- for subitem in item.nav_items -%}
{%- include common/navbar_item.html item=subitem itemclass="sublevel" -%}
{%- endfor -%}
{%- endfor -%}
{%- if menu.nav_items -%}
</ul>
</li>
{%- endif -%}
{%- endfor -%}
</ul>
<div class="d-flex">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="https://github.com/{{ site.repository }}/"><i class="fab fa-github"></i> GitHub</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://ym.fi/ryhti">Ryhti-hanke</a>
</li>
</ul>
</div>
</div>
</div>
</nav>