47 lines
1.2 KiB
HTML
47 lines
1.2 KiB
HTML
{% if config.extra.nav.links %}
|
|
<header id="site-nav">
|
|
<nav>
|
|
<a href="#main" id="main-content" tabindex="0">Skip to main content</a>
|
|
<ul>
|
|
<li id="home">
|
|
<a href="{{ get_url(path='/') | safe }}"
|
|
{% if current_url | default(value='/') | trim_end_matches(pat='/') | safe == get_url(path='/') | safe %}
|
|
class="active"
|
|
{% endif %}>
|
|
{{ config.title }}
|
|
</a>
|
|
</li>
|
|
{% for link in config.extra.nav.links %}
|
|
{%- if link.url is matching('https?://') %}
|
|
<li class="link">
|
|
<a href="{{ link.url | safe }}"
|
|
{% if current_url | default(value='/') | safe == link.url | safe %}
|
|
class="active"
|
|
{% endif %}>
|
|
{{ link.name }}
|
|
</a>
|
|
</li>
|
|
{%- else %}
|
|
<li class="link">
|
|
<a href="{{ get_url(path=link.url | safe )}}"
|
|
{% if current_url | default(value='/') | safe == get_url(path=link.url) | safe %}
|
|
class="active"
|
|
{% endif %}>
|
|
{{ link.name }}
|
|
</a>
|
|
</li>
|
|
{%- endif %}
|
|
{% endfor %}
|
|
{% if config.extra.nav.show_feed %}
|
|
<li id="feed">
|
|
<a href="{{ get_url(path=config.feed_filename) | safe }}">
|
|
<i class="icon"></i>
|
|
<span>Feed</span>
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
</header>
|
|
{% endif %}
|