Queerscriptors.org/templates/lang-selector.html
HackerNCoder b8ec7f9680 Add language selector dropdown
Squashed commit of the following:

commit ba58528214
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 19:53:42 2022 +0100

    fixup! Finish lang selector

commit dcfddda5c5
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 19:41:32 2022 +0100

    fix dropdown-toggle css

commit 1803c12658
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 19:39:25 2022 +0100

    Finish lang selector

commit ec774b7a52
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 19:34:19 2022 +0100

    Attempt to add missing langs

commit d1a779749d
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 19:05:31 2022 +0100

    testing

commit 2cb2610d24
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 19:01:18 2022 +0100

    Revert "testing"

    This reverts commit 7201ebbf5f.

commit 7201ebbf5f
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 18:59:23 2022 +0100

    testing

commit d9b29adf6b
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 18:53:46 2022 +0100

    testing

commit e3a2634048
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 18:52:29 2022 +0100

    fix test

commit 1227a793cd
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 18:51:24 2022 +0100

    testing

commit 510e7d80c6
Author: HackerNCoder <hackerncoder@encryptionin.space>
Date:   Sun Oct 30 18:37:07 2022 +0100

    Attempt to add language selector
2022-10-30 19:54:09 +01:00

14 lines
552 B
HTML

{% 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>