-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.html
More file actions
27 lines (24 loc) · 1.11 KB
/
header.html
File metadata and controls
27 lines (24 loc) · 1.11 KB
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
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
{% assign default_paths = site.pages | sort: "order" | map: "path" %}
{% assign page_paths = site.header_pages | default: default_paths %}
<a class="navbar-brand" href="{{ "/" | relative_url }}">
<img src="/assets/images/logo.png" class="logo" style="width: 200px;"/>
</a>
{% if page_paths %}
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav ml-auto">
{% for path in page_paths %}
{% assign my_page = site.pages | where: "path", path | first %}
{% if my_page.title %}
<li class="nav-item active">
<a class="nav-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
</nav>