Expand on nav_list styles

- Consolidate SCSS partials
This commit is contained in:
Michael Rose
2016-03-25 14:50:59 -04:00
parent 9b964a90e3
commit 0d8a76857f
8 changed files with 98 additions and 65 deletions
+24
View File
@@ -0,0 +1,24 @@
{% include base_path %}
{% assign navigation = site.data.navigation[page.sidebar.nav] %}
<nav class="nav__list">
<ul>
{% for nav in navigation %}
<li><span class="nav__sub-title">{{ nav.title }}</span>
{% if nav.children != null %}
<ul>
{% for child in nav.children %}
{% assign nav_url = child.path | prepend: "/" | prepend: page.sidebar.nav | prepend: "/" | append: "/" | prepend: base_path %}
{% if nav_url contains page.url %}
{% assign active = "active" %}
{% else %}
{% assign active = "" %}
{% endif %}
<li><a href="{{ nav_url }}" class="{{ active }}">{{ child.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>