2024-11-07 10:16:24 +01:00
|
|
|
{% macro render_header(path) %}
|
|
|
|
{% set root = get_section(path="_index.md") %}
|
|
|
|
<a href="{{ root.permalink | safe }}">
|
2024-11-05 21:59:02 +01:00
|
|
|
<div class="logo">
|
|
|
|
<img src="{{ get_url(path=config.extra.juice_logo_path) }}" alt="logo">
|
|
|
|
{{ config.extra.juice_logo_name }}
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<nav>
|
2024-11-06 14:41:37 +01:00
|
|
|
{% if config.extra.juice_extra_menu %}
|
|
|
|
{% for menu in config.extra.juice_extra_menu %}
|
|
|
|
<a class="nav-item subtitle-text" href="{{ menu.link | safe }}">{{ menu.title }}</a>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-11-07 10:16:24 +01:00
|
|
|
{% for page in root.pages %}
|
|
|
|
{% if lang == "en" %}
|
2024-11-05 21:59:02 +01:00
|
|
|
<a class="nav-item subtitle-text" href="{{ page.permalink | safe }}">{{ page.title }}</a>
|
2024-11-07 10:16:24 +01:00
|
|
|
{% else %}
|
|
|
|
<a class="nav-item subtitle-text" href="/{{lang}}{{ page.path }}">{{ page.title }}</a>
|
|
|
|
{% endif %}
|
2024-11-05 21:59:02 +01:00
|
|
|
{% endfor %}
|
2024-11-06 14:41:37 +01:00
|
|
|
|
2024-11-07 10:16:24 +01:00
|
|
|
{% for path in root.subsections %}
|
2024-11-06 12:15:43 +01:00
|
|
|
{% set child = get_section(path=path) %}
|
2024-11-07 10:16:24 +01:00
|
|
|
{% if lang == "en"%}
|
|
|
|
<a class="nav-item subtitle-text" href="{{ child.permalink | safe }}">{{ child.title }}</a>
|
|
|
|
{% else %}
|
|
|
|
<a class="nav-item subtitle-text" href="/{{lang}}{{ child.path }}">{{ child.title }}</a>
|
|
|
|
{% endif %}
|
2024-11-06 12:15:43 +01:00
|
|
|
{% endfor %}
|
2024-11-07 10:16:24 +01:00
|
|
|
|
|
|
|
{% if lang == "en"%}
|
2024-11-08 12:53:41 +01:00
|
|
|
<a class="nav-item subtitle-text" href="/sv{{ path }}"><img alt="swedish" class="flag"
|
|
|
|
src="/flag-for-sweden-svgrepo-com.svg"></a>
|
2024-11-07 10:16:24 +01:00
|
|
|
{% else %}
|
2024-11-08 12:53:41 +01:00
|
|
|
<a class="nav-item subtitle-text" href="{{ path }}"><img alt="english" class="flag"
|
2024-11-07 10:42:29 +01:00
|
|
|
src="/flag-for-united-kingdom-svgrepo-com.svg"></a>
|
2024-11-07 10:16:24 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-11-05 21:59:02 +01:00
|
|
|
</nav>
|
2024-11-06 12:15:43 +01:00
|
|
|
|
|
|
|
|
2024-11-05 21:59:02 +01:00
|
|
|
{% endmacro render_header %}
|