2023-11-08 00:19:50 +01:00
|
|
|
{% set current_lang = config.default_language %}
|
|
|
|
{% if page %}
|
|
|
|
{% set current_lang = page.lang %}
|
|
|
|
{% elif section %}
|
|
|
|
{% set current_lang = section.lang %}
|
|
|
|
{% endif %}
|
2023-09-09 19:20:39 +02:00
|
|
|
{% if config.extra.header_nav %}
|
2023-12-22 00:42:32 +01:00
|
|
|
<nav class="navBar">
|
|
|
|
{% include "logo.html" %}
|
2023-12-25 02:39:41 +01:00
|
|
|
<div class="themeButton">
|
2023-10-05 23:38:45 +02:00
|
|
|
{% if not config.extra.default_theme %}
|
2023-12-25 00:41:54 +01:00
|
|
|
<button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button>
|
|
|
|
<button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button>
|
2023-10-05 23:38:45 +02:00
|
|
|
{% elif config.extra.default_theme and config.extra.default_theme == "light" %}
|
2023-12-25 00:41:54 +01:00
|
|
|
<button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"> <use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button>
|
|
|
|
<button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button>
|
2023-10-05 23:38:45 +02:00
|
|
|
{% elif config.extra.default_theme and config.extra.default_theme == "dark" %}
|
2023-12-25 00:41:54 +01:00
|
|
|
<button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button>
|
|
|
|
<button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button>
|
2023-09-29 05:22:02 +02:00
|
|
|
{% endif %}
|
2023-12-25 02:39:41 +01:00
|
|
|
</div>
|
|
|
|
<div class="navBarRight">
|
|
|
|
{% for nav_item in config.extra.header_nav %}
|
|
|
|
<a href="{{ nav_item.url }}" class="{% if nav_item.url == current_url %}active{% endif %}">{% set language_key = 'name_' ~ current_lang %}{{ nav_item[language_key] }}</a>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2023-09-09 19:20:39 +02:00
|
|
|
</nav>
|
|
|
|
{% endif %}
|