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

30 lines
1.0 KiB
HTML
Raw Normal View History

2019-07-23 23:36:00 +02:00
<nav><ul>
{% for node in site.posts reversed %}
2019-07-25 23:26:26 +02:00
{% if node.page == page.page and (page.page != nil or node.id == '/home') %}
2019-07-23 23:36:00 +02:00
{% assign active = 'active' %}
{% else %}
{% assign active = '' %}
2019-07-25 23:26:26 +02:00
{% endif %}
2019-07-23 23:36:00 +02:00
{% 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 %}
2019-07-25 23:23:49 +02:00
<i class="nf nf-fa-{{ node.fa-icon }}"></i> {{node.short_title}}</a>
2019-07-23 23:36:00 +02:00
</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 %}
2019-07-25 23:23:49 +02:00
<i class="nf nf-fa-{{ node.fa-icon }}"></i> {{node.title}}</a>
2019-07-23 23:36:00 +02:00
</li>
{% endfor %}
</ul></nav>