Attempt to add language selector

This commit is contained in:
HackerNCoder 2022-10-30 18:37:07 +01:00
parent 20e4066d2d
commit 510e7d80c6
2 changed files with 14 additions and 0 deletions

View file

@ -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>

View 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>