-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removing unsupported nav tags from nav.html
- Loading branch information
Showing
1 changed file
with
48 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,54 @@ | ||
<ul class="nav-list"> | ||
{% for nav in navlist %} | ||
{% assign has_children = nav.subcategories | default: nav.children %} | ||
{% assign active_class = "" %} | ||
{% if page.path == nav.page %} | ||
{% assign active_class = "active" %} | ||
{% if page.sidebar == "core" %} | ||
{% assign navlist = site.data.navcore %} | ||
{% elsif page.sidebar == "sql" %} | ||
{% assign navlist = site.data.navsql %} | ||
{% else %} | ||
{% assign navlist = site.data.nav %} | ||
{% endif %} | ||
|
||
<li class="nav-list-item {{ active_class }}"> | ||
{% if has_children %} | ||
{% for nav in navlist %} | ||
{% assign has_subcategories = nav.subcategories != null %} | ||
{% assign current_parent = has_subcategories and nav.subcategories | where:"page", page.path | size %} | ||
{% assign classlist = current_parent != 0 ? "active" : "" %} | ||
<li class="nav-list-item {{classlist}}"> | ||
<a href="#" class="nav-list-expander"> | ||
<svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg> | ||
<svg viewBox="0 0 24 24"> | ||
<use xlink:href="#svg-arrow-right"></use> | ||
</svg> | ||
</a> | ||
{% endif %} | ||
|
||
<a class="nav-list-link" href="{% link {{ nav.page }} %}">{{ nav.title }}</a> | ||
|
||
{% if has_children %} | ||
{% render_nav has_children %} | ||
{% endif %} | ||
<a class="nav-list-link" href="{% link {{ nav.page }} %}">{{ nav.title }}</a> | ||
{% if has_subcategories %} | ||
<ul class="nav-list "> | ||
{% for subcategory in nav.subcategories %} | ||
{% assign has_sub_subcategories = subcategory.subcategories != null %} | ||
{% assign current_sub_parent = has_sub_subcategories and subcategory.subcategories | where:"page", page.path | size %} | ||
{% assign sub_classlist = current_sub_parent != 0 ? "active" : "" %} | ||
<li class="nav-list-item {{sub_classlist}}"> | ||
<a href="#" class="nav-list-expander"> | ||
<svg viewBox="0 0 24 24"> | ||
<use xlink:href="#svg-arrow-right"></use> | ||
</svg> | ||
</a> | ||
<a class="nav-list-link {{ sub_classlist }}" href="{% link {{ subcategory.page }} %}">{{ subcategory.subtitle }}</a> | ||
{% if has_sub_subcategories %} | ||
<ul class="nav-list "> | ||
{% for sub_subcategory in subcategory.subcategories %} | ||
<li class="nav-list-item"> | ||
<a class="nav-list-link" href="{% link {{ sub_subcategory.page }} %}">{{ sub_subcategory.subtitle }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
{% else %} | ||
{% assign classlist = page.path == nav.page ? "active" : "" %} | ||
<li class="nav-list-item"> | ||
<a class="nav-list-link {{classlist}}" href="{% link {{ nav.page }} %}">{{ nav.title }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> |