Docs: admin languages and texts, wording rule for agents, new screen names
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6b46bc0c14
commit
0a2374db18
+5
-5
@@ -1,7 +1,7 @@
|
||||
# Light / dark theme (1.11.1)
|
||||
|
||||
Theme logic from the plugin, the look in the project. The plugin provides: a pre-paint script (no flash
|
||||
of the light theme), an unstyled switcher, the `useTheme` hook, fields in Site Settings → Theme, and a Turnstile
|
||||
of the light theme), an unstyled switcher, the `useTheme` hook, fields in Site settings → Theme, and a Turnstile
|
||||
widget theme that matches the page.
|
||||
|
||||
## How it works
|
||||
@@ -10,11 +10,11 @@ widget theme that matches the page.
|
||||
- `<ThemeScript>` (an inline script, the first child of `<body>`) sets `data-theme="light|dark"` and
|
||||
`color-scheme` on `<html>` before the first paint.
|
||||
- Order: the visitor's choice from `localStorage` (key `ipal-theme`, only when "Allow theme toggle" is on)
|
||||
→ Site Settings → Default theme → with `System`, the device setting (`prefers-color-scheme`).
|
||||
→ Site settings → Default theme → with `System`, the device setting (`prefers-color-scheme`).
|
||||
- `localStorage`, not a cookie: it is an interface preference, it does not track and needs no consent.
|
||||
- A change in one tab carries over to the others (the `storage` event).
|
||||
|
||||
## Site Settings → Theme
|
||||
## Site settings → Theme
|
||||
|
||||
| Field | Meaning |
|
||||
|---|---|
|
||||
@@ -87,11 +87,11 @@ redraws the widget (the token must be obtained again). A fixed theme: `turnstile
|
||||
## Turn off, override, extend
|
||||
|
||||
- **Turn off:** without `SiteProviders theme` / `<ThemeScript>` no theme is set (base CSS);
|
||||
`allowThemeToggle` off = the visitor's choice is ignored. The *Theme* tab in Site Settings is
|
||||
`allowThemeToggle` off = the visitor's choice is ignored. The *Theme* tab in Site settings is
|
||||
currently always added.
|
||||
- **Override:** `ThemeScript` takes `allowToggle` / `defaultTheme` directly (it does not have to read from the admin panel);
|
||||
`ThemeSwitcher` — `classNames`, `label`, `renderIcon`; `applyTheme(..., { persist, transitionMs })`.
|
||||
- **Extend:** your own switcher on `useTheme()`; `themeScript()` as script text for your own
|
||||
tag; `themeConfigFrom(settings)` to read the settings.
|
||||
Your own fields in Site Settings (e.g. extra tokens) — `ipalKit({ siteSettingsFields })`, they go to the
|
||||
Your own fields in Site settings (e.g. extra tokens) — `ipalKit({ siteSettingsFields })`, they go to the
|
||||
*Custom* tab.
|
||||
|
||||
Reference in New Issue
Block a user