зеркало из https://github.com/Azure/AppService.git
70 строки
2.7 KiB
Plaintext
70 строки
2.7 KiB
Plaintext
{% assign navigation = site.data.navigation[include.nav] %}
|
|
|
|
<nav class="nav__list">
|
|
{% if page.sidebar.title %}<h3 class="nav__title" style="padding-left: 0;">{{ page.sidebar.title }}</h3>{% endif %}
|
|
<input id="ac-toc" name="accordion-toc" type="checkbox" />
|
|
<label for="ac-toc">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle Menu" }}</label>
|
|
<ul class="nav__items">
|
|
{% for nav in navigation %}
|
|
<li>
|
|
{% if nav.url %}
|
|
{% comment %} internal/external URL check {% endcomment %}
|
|
{% if nav.url contains "://" %}
|
|
{% assign nav_url = nav.url %}
|
|
{% else %}
|
|
{% assign nav_url = nav.url | relative_url %}
|
|
{% endif %}
|
|
|
|
<a href="{{ nav_url }}"><span class="nav__sub-title">{{ nav.title }}</span></a>
|
|
{% else %}
|
|
<span class="nav__sub-title">{{ nav.title }}</span>
|
|
{% endif %}
|
|
|
|
{% if nav.children != null %}
|
|
<ul>
|
|
{% for child in nav.children %}
|
|
{% comment %} internal/external URL check {% endcomment %}
|
|
{% if child.url contains "://" %}
|
|
{% assign child_url = child.url %}
|
|
{% else %}
|
|
{% assign child_url = child.url | relative_url %}
|
|
{% endif %}
|
|
|
|
{% comment %} set "active" class on current page {% endcomment %}
|
|
{% if child.url == page.url %}
|
|
{% assign active = "active" %}
|
|
{% else %}
|
|
{% assign active = "" %}
|
|
{% endif %}
|
|
|
|
<li>
|
|
<a href="{{ child_url }}" class="{{ active }}">{{ child.title }}</a>
|
|
{% if child.children != null %}
|
|
{% include nav_list_items parent=child %}
|
|
{% for child in child.children %}
|
|
{% comment %} internal/external URL check {% endcomment %}
|
|
{% if child.url contains "://" %}
|
|
{% assign child_url = child.url %}
|
|
{% else %}
|
|
{% assign child_url = child.url | relative_url %}
|
|
{% endif %}
|
|
|
|
{% comment %} set "active" class on current page {% endcomment %}
|
|
{% if child.url == page.url %}
|
|
{% assign active = "active" %}
|
|
{% else %}
|
|
{% assign active = "" %}
|
|
{% endif %}
|
|
<ul>
|
|
<li style="padding-left: 6px;"><a href="{{ child_url }}" class="{{ active }}">{{ child.title }}</a></li>
|
|
</ul>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</nav> |