This commit is contained in:
Thomas Chartron 2021-11-14 14:08:51 +01:00
parent 4c61439e30
commit 1310c95c93

View file

@ -141,22 +141,20 @@
{% if config.extra.zt.enable_multilingue %}
<!-- Language change button -->
<div class="flex p-2 ml-4">
<div class="flex p-2 ml-4 relative">
<button id="switch-lang" type="button" class="bg-gray-200 text-gray-800 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-white p-1 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
<svg class="w-6 h-6 bg-gray-200 text-gray-800 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"></path>
</svg>
</button>
<div class="relative">
<div id="switch-lang-panel" class="hidden absolute z-10 rounded-lg divide-y bg-gray-300 dark:bg-gray-700 flex flex-col w-12">
<span class="sr-only">Switch Lang</span>
{% for item in config.extra.lang.items %}
{% if item.lang == item.lang %}
<a href="{{ item.base_url }}">{{ item.name }}</a>
<a href="{{ item.base_url }}">{{ item.name }}</a>
{% endif %}
{% endfor %}
</div>
<div id="switch-lang-panel" class="hidden absolute top-12 -left-1/2 z-10 p-4 rounded-lg divide-y bg-gray-300 dark:bg-gray-800 text-gray-800 dark:text-gray-400 flex flex-col w-28 ">
<span class="sr-only">Switch Lang</span>
{% for item in config.extra.lang.items %}
{% if item.lang == item.lang %}
<a class="" href="{{ item.base_url }}">{{ item.name }}</a>
<a class="" href="{{ item.base_url }}">{{ item.name }}</a>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}