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