Attempt to add language selector
This commit is contained in:
parent
20e4066d2d
commit
510e7d80c6
|
@ -5,5 +5,6 @@
|
||||||
{{ _("Menu") }}
|
{{ _("Menu") }}
|
||||||
<i class="fas fa-bars"></i>
|
<i class="fas fa-bars"></i>
|
||||||
</button> #}
|
</button> #}
|
||||||
|
{% include 'lang-selector.html' %}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
13
templates/lang-selector.html
Normal file
13
templates/lang-selector.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{% set alts = get_alts() %}
|
||||||
|
<div class="btn-group dropdown pull-right">
|
||||||
|
<button type="button" class="btn btn-dark bg-dark dropdown-toggle btn-block my-3 my-sm-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
{{ this.alt.name }}
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu">
|
||||||
|
{% for alt in alts %}
|
||||||
|
{% if this.alt != alt %}
|
||||||
|
<a class="dropdown-item" href="{{ this.path|url(alt=alt) }}">{{ alt.name }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in a new issue