Revert "cleanup and new navigation ideas"
This commit is contained in:
@ -1,40 +1,56 @@
|
||||
{% assign product = site.collections | where: "label", include.collection | first %}
|
||||
{% include custom/sidebarconfigs.html %}
|
||||
|
||||
<div class="col-md-3"> <!-- Sidebar Column -->
|
||||
<ul id="mysidebar" class="nav">
|
||||
<li class="sidebarTitle">
|
||||
{{ product.title }} {{ product.version }}
|
||||
</li>
|
||||
|
||||
{% for category in site.data.sub_navigation[product.label] %}
|
||||
{% assign items = product.docs | where: "category", category %}
|
||||
{% assign items = items | sort: 'weight' %}
|
||||
{% assign number_of_items = items | size %}
|
||||
{% if number_of_items > 0 %}
|
||||
<li>
|
||||
<a href="#">
|
||||
{{ category }}
|
||||
</a>
|
||||
<ul>
|
||||
{% for item in items %}
|
||||
<li {% if page.url == item.url %}class="active"{% endif %}>
|
||||
<a href="{{ item.url | prepend: site.baseurl }}">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<!-- if you aren't using the accordion, uncomment this block:
|
||||
<p class="external">
|
||||
<a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
|
||||
</p>
|
||||
-->
|
||||
</li>
|
||||
</ul>
|
||||
<ul id="mysidebar" class="nav">
|
||||
<li class="sidebarTitle">{{sidebar[0].product}} {{sidebar[0].version}}</li>
|
||||
{% for entry in sidebar %}
|
||||
{% for folder in entry.folders %}
|
||||
{% if folder.output contains "web" %}
|
||||
<li>
|
||||
<a href="#">{{ folder.title }}</a>
|
||||
<ul>
|
||||
{% for folderitem in folder.folderitems %}
|
||||
{% if folderitem.output contains "web" %}
|
||||
{% if folderitem.external_url %}
|
||||
<li><a href="{{folderitem.external_url}}" target="_blank">{{folderitem.title}}</a></li>
|
||||
{% elsif page.url == folderitem.url %}
|
||||
<li class="active"><a href="{{folderitem.url | prepend: site.baseurl}}">{{folderitem.title}}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{folderitem.url | prepend: site.baseurl}}">{{folderitem.title}}</a></li>
|
||||
{% endif %}
|
||||
{% for subfolders in folderitem.subfolders %}
|
||||
{% if subfolders.output contains "web" %}
|
||||
<li class="subfolders">
|
||||
<a href="#">{{ subfolders.title }}</a>
|
||||
<ul>
|
||||
{% for subfolderitem in subfolders.subfolderitems %}
|
||||
{% if subfolderitem.output contains "web" %}
|
||||
{% if subfolderitem.external_url %}
|
||||
<li><a href="{{subfolderitem.external_url}}" target="_blank">{{subfolderitem.title}}</a></li>
|
||||
{% elsif page.url == subfolderitem.url %}
|
||||
<li class="active"><a href="{{subfolderitem.url | prepend: site.baseurl}}">{{subfolderitem.title}}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{subfolderitem.url | prepend: site.baseurl}}">{{subfolderitem.title}}</a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<!-- if you aren't using the accordion, uncomment this block:
|
||||
<p class="external">
|
||||
<a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
|
||||
</p>
|
||||
-->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
|
||||
<script>$("li.active").parents('li').toggleClass("active");</script>
|
||||
<script>$("li.active").parents('li').toggleClass("active");</script>
|
Reference in New Issue
Block a user