{# Settings dropdown (language + theme). Shared by base.html and admin/base.html to kill the former ~100-line copy-paste duplication. Proper Penguin UI dropdown: behaviour is the vendored dropdowns/dropdown-with-icons.html verbatim (isOpen / openedWithKeyboard, x-trap + $focus keyboard nav, x-cloak x-show, @click.outside). Trigger is our gear icon-only button; content is the language form + theme toggle. Needs the Alpine Focus plugin (loaded in base.html) for x-trap / $focus. Self-contained Alpine state + relative positioning; the host only places it (e.g. ml-auto in admin). The panel has NO id on purpose (see profile_menu.html for why — htmx hx-boost settles by id). #}
{{ t(key="settings-theme", lang=lang | default(value='sk')) }}
{# Theme picker: Penguin UI's switch toggle (penguinui-components/toggle/default-toggle.html), adapted from a standalone checkbox into a light/dark switch wired to our existing setTheme()/currentTheme() helpers in base.html (which drive ). The `dark` state initialises from the resolved theme — so a stored 'system' preference still reflects the current appearance — and stays in sync via the theme:changed event the helpers dispatch. Toggling writes an explicit light/dark choice (the old tri-state 'system' option is dropped, matching Penguin's binary toggle). #}