Queerscriptors.org/templates/lang-selector.html

14 lines
552 B
HTML
Raw Normal View History

Add language selector dropdown Squashed commit of the following: commit ba585282145d47ba231006835253bac5b16b825f Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 19:53:42 2022 +0100 fixup! Finish lang selector commit dcfddda5c52e61acc31767e3c1ba580f15ae1bba Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 19:41:32 2022 +0100 fix dropdown-toggle css commit 1803c12658c61c6fbdbcfc9e0b1d5c21cb9574cf Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 19:39:25 2022 +0100 Finish lang selector commit ec774b7a5250484112aa1f9fd87ed725c5eda5cd Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 19:34:19 2022 +0100 Attempt to add missing langs commit d1a779749d45be01d221e08cad7c1077c1a3ba83 Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 19:05:31 2022 +0100 testing commit 2cb2610d245d9fbd3f472d6b637fc444515ea0e7 Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 19:01:18 2022 +0100 Revert "testing" This reverts commit 7201ebbf5f8106ac91183db96b86caa540b137d4. commit 7201ebbf5f8106ac91183db96b86caa540b137d4 Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 18:59:23 2022 +0100 testing commit d9b29adf6b29efe8aecfece2db34967a609457b2 Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 18:53:46 2022 +0100 testing commit e3a263404873eb5b278430b5163ba7f43d2d9df7 Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 18:52:29 2022 +0100 fix test commit 1227a793cde105376e0aeb26bb4a2c2ab9284d7d Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 18:51:24 2022 +0100 testing commit 510e7d80c65a07ecc5f38462e8cd52fcee7a714f Author: HackerNCoder <hackerncoder@encryptionin.space> Date: Sun Oct 30 18:37:07 2022 +0100 Attempt to add language selector
2022-10-30 18:54:09 +00:00
{% set alts = bag('alternatives').items() %}
<div class="btn-group dropdown pull-right">
<button type="button" class="btn dropdown-toggle btn-block my-3 my-sm-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ bag('alternatives', this.alt, 'language') }}
</button>
<div class="dropdown-menu">
{% for id, item in bag('alternatives').items() %}
{% if this.alt != id %}
<a class="dropdown-item" href="{{ this.path|url(alt=id) }}">{{ item.language }}</a>
{% endif %}
{% endfor %}
</div>
</div>