mirror of
https://github.com/zaaarf/friendenstein.git
synced 2024-11-14 03:29:23 +01:00
26 lines
2.1 KiB
HTML
26 lines
2.1 KiB
HTML
{% set current_lang = config.default_language %}
|
|
{% if page %}
|
|
{% set current_lang = page.lang %}
|
|
{% elif section %}
|
|
{% set current_lang = section.lang %}
|
|
{% endif %}
|
|
{% if config.extra.header_nav %}
|
|
<nav class="navBar">
|
|
{% include "logo.html" %}
|
|
<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 %}
|
|
|
|
{% if not config.extra.default_theme %}
|
|
<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>
|
|
{% elif config.extra.default_theme and config.extra.default_theme == "light" %}
|
|
<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>
|
|
{% elif config.extra.default_theme and config.extra.default_theme == "dark" %}
|
|
<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>
|
|
{% endif %}
|
|
</nav>
|
|
{% endif %}
|