Updated the header
- added a logo placeholder - added an active class to the navigation item if the respected page is active
This commit is contained in:
parent
abcc738ee4
commit
9e5ba8583b
|
@ -1,11 +1,14 @@
|
||||||
{% set navItems = collections.all | eleventyNavigation %}
|
{% set navItems = collections.all | eleventyNavigation %}
|
||||||
<header role="banner">
|
<header role="banner">
|
||||||
|
<div class="logo">
|
||||||
|
<span>My blog</span>
|
||||||
|
</div>
|
||||||
<nav role="navigation" aria-label="main navigation" >
|
<nav role="navigation" aria-label="main navigation" >
|
||||||
<ul>
|
<ul>
|
||||||
{%- for item in navItems %}
|
{%- for item in navItems %}
|
||||||
<li>
|
<li class="nav__item{{ ' active' if page.url === item.url }}">
|
||||||
<a href="{{ item.url }}">{{ item.key }}</a>
|
<a href="{{ item.url }}">{{ item.key }}</a>
|
||||||
</li>
|
</li>
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in New Issue