init dynamic sv/en toggle
This commit is contained in:
parent
cb3bacb7f5
commit
be844107ea
|
@ -1,8 +1,8 @@
|
||||||
+++
|
+++
|
||||||
title = "Contact"
|
title = "Contact"
|
||||||
description = "How to get in contact"
|
description = "Hello World"
|
||||||
weight = 10
|
weight = 10
|
||||||
template = "contact.html"
|
template = "page.html"
|
||||||
[extra]
|
[extra]
|
||||||
disable_toc = true
|
disable_toc = true
|
||||||
+++
|
+++
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% macro render_header(path) %}
|
{% macro render_header(path) %}
|
||||||
{% set root = get_section(path="_index.md") %}
|
{% set root = get_section(path="_index.md") %}
|
||||||
<a href="{{ root.permalink | safe }}">
|
<a href="{{ root.permalink | safe }}#top">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="{{ get_url(path=config.extra.juice_logo_path) }}" alt="logo">
|
<img src="{{ get_url(path=config.extra.juice_logo_path) }}" alt="logo">
|
||||||
{{ config.extra.juice_logo_name }}
|
{{ config.extra.juice_logo_name }}
|
||||||
|
@ -34,7 +34,10 @@
|
||||||
|
|
||||||
{% if lang == "en"%}
|
{% if lang == "en"%}
|
||||||
<a class="nav-item subtitle-text" href="/sv{{ path }}"><img alt="swedish" class="flag"
|
<a class="nav-item subtitle-text" href="/sv{{ path }}"><img alt="swedish" class="flag"
|
||||||
src="/flag-for-sweden-svgrepo-com.svg"></a>
|
src="/flag-for-sweden-svgrepo-com.svg" _="on click set path to window.location.pathname js(path)
|
||||||
|
console.log(path.split('/'))
|
||||||
|
return path end
|
||||||
|
log(it)"></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="nav-item subtitle-text" href="{{ path }}"><img alt="english" class="flag"
|
<a class="nav-item subtitle-text" href="{{ path }}"><img alt="english" class="flag"
|
||||||
src="/flag-for-united-kingdom-svgrepo-com.svg"></a>
|
src="/flag-for-united-kingdom-svgrepo-com.svg"></a>
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
</header>
|
</header>
|
||||||
{% endblock header %}
|
{% endblock header %}
|
||||||
|
|
||||||
|
{% block hero %}
|
||||||
|
{% endblock hero %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="content text contact">
|
<div class="content text contact">
|
||||||
|
|
Loading…
Reference in a new issue