parent
7d9667f13f
commit
c9dda7ad50
|
@ -2,7 +2,24 @@
|
|||
<aside>
|
||||
{% for section in site.data.docs_nav %}
|
||||
<h4>{{ section.title }}</h4>
|
||||
{% include docs_ul.html items=section.docs %}
|
||||
<ul>
|
||||
{% for item in section.docs %}
|
||||
{% assign p = site.documents | where: "url", item.link | first %}
|
||||
<li class="{% if p.url == '/docs/' %}
|
||||
{% if page.url == '/docs/' %}current{% endif %}
|
||||
{% else %}
|
||||
{% if page.url contains p.url %}current{% endif %}
|
||||
{% endif %}">
|
||||
<a href="{{ p.url }}">
|
||||
{% if p.menu_name %}
|
||||
{{ p.menu_name }}
|
||||
{% else %}
|
||||
{{ p.title }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</aside>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,16 @@
|
|||
<option value="">Navigate the docs…</option>
|
||||
{% for section in site.data.docs_nav %}
|
||||
<optgroup label="{{ section.title }}">
|
||||
{% include docs_option.html items=section.docs %}
|
||||
{% for item in section.docs %}
|
||||
{% assign p = site.documents | where: "url", item.link | first %}
|
||||
<option value="{{ p.url }}">
|
||||
{% if p.menu_name %}
|
||||
{{ p.menu_name }}
|
||||
{% else %}
|
||||
{{ p.title }}
|
||||
{% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{% for item in include.items %}
|
||||
{% assign p = site.documents | where: "url", item.link | first %}
|
||||
<option value="{{ p.url }}">
|
||||
{% if p.menu_name %}
|
||||
{{ p.menu_name }}
|
||||
{% else %}
|
||||
{{ p.title }}
|
||||
{% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
|
@ -1,18 +0,0 @@
|
|||
<ul>
|
||||
{% for item in include.items %}
|
||||
{% assign p = site.documents | where: "url", item.link | first %}
|
||||
<li class="{% if p.url == '/docs/' %}
|
||||
{% if page.url == '/docs/' %}current{% endif %}
|
||||
{% else %}
|
||||
{% if page.url contains p.url %}current{% endif %}
|
||||
{% endif %}">
|
||||
<a href="{{ p.url }}">
|
||||
{% if p.menu_name %}
|
||||
{{ p.menu_name }}
|
||||
{% else %}
|
||||
{{ p.title }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
Loading…
Reference in New Issue