mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-16 08:02:24 -06:00
Update nav.html
A `navigation-list-child-list` is not displayed unless the enclosing `navigation-list-item` is `active`, so it needs to be generated only when `page.url == node.url or page.parent == node.title or page.grand_parent == node.title`.
This commit is contained in:
parent
418cf1d640
commit
0cfc0f0357
@ -10,6 +10,7 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
|
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
|
||||||
{%- if node.has_children -%}
|
{%- if node.has_children -%}
|
||||||
|
{%- if page.url == node.url or page.parent == node.title or page.grand_parent == node.title -%}
|
||||||
{%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
|
{%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
|
||||||
<ul class="navigation-list-child-list ">
|
<ul class="navigation-list-child-list ">
|
||||||
{%- for child in children_list -%}
|
{%- for child in children_list -%}
|
||||||
@ -32,6 +33,7 @@
|
|||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
</li>
|
</li>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endunless -%}
|
{%- endunless -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user