2016-03-25 19:12:03 +01:00
|
|
|
{% include base_path %}
|
|
|
|
{% assign navigation = site.data.navigation[page.sidebar.nav] %}
|
|
|
|
|
2016-03-25 19:50:59 +01:00
|
|
|
<nav class="nav__list">
|
2016-04-12 18:04:16 +02:00
|
|
|
{% if page.sidebar.title %}<header><h4 class="nav__title" style="padding: 0;">{{ page.sidebar.title }}</h4></header>{% endif %}
|
2016-03-25 19:12:03 +01:00
|
|
|
<ul>
|
|
|
|
{% for nav in navigation %}
|
2016-03-25 19:50:59 +01:00
|
|
|
<li><span class="nav__sub-title">{{ nav.title }}</span>
|
2016-03-25 19:12:03 +01:00
|
|
|
{% if nav.children != null %}
|
|
|
|
<ul>
|
|
|
|
{% for child in nav.children %}
|
2016-03-26 01:57:52 +01:00
|
|
|
{% assign nav_url = child.path | prepend: "/" | prepend: page.sidebar.nav | prepend: "/" | append: "/" %}
|
|
|
|
{% if nav_url == page.url %}
|
2016-03-25 19:50:59 +01:00
|
|
|
{% assign active = "active" %}
|
2016-03-25 19:12:03 +01:00
|
|
|
{% else %}
|
2016-03-25 19:50:59 +01:00
|
|
|
{% assign active = "" %}
|
2016-03-25 19:12:03 +01:00
|
|
|
{% endif %}
|
2016-03-26 01:57:52 +01:00
|
|
|
<li><a href="{{ nav_url | prepend: base_path }}" class="{{ active }}">{{ child.title }}</a></li>
|
2016-03-25 19:12:03 +01:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</nav>
|