feat: added data based dynamic navigation for site header

This commit is contained in:
Begerad, Stefan 2021-10-28 14:34:53 -04:00
parent 01235ab6a2
commit 554a02961f
2 changed files with 16 additions and 2 deletions

12
src/_data/navigation.json Normal file
View File

@ -0,0 +1,12 @@
{
"items": [
{
"text": "Start",
"url": "/"
},
{
"text": "Kontakt",
"url": "/contact/"
}
]
}

View File

@ -11,8 +11,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<div class="navbar-nav">
<a href="/" class="nav-item nav-link active">Start</a>
<a href="/contact" class="nav-item nav-link active">Kontakt</a>
{% for item in navigation.items %}
<a href="{{ item.url }}" class="nav-item nav-link active">
{{ item.text }}</a>
{% endfor %}
</div>
</nav>
</header>