2019-07-22 03:33:17 -04:00
|
|
|
<ul class="nav-list">
|
2020-06-15 15:23:03 -04:00
|
|
|
{%- assign ordered_pages_list = site.html_pages | where_exp:"item", "item.nav_order != nil" -%}
|
|
|
|
{%- assign unordered_pages_list = site.html_pages | where_exp:"item", "item.nav_order == nil" -%}
|
|
|
|
{%- if site.nav_sort == 'case_insensitive' -%}
|
|
|
|
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort_natural:"nav_order" -%}
|
|
|
|
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"title" -%}
|
|
|
|
{%- else -%}
|
|
|
|
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort:"nav_order" -%}
|
|
|
|
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- assign pages_list = sorted_ordered_pages_list | concat: sorted_unordered_pages_list -%}
|
2019-07-21 08:36:51 -04:00
|
|
|
{%- for node in pages_list -%}
|
|
|
|
{%- unless node.nav_exclude -%}
|
2020-06-15 15:23:03 -04:00
|
|
|
{%- if node.parent == nil and node.title -%}
|
2019-07-22 03:33:17 -04:00
|
|
|
<li class="nav-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
|
2019-07-21 08:36:51 -04:00
|
|
|
{%- if page.parent == node.title or page.grand_parent == node.title -%}
|
|
|
|
{%- assign first_level_url = node.url | absolute_url -%}
|
|
|
|
{%- endif -%}
|
2019-08-10 14:53:59 -04:00
|
|
|
{%- if node.has_children -%}
|
2019-12-01 09:51:48 -05:00
|
|
|
<a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
|
2019-08-10 14:53:59 -04:00
|
|
|
{%- endif -%}
|
2019-07-22 03:33:17 -04:00
|
|
|
<a href="{{ node.url | absolute_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
|
2019-07-21 08:36:51 -04:00
|
|
|
{%- if node.has_children -%}
|
2020-06-15 15:23:03 -04:00
|
|
|
{%- assign children_list = pages_list | where: "parent", node.title -%}
|
|
|
|
<ul class="nav-list ">
|
2019-07-21 08:36:51 -04:00
|
|
|
{%- for child in children_list -%}
|
2020-06-15 15:23:03 -04:00
|
|
|
{%- unless child.nav_exclude -%}
|
|
|
|
<li class="nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
|
|
|
|
{%- if page.url == child.url or page.parent == child.title -%}
|
|
|
|
{%- assign second_level_url = child.url | absolute_url -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- if child.has_children -%}
|
2020-06-15 16:06:16 -04:00
|
|
|
<a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
|
2020-06-15 15:23:03 -04:00
|
|
|
{%- endif -%}
|
|
|
|
<a href="{{ child.url | absolute_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
|
|
|
|
{%- if child.has_children -%}
|
|
|
|
{%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%}
|
|
|
|
<ul class="nav-list">
|
|
|
|
{%- for grand_child in grand_children_list -%}
|
|
|
|
<li class="nav-list-item {% if page.url == grand_child.url %} active{% endif %}">
|
|
|
|
<a href="{{ grand_child.url | absolute_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
|
|
|
|
</li>
|
|
|
|
{%- endfor -%}
|
|
|
|
</ul>
|
|
|
|
{%- endif -%}
|
|
|
|
</li>
|
|
|
|
{%- endunless -%}
|
2019-07-21 08:36:51 -04:00
|
|
|
{%- endfor -%}
|
|
|
|
</ul>
|
|
|
|
{%- endif -%}
|
|
|
|
</li>
|
|
|
|
{%- endif -%}
|
|
|
|
{%- endunless -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
</ul>
|