layouts
All repositories: gitoria
5.9 KB
# layouts.worldapi.org**The WorldAPI theme for Hybriel apps** and the showcase site that serves it. components.hybriel.worldapi.org delivers thecomponents in a plain base; this theme is how WorldAPI makes them look for itself: palette + named roles, borderlessplain elements, the components themed without forking them, three app shells with a header that works on a phone.Goal (creator): "when we have our set of basic components and their styles all we need to do in the future is patch themtogether and change the accent color". https://layouts.worldapi.org — replaces the Vidoriel workbench (retired 2026-10-03).## For an app- **How to use it**: [docs/using-the-theme.md](docs/using-the-theme.md) — copy `theme/`, `inherit './theme/theme.hl'` instyles.hl, set `colorAccent` + `colorType1…6`, pick a shell, run `node theme/check-theme.mjs .` in the gate.- One doc per layout (purpose, parent/children, classes/states, phone/desktop, semantics, example, do-not-use):[theme](docs/layouts/theme.md) · [AppHeader](docs/layouts/app-header.md) · [MainMenu](docs/layouts/main-menu.md) ·[UserMenu](docs/layouts/user-menu.md) · [Sidebar](docs/layouts/app-sidebar.md) ·[ContentFirst](docs/layouts/content-first.md) · [ListFirst](docs/layouts/list-first.md) · [ThreePane](docs/layouts/three-pane.md)- Rules: [docs/design-rules.md](docs/design-rules.md) (borderless, no GitHub look, theme colours only),[docs/shells.md](docs/shells.md) (the three ground types, header flush), [docs/conventions.md](docs/conventions.md).## Layout of this folder- `theme/` — **what apps copy**: `theme.hl` (styles file: tokens, plain elements, html-prefixed rules for thecomponents.hybriel components), `shell/*.hl` (AppHeader, MainMenu, UserMenu, Sidebar, ContentFirst, ListFirst,ThreePane — each with its own Style; toggles are the browser's `popover`, no script), `check-theme.mjs` (gate helper).- `shared/tokens.hl` — verbatim copy of the WorldAPI tokens (same file as in every app).- The showcase: `project.hl` (the map), `components/styles.hl` (inherits the theme), `components/main.hl` (body + the accent theswitcher kept), `components/site-header.hl` / `site-sidebar.hl` / `accent-switcher.hl`, pages `components/home.hl`,`elements.hl`, `search.hl`, `pages/*.hl` + `list-pages.hl`, `showcase/*.hl` (one per component), `demo/*.hl` (theshells as mock tracker / notes / mail); `lib/site.hl` menus, `lib/mock.hl` mock data, `lib/search.hl` the search redirect.- `components/<name>/` (month-view date-picker range-picker pagination md-editor code-editor file-upload files-upload comments modal) —**verbatim copies** of components.hybriel.worldapi.org (the commit is in `components/SOURCE`), never edited(`.check-theme-ignore` skips them). Only `tools/sync-components.sh` writes them (see "Update the components").- Code rules: antcolony docs/code-order.md (`let` only where reassigned, project.hl = map, no `.hl` in the root butproject.hl). `python3 tests/letcount.py .` → 0 never reassigned.- `bin/hybriel` + `plugins/` (core crypto data fetch fs http http1 mpackdb proc time web) = the shared static Hybriel build **0f396652**(2026-10-19; `bin/hybriel` statically linked, sha256 `60fa02f3…c5a39080`; from /media/STORAGE/claude-scratch/vendor-0f396652, its README.txthas the build line). bin/ is git-ignored (deployed by rsync). No local patch.## Run, test, deploy- Dev (Loreana): `LAYOUTS_PORT=8760 ./bin/hybriel project.hl` → http://127.0.0.1:8760 (`LAYOUTS_WATCH=0` no watcher,`HL_HOST`). Worker ports 8760–8769, 8765/8766 are foreign.- Gate: `node tests/browser.mjs` (server 8760, Chrome 8761–8764; `LAYOUTS_GATE_PORT`, `LAYOUTS_GATE_CHROME`) — 285 checks,390 + 1280 px, screenshots in `.scratch/gate-shots/` (LOOK at them). `node theme/check-theme.mjs .` — 0 problems.Corner radii: the gate reads the computed radius of EVERY element on all 23 pages (only 0 / 5px / 10px / 50% pass) andfeeds check-theme a fixture with good and bad radii (hl + css).- Look at pages: `node tools/shots.mjs [/path …]` with the server running (`WIDTHS=390,1280 FULL=1`, Chrome ports`LAYOUTS_GATE_CHROME`) → `.scratch/shots/`.- Other port range (e.g. antcolony workers on 8750–8759): `LAYOUTS_PORT=8750` / `LAYOUTS_GATE_PORT=8750LAYOUTS_GATE_CHROME=8751-8759` for server, gate and shots.- **Update the components** (after a commit in components.hybriel): `tools/sync-components.sh [commit]` (default itsHEAD) copies the 21 files (10 × `<name>.hl` + README, month-view/clock.hl) out of git byte-verbatim, writes`components/SOURCE`, then checks. `tools/sync-components.sh --check` = are the copies still that commit (exit 1 +the file names if not). Then gate + check-theme + same output, commit.- **Same output** (cleanups, re-copies): on CODE-ONLY copies, server 8750 + Chrome 8751–8759:```bashrsync -a --exclude .scratch --exclude storage --exclude .sessions --exclude .git --exclude '.env*' --exclude missions ./ .scratch/x-new/ # old tree: same from git archive / a copy made beforenode tests/same-output.mjs .scratch/x-old .scratch/out-old; node tests/same-output.mjs .scratch/x-new .scratch/out-newpython3 tests/same-output-compare.py .scratch/out-old .scratch/out-new -v # every answer (crawled), DOM of 34 pages × 390/1280, file-upload + md-editor droppython3 tests/same-output-modules.py .scratch/out-old .scratch/out-new # browser modules: same code + imported functions```Masks `?v=` hashes and source positions. Two runs of one tree compare clean (175/175). A dropped `let` turns`var` into `const` in the browser module, nothing else.- `./deploy.sh` on Loreana (conductor): gates → backup → rsync → `docker compose up -d --build` on Byrodin(127.0.0.1:45009, container `layouts.worldapi.org`) → URL 200. First deploy needs the conductor steps in STATUS.md.## History`LOG.md` (dated lines), `reports/NNN-*.md` (worker reports). The Vidoriel workbench's docs (ssr.md) stay in the oldByrodin folder until it is retired.
Branches
Latest commits
- ad5056eaMerge dm3-sync: components re-sync to c2834ddmre
- 740e2abeRe-sync the components copy to c2834dd: media player fixes (state after a queue pick, cover-less audio, accessibility labels)mre
- 7fe103bbMerge mp-player: the media player showcase pagemre
- 7db43c4eMedia route: serve the showcase's media from committed files (storage/ is not in git)mre
- f77b7d12Media player: re-sync components from 1c41293 (replay / forward 10 icons, play button surface on audio and video)mre
- 40a9e69cMP: report, LOG linemre
- 5b5dbf0fMedia player: the component from components.hybriel dd003e5 (sync-components), the showcase page /components/media-player with a queue, its media files served with ranges (lib/media.hl), theme rules (the seek bar, the queue's current item, the radii), the page in the overview listsmre
- 9197159fTake components e54f83a: table lines and one-row desktop toolbar in the theme, Table button gates, a table in the md-editor demomre
- e6322a44UX: report and LOG linemre
- 58c2da6fUX: nav marker without bars; chat composer is one box (files-upload pick mode, showcase); comments state footer + closer reactions row; modal footer rule only for its own footer; gates for all of itmre
- 956f107async components.hybriel 4922f9c: 44 px targets in month-view, date-picker, range-picker, pagination, modal, comments; names follow <html lang> (English default), UTC weekday fix; gate: 390 px target checks, 'edited' hit-area padding; comments showcase 'You are' is a labelled group (SY)mre
- 49940371sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
- 6f7bd392gate: the phone toolbar is two even rows (E2)mre
- 3049c082sync components.hybriel 214c318: MdEditor on a phone, two even toolbar rows of 44 px targets, label 15 px, table head 16 px (E2)mre
- b9a3f85fLOG: MLmre
- 7979397creport ML-mobilemre
- 85d2ed25gate: wordingmre
- 98a311c0gate: 390 px checks for list rows, table word, edited tap target, code in titlesmre
- 769b99d7theme: table cells keep a word whole, code in a title stays text-sized, 'edited' is a 44 px tap target on the phonemre
- c36b7595list rows (notes, mail) stack their parts full width: the date no longer a one-letter column beside the titlemre