Add NavMenu settings/presets UI and profile HTTP routes (ticket 011)
Adds thin HTTP routes for profile CRUD and colour-scheme updates (GET/PATCH /api/settings, GET/POST /api/settings/profiles, DELETE /api/settings/profiles/:name, POST /api/settings/profiles/:name/activate) following the existing CSS-route pattern in api.rs, with activate hot-swapping the running engine's declared params/metrics so switching profiles needs no restart. Builds out the NavMenu frontend with Settings (colour scheme picker, CSS import/list/delete) and Presets (list/create/switch/delete profiles with declaration counts) panels, and a useSettingsPanel hook that applies the active colour scheme and imported CSS to the document live. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
57d23c62e9
commit
801ac36b78
@@ -15,3 +15,17 @@ body {
|
||||
@apply bg-neutral-950 text-neutral-200;
|
||||
font: 14px/1.5 ui-monospace, Consolas, monospace;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ticket 011: colour-scheme picker support. Most of the app's Tailwind
|
||||
* classes are hardcoded to a dark palette (e.g. `bg-neutral-950` above)
|
||||
* rather than using `dark:`-variant classes, so there isn't a full light
|
||||
* theme to switch to yet. This override (keyed off the `light` class
|
||||
* `useSettingsPanel` toggles on `<html>`) gives "Light" a real, if minimal,
|
||||
* visible effect on the base page colours; a proper light theme would need
|
||||
* the rest of the app's components reworked to use theme-aware classes.
|
||||
*/
|
||||
html.light body {
|
||||
background-color: #f5f5f4;
|
||||
color: #1c1917;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user