add language switcher in the navbar
This commit is contained in:
parent
9ba87109e5
commit
458f47c56e
1 changed files with 5 additions and 2 deletions
|
|
@ -11,10 +11,13 @@
|
|||
{% set language_key = 'name_' ~ current_lang %}
|
||||
{{ nav_item[language_key] }}
|
||||
</a>
|
||||
{%- if not loop.last %}
|
||||
{{ config.extra.header_nav_delimiter | default (value="") }}
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
{% if current_lang == "en" %}
|
||||
<a href="{{ current_path | regex_replace(pattern=`^/en/`, rep=`/`) }}">fr</a>
|
||||
{% else %}
|
||||
<a href="{{ get_url(path=current_path, lang='en') }}">en</a>
|
||||
{% endif %}
|
||||
<div>
|
||||
<input type="checkbox" id="theme-toggle" style="display: none;">
|
||||
<label for="theme-toggle" id="theme-toggle-label"><svg id="theme-icon" class="icons"><use href="{{ get_url(path='/icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue