a new start
This commit is contained in:
41
_includes/body/nav.html
Normal file
41
_includes/body/nav.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<span class="sr-only">{{ site.data.strings.navigation | default:"Navigation" }}{{ site.data.strings.colon | default:":" }}</span>
|
||||
<ul>
|
||||
{% if site.menu %}
|
||||
{% for node in site.menu %}
|
||||
{% assign url = node.url | default: node.href %}
|
||||
<li>
|
||||
<a
|
||||
{% if forloop.first %}id="_drawer--opened"{% endif %}
|
||||
href="{% include_cached smart-url url=url %}"
|
||||
class="sidebar-nav-item {% if node.external %}external{% endif %}"
|
||||
{% if node.rel %}rel="{{ node.rel }}"{% endif %}
|
||||
>
|
||||
{{ node.name | default:node.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% assign pages = site.html_pages | where: "menu", true %}
|
||||
{% assign documents = site.documents | where: "menu", true %}
|
||||
{% assign nodes = pages | concat: documents | sort: "order" %}
|
||||
|
||||
{% for node in nodes %}
|
||||
{% unless node.redirect_to %}
|
||||
<li>
|
||||
<a
|
||||
{% if forloop.first %}id="_navigation"{% endif %}
|
||||
href="{{ node.url | relative_url }}"
|
||||
class="sidebar-nav-item"
|
||||
{% if node.rel %}rel="{{ node.rel }}"{% endif %}
|
||||
>
|
||||
{{ node.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="{{ node.redirect_to }}" class="sidebar-nav-item external">{{ node.title }}</a>
|
||||
</li>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
Reference in New Issue
Block a user