glados.no/_includes/structure/nav.html

26 lines
1.3 KiB
HTML

<nav class="navbar navbar-expand-lg navbar-dark bg-dark justify-content-between" id="navbarTop">
<div class="container">
<a class="navbar-brand" href="{{ '/' | relative_url }}">
<img src="{{ "/assets/" | relative_url }}{{ site.logo }}" style="padding-right: 0.1rem; height: 1.875rem; width: 1.875rem;" class="d-inline-block align-top" alt="" loading="lazy">
{{ site.title }}
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMain" aria-controls="navbarMain" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarMain">
<div class="navbar-nav"><!--ml-auto for høyrejustering-->
<!--<a class="nav-item nav-link {% if page.url == '/' %}active{% endif %}" href="/">Hjem</a>-->
{% for entry in site.data.nav %}
<a class="nav-item nav-link {% if page.url contains entry.href and page.url != / %}active{% endif %}" href="{{ entry.href }}">{{ entry.title }}</a>
{% endfor %}
</div>
<div class="navbar-nav ml-auto">
{% for entry in site.data.nav-links %}
<a class="nav-item nav-link " href="{{ entry.href }}">
<i alt="{{ entry.title }}" style="font-size: 1.2rem;" class="fab {{ entry.logo }}"></i>
</a>
{% endfor %}
</div>
</div>
</div>
</nav>