Add landing page for kjol, documentation

This commit is contained in:
2026-07-13 16:51:21 -04:00
parent 5230bd6702
commit fec8ef4a3e
54 changed files with 3529 additions and 547 deletions

View File

@@ -70,9 +70,21 @@ GOOS=js GOARCH=wasm go -C go test -exec="node testdata/domexec.js" ./wasmruntime
```
`webui` components that measure the page (Tooltip, Popover, Menu, Modal, DatePicker, Tutorial,
AutoTable) are **controllers**: create them once alongside your signals, never inside a render
closure. Floating panels share one positioning engine (`webui/position.go`, pure math, unit-tested
natively) driven by the `Floating` controller (`webui/floating.go`).
AutoTable, SignaturePad, AsyncCombobox) are **controllers**: create them once alongside your
signals, never inside a render closure. Floating panels share one positioning engine
(`webui/position.go`, pure math, unit-tested natively) driven by the `Floating` controller
(`webui/floating.go`).
**Theming / dark mode.** The kit is themed by **semantic tokens**, not by a `dark:` variant on
every class: components say `bg-surface` / `border-line` / `text-ink` / `text-accent` and never
name a colour, so a theme is ten CSS variables rather than four hundred class strings. The app
must define them (see `webui.ThemeTokens` for the required set, and the example's `css/app.css`
for a working pair) plus `@custom-variant dark (&:where(.dark, .dark *));` — the built-in `dark`
variant is a `prefers-color-scheme` media query, which a site with its own switch cannot use.
Only genuinely *coloured* things (an alert's red tint) carry `dark:` variants. `webui.Theme` is
the controller (`Toggle`, `ThemeToggle`, `Init`); `webui.ThemeBootScript` goes in the document
head **before** the stylesheet, or dark-mode users get a white flash until the wasm loads. It is
the only JavaScript in a gowasm app.
### web/