mirror of
https://github.com/zaaarf/friendenstein.git
synced 2024-11-22 15:34:50 +01:00
fixed header_nav links to use get_url
This commit is contained in:
parent
63f83cebb7
commit
de633ec8f2
1 changed files with 146 additions and 150 deletions
|
@ -104,17 +104,15 @@
|
|||
{% for nav_item in config.extra.header_nav %}
|
||||
{% set current_nav_item = nav_item[lang] %}
|
||||
{% if current_nav_item and current_nav_item.name %}
|
||||
<a href="{{ current_nav_item.url | safe }}" {% if current_nav_item.new_tab %}target="_blank" rel="noreferrer noopener"{% endif %}>{{ current_nav_item.name }}</a>
|
||||
<a href="{{ get_url(path=current_nav_item.url) }}" {% if current_nav_item.new_tab %}target="_blank" rel="noreferrer noopener"{% endif %}>{{ current_nav_item.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="themeSwitch">
|
||||
<button class="themeButton light" onclick="setTheme('light')" title="Light mode">◐</button>
|
||||
<button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode">◑</button>
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
const setTheme = (theme) => {
|
||||
document.documentElement.className = theme;
|
||||
|
@ -127,11 +125,9 @@
|
|||
getTheme()
|
||||
</script>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{% block content %}{% endblock content %}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
{% block footer %}{% endblock footer %}
|
||||
<hr>
|
||||
|
|
Loading…
Reference in a new issue