====== Domain Design ====== In the bar: **"Domain" → "Design"**. One screen that paints the **whole domain** — the ordinary pages and the task page in the game alike. Styling used to be built by overriding the engine's rules one at a time: a long list of selectors in the domain's css, each with a colour of its own. Now there are two simpler layers underneath — the **theme** and the **tokens** — and your own css goes on top of them rather than instead of them. ===== The Theme ===== A theme is a ready-made set of values that your css is laid over. It is picked on the **"Domain settings"** tab, in the **"Theme"** row. * **No theme** — the way the domain has always looked. * **Green** * **Dark Purple** * **Dark Radix** * **Light Radix** **A theme paints the domain as a whole, not only the game.** One and the same set describes the site, the game, the light mode and the dark one — so a domain cannot end up with a sand-coloured day and a cyberpunk night. A theme is a **delta, not a full set**: whatever it does not name stays as the engine has it. So "No theme" is not "broken" but "everything by default". ===== How the Studio Is Laid Out ===== {{ :admin_main:domain_design_studio_en.png?800 |The design studio: screens and slots on top, the editor on the left, the showcase on the right}} **The top row — the screens:** * **"Menu"** — the row of links under the header, on every page of the site. * **"Site"** — ordinary pages: the main one, the list of games, the profile. * **"Game"** — the task page. A theme of its own for light and for dark. * **"Domain settings"** — the title, the start page and the choice of theme. **The second row — the slots**, that is, the fields you actually write into: ^ Screen ^ Slots ^ | Menu | Menu (HTML) | | Site | Header (HTML), Footer (HTML), CSS | | Game | Header in the game (HTML), CSS: light theme, CSS: dark theme | Under the tabs there is a line about what the open slot is laid over, and next to every **css** slot a "Theme tokens" link. **On the left the editor, on the right the showcase.** The showcase is **not a live page of the domain** but a sample built by the studio: for "Site" it is the menu, a basic page, the list of games, the statistics, the codes map and the answers log (the showcase has a table of contents of its own); for "Game" it is the task container, the inventory, a spoiler and an alert. This is deliberate: a draft no longer lands on real pages where anyone could run into it. The showcase has switches of its own: **"Light" / "Dark"** (on the "Game" screen only), full width or **as on a phone**, and **redraw**. > **css is applied on every keystroke**, with no reload of the showcase. HTML cannot do that — the server builds it, and the showcase redraws after a pause once you stop typing. ===== The Tokens ===== A token is a name for a colour (or a size) that the engine uses in all of its rules: ''--qeng-body-bg'', ''--qeng-surface-bg'', ''--qeng-accent'' and a few hundred more. Set the name and the colour spreads across every rule by itself — no selector has to be overridden: :root { --qeng-body-bg: #050505; } The list opens by the **"Theme tokens"** link next to any css slot. {{ :admin_main:domain_design_tokens_en.png?800 |"Theme tokens": the reference of names the engine paints by itself}} * The names are grouped, and the **palette** comes first — the few dozen the whole site is described with. It is usually enough: the roles of the screens take their colour from the palette and follow it. Open the other groups only when one single thing has to be led aside. * The swatch next to a name shows the colour **after** your css, not the default one — so you can see what you have already overridden. * Groups that do not apply to the open slot are hidden. * Some tokens are marked as the engine's own: nothing can override them, and they are not offered on any slot at all. This is a **reference, not an input field**: you still edit css, the tokens are only listed here. ===== The Inspector and the Contrast Check ===== Above the showcase there is a contrast bar: **"Contrast: OK (N elements)"** or "N contrast problems", the "◀ ▶" arrows to walk the problems, and **"Show all"**. Its thresholds are deliberately softer than WCAG — this is a hunt for the plainly unreadable, not an accessibility audit. The **"🔍 Inspector"** button turns on element picking: you click anything in the showcase and see **which layer** the rule came from: * 📄 on the page (inline and ''