azure-sdk/_includes/sidebar.html

44 строки
2.2 KiB
HTML

{% assign sidebar = site.data.sidebars[page.sidebar].entries %}
<ul id="mysidebar" class="nav">
<li class="sidebarTitle">{{sidebar[0].product}} {{sidebar[0].version}}</li>
{% for entry in sidebar %}
{% for folder in entry.folders %}
<li>
<a title="{{folder.title}}" href="#">{{folder.title}}</a>
<ul>
{% for folderitem in folder.folderitems %}
{% if folderitem.external_url %}
<li><a title="{{folderitem.title}}" href="{{folderitem.external_url}}" target="_blank" rel="noopener">{{folderitem.title}}</a></li>
{% elsif page.url == folderitem.url %}
<li class="active"><a title="{{folderitem.title}}" href="{{folderitem.url | relative_url }}">{{folderitem.title}}</a></li>
{% elsif folderitem.type == "empty" %}
<li><a title="{{folderitem.title}}" href="{{folderitem.url | relative_url }}">{{folderitem.title}}</a></li>
{% else %}
<li><a title="{{folderitem.title}}" href="{{folderitem.url | relative_url }}">{{folderitem.title}}</a></li>
{% endif %}
{% for subfolders in folderitem.subfolders %}
<li class="subfolders">
<a title="{{subfolders.title}}" href="#">{{ subfolders.title }}</a>
<ul>
{% for subfolderitem in subfolders.subfolderitems %}
{% if subfolderitem.external_url %}
<li><a title="{{subfolderitem.title}}" href="{{subfolderitem.external_url}}" target="_blank" rel="noopener">{{subfolderitem.title}}</a></li>
{% elsif page.url == subfolderitem.url %}
<li class="active"><a title="{{subfolderitem.title}}" href="{{subfolderitem.url | relative_url }}">{{subfolderitem.title}}</a></li>
{% else %}
<li><a title="{{subfolderitem.title}}" href="{{subfolderitem.url | relative_url }}">{{subfolderitem.title}}</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endfor %}
{% endfor %}
</ul>
</li>
{% endfor %}
{% endfor %}
</ul>
<script>$("li.active").parents('li').toggleClass("active");</script>