1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00
nerd-fonts/_includes/topnav.html
2019-07-25 14:26:26 -07:00

30 lines
1.0 KiB
HTML

<nav><ul>
{% for node in site.posts reversed %}
{% if node.page == page.page and (page.page != nil or node.id == '/home') %}
{% assign active = 'active' %}
{% else %}
{% assign active = '' %}
{% endif %}
{% capture id %}{{ node.id | remove:'/' | downcase }}{% endcapture %}
<li class="p-{{id}} hide-on-larger-view {{active}}">
{% if node.page %}
<a href="/{{node.page}}">
{% elsif page.page %}
<a href="/#{{id}}">
{% else %}
<a href="#{{id}}">
{% endif %}
<i class="nf nf-fa-{{ node.fa-icon }}"></i> {{node.short_title}}</a>
</li>
<li class="p-{{id}} hide-on-smaller-view {{active}}">
{% if node.page %}
<a href="/{{node.page}}">
{% elsif page.page %}
<a href="/#{{id}}">
{% else %}
<a href="#{{id}}">
{% endif %}
<i class="nf nf-fa-{{ node.fa-icon }}"></i> {{node.title}}</a>
</li>
{% endfor %}
</ul></nav>