mirror of
https://github.com/thangisme/notes.git
synced 2024-11-18 01:46:28 -05:00
Merge pull request #188 from pdmosses/master
Update nav.html to eliminate generation of undisplayed elements
This commit is contained in:
commit
d3cbc83285
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
||||
_site
|
||||
Gemfile.lock
|
||||
node_modules
|
||||
.jekyll-metadata
|
||||
|
@ -10,6 +10,7 @@
|
||||
{%- endif -%}
|
||||
<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 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" -%}
|
||||
<ul class="navigation-list-child-list ">
|
||||
{%- for child in children_list -%}
|
||||
@ -19,6 +20,7 @@
|
||||
{%- endif -%}
|
||||
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
|
||||
{%- if child.has_children -%}
|
||||
{%- if page.url == child.url or page.parent == child.title -%}
|
||||
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
|
||||
<ul class="navigation-list-child-list">
|
||||
{%- for grand_child in grand_children_list -%}
|
||||
@ -28,10 +30,12 @@
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
</li>
|
||||
{%- endif -%}
|
||||
{%- endunless -%}
|
||||
|
Loading…
Reference in New Issue
Block a user