Expand on nav_list styles
- Consolidate SCSS partials
This commit is contained in:
@ -1,20 +1,20 @@
|
||||
{% include base_path %}
|
||||
{% assign navigation = site.data.navigation[page.sidebar.nav] %}
|
||||
|
||||
<nav>
|
||||
<nav class="nav__list">
|
||||
<ul>
|
||||
{% for nav in navigation %}
|
||||
<li>{{ nav.title }}
|
||||
<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 c = "current" %}
|
||||
{% assign active = "active" %}
|
||||
{% else %}
|
||||
{% assign c = "" %}
|
||||
{% assign active = "" %}
|
||||
{% endif %}
|
||||
<li><a href="{{ nav_url }}" class="{{ c }}">{{ child.title }}</a></li>
|
||||
<li><a href="{{ nav_url }}" class="{{ active }}">{{ child.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
@ -16,7 +16,7 @@
|
||||
{% if s.text %}{{ s.text | markdownify }}{% endif %}
|
||||
{% endfor %}
|
||||
{% if page.sidebar.nav %}
|
||||
{% include nav_list.html items=page.sidebar.nav %}
|
||||
{% include nav_list items=page.sidebar.nav %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<aside class="sidebar__right">
|
||||
<nav class="toc" markdown="1">
|
||||
<header><h4 class="toc__title"><i class="fa fa-{{ include.icon | default: 'book' }}"></i> {{ include.title | default: site.data.ui-text[site.locale].toc_label }}</h4></header>
|
||||
<header><h4 class="nav__title"><i class="fa fa-{{ include.icon | default: 'book' }}"></i> {{ include.title | default: site.data.ui-text[site.locale].toc_label }}</h4></header>
|
||||
* Auto generated table of contents
|
||||
{:toc .toc__menu}
|
||||
</nav>
|
||||
|
Reference in New Issue
Block a user