The header and its menu popovers always use the dark theme colours, the light theme body is zinc-100 and Kanban columns zinc-200 so they still stand out. The theme toggle icon follows the page theme through a new page-dark variant, and TallStackUI hint and selection group description texts are one shade darker to keep 4.5:1 contrast on the grey background. Co-Authored-By: Claude Opus 5.5 <[email protected]>
22 lines
829 B
PHP
22 lines
829 B
PHP
{{--
|
|
Light/dark theme toggle. It drives the tallstackui_darkTheme() state on
|
|
<html>, which stores the choice in localStorage ("dark-theme"); the
|
|
inline script in the layout applies it before the first paint.
|
|
|
|
Not <x-theme-switch />: its role="switch" button has no accessible name.
|
|
The name stays "Tumma teema"; aria-pressed tells whether it is on.
|
|
--}}
|
|
<x-button.circle
|
|
x-on:click="mode = darkTheme ? 'light' : 'dark'"
|
|
x-bind:aria-pressed="darkTheme ? 'true' : 'false'"
|
|
aria-label="{{ __('layout.theme_toggle') }}"
|
|
:tooltip="__('layout.theme_toggle')"
|
|
color="black"
|
|
subtle
|
|
sm
|
|
data-theme-toggle
|
|
>
|
|
<x-icon name="moon" class="size-5 page-dark:hidden" aria-hidden="true" />
|
|
<x-icon name="sun" class="hidden size-5 page-dark:block" aria-hidden="true" />
|
|
</x-button.circle>
|