-
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.
- Loading branch information
Showing
2 changed files
with
27 additions
and
70 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,71 +1,13 @@ | ||
<ul class="nav-list"> | ||
<ul class="nav-list"> | ||
{% 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 %} | ||
{% for nav in navlist %} | ||
{% if nav.subcategories != null %} | ||
{% assign current_parent = nav.subcategories | where:"page", page.path | size %} | ||
{% if current_parent != 0 %} | ||
{% assign classlist = "active" %} | ||
{% else %} | ||
{% assign classlist = "" %} | ||
{% endif %} | ||
<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></a> | ||
{% if nav.page %} | ||
<a class="nav-list-link" | ||
href="{% link {{ nav.page }} %}">{{ nav.title }}</a> | ||
{% else %} | ||
<a class="nav-list-link" | ||
href="#">{{ nav.title }}</a> | ||
{% endif %} | ||
<ul class="nav-list "> | ||
{% for subcategory in nav.subcategories %} | ||
{% if page.path == subcategory.page %} | ||
{% assign classlist = "active" %} | ||
{% else %} | ||
{% assign classlist = "" %} | ||
{% endif %} | ||
<li class="nav-list-item"> | ||
<a class="nav-list-link {{ classlist }}" | ||
href="{% link {{ subcategory.page }} %}">{{ subcategory.subtitle }}</a> | ||
{% if subcategory.subcategories != null %} | ||
<ul class="nav-list "> | ||
{% for subsubcategory in subcategory.subcategories %} | ||
{% if page.path == subsubcategory.page %} | ||
{% assign classlist = "active" %} | ||
{% else %} | ||
{% assign classlist = "" %} | ||
{% endif %} | ||
<li class="nav-list-item"> | ||
<a class="nav-list-link {{ classlist }}" | ||
href="{% link {{ subsubcategory.page }} %}">{{ subsubcategory.subtitle }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</li> | ||
{% else %} | ||
{% if page.path == nav.page %} | ||
{% assign classlist = "active" %} | ||
{% else %} | ||
{% assign classlist = "" %} | ||
{% endif %} | ||
<li class="nav-list-item"> | ||
<a class="nav-list-link {{classlist}}" | ||
href="{% link {{ nav.page }} %}">{{ nav.title }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% 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 %} | ||
|
||
{% for nav in navlist %} | ||
{% include nav_item.html item=nav %} | ||
{% endfor %} | ||
</ul> |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<li class="nav-list-item {% if page.path == include.item.page %}active{% endif %}"> | ||
{% if include.item.page %} | ||
<a class="nav-list-link" href="{% link {{ include.item.page }} %}">{{ include.item.title }}</a> | ||
{% else %} | ||
<span class="nav-list-link">{{ include.item.title }}</span> | ||
{% endif %} | ||
|
||
{% if include.item.subcategories %} | ||
<ul class="nav-list"> | ||
{% for subcategory in include.item.subcategories %} | ||
{% include nav_item.html item=subcategory %} | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</li> |