forked from p2pu/course-in-a-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
navigation.html
26 lines (24 loc) · 1.03 KB
/
navigation.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
<!-- Navigation -->
<nav class="navbar navbar-expand-md py-0 .navbar-dark bg-dark text-light">
<a class="navbar-brand" href="{{site.baseurl}}/"><i class="fa fa-home"></i></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="fa fa-bars"></i>
</button>
<div class="navbar-collapse collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
{% for module in site.data.course.modules %}
{% assign first_post = site.categories[module]|reverse|first %}
<li class="nav-item py-2{% if page.categories[1] == module %} active{% endif %}">
<a class="nav-link" href="{{ site.baseurl }}{{ first_post.url }}">
{{ module }}
</a>
</li>
{% endfor %}
<!--
<li class="nav-item py-2">
<a class="nav-link" href="https://www.p2pu.org/en/" target="_blank">Example Link</a>
</li>
-->
</ul>
</div>
</nav>