gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit635234df635234dfcomponents re-synced to components.hybriel 5a98d77 (#15 black/white base look); gate 73/0, check-theme 0, screenshots unchangedmre635234df/README.md

5.7 KB

  1. # layouts.worldapi.org
  2. **The WorldAPI theme for Hybriel apps** and the showcase site that serves it. components.hybriel.worldapi.org delivers the
  3. components in a plain base; this theme is how WorldAPI makes them look for itself: palette + named roles, borderless
  4. plain elements, the components themed without forking them, three app shells with a header that works on a phone.
  5. Goal (creator): "when we have our set of basic components and their styles all we need to do in the future is patch them
  6. together and change the accent color". https://layouts.worldapi.org — replaces the Vidoriel workbench (retired 2026-10-03).
  7. ## For an app
  8. - **How to use it**: [docs/using-the-theme.md](docs/using-the-theme.md) — copy `theme/`, `inherit './theme/theme.hl'` in
  9. styles.hl, set `colorAccent` + `colorType1…6`, pick a shell, run `node theme/check-theme.mjs .` in the gate.
  10. - One doc per layout (purpose, parent/children, classes/states, phone/desktop, semantics, example, do-not-use):
  11. [theme](docs/layouts/theme.md) · [AppHeader](docs/layouts/app-header.md) · [MainMenu](docs/layouts/main-menu.md) ·
  12. [UserMenu](docs/layouts/user-menu.md) · [Sidebar](docs/layouts/app-sidebar.md) ·
  13. [ContentFirst](docs/layouts/content-first.md) · [ListFirst](docs/layouts/list-first.md) · [ThreePane](docs/layouts/three-pane.md)
  14. - Rules: [docs/design-rules.md](docs/design-rules.md) (borderless, no GitHub look, theme colours only),
  15. [docs/shells.md](docs/shells.md) (the three ground types, header flush), [docs/conventions.md](docs/conventions.md).
  16. ## Layout of this folder
  17. - `theme/` — **what apps copy**: `theme.hl` (styles file: tokens, plain elements, html-prefixed rules for the
  18. components.hybriel components), `shell/*.hl` (AppHeader, MainMenu, UserMenu, Sidebar, ContentFirst, ListFirst,
  19. ThreePane — each with its own Style; toggles are the browser's `popover`, no script), `check-theme.mjs` (gate helper).
  20. - `shared/tokens.hl` — verbatim copy of the WorldAPI tokens (same file as in every app).
  21. - The showcase: `project.hl` (the map), `components/styles.hl` (inherits the theme), `components/main.hl` (body + the accent the
  22. switcher kept), `components/site-header.hl` / `site-sidebar.hl` / `accent-switcher.hl`, pages `components/home.hl`,
  23. `elements.hl`, `search.hl`, `pages/*.hl` + `list-pages.hl`, `showcase/*.hl` (one per component), `demo/*.hl` (the
  24. shells as mock tracker / notes / mail); `lib/site.hl` menus, `lib/mock.hl` mock data, `lib/search.hl` the search redirect.
  25. - `components/<name>/` (month-view date-picker range-picker pagination md-editor code-editor file-upload modal) —
  26. **verbatim copies** of components.hybriel.worldapi.org (the commit is in `components/SOURCE`), never edited
  27. (`.check-theme-ignore` skips them). Only `tools/sync-components.sh` writes them (see "Update the components").
  28. - Code rules: antcolony docs/code-order.md (`let` only where reassigned, project.hl = map, no `.hl` in the root but
  29. project.hl). `python3 tests/letcount.py .` → 0 never reassigned.
  30. - `bin/hybriel` + `plugins/` (core crypto data fs http http1 proc time web) = hybriel **master c5b8b2e2** (2026-10-03;
  31. runtime = 06617221 + only `--graph --no-ast` 070d2e21, plugins/web identical), built read-only from `git archive
  32. c5b8b2e2` with `zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.39` in `native/` (zig =
  33. hybriel/native/zig-toolchain), sha256 `38b34baf…697d1fe7`. No local patch.
  34. ## Run, test, deploy
  35. - Dev (Loreana): `LAYOUTS_PORT=8760 ./bin/hybriel project.hl` → http://127.0.0.1:8760 (`LAYOUTS_WATCH=0` no watcher,
  36. `HL_HOST`). Worker ports 8760–8769, 8765/8766 are foreign.
  37. - Gate: `node tests/browser.mjs` (server 8760, Chrome 8761–8764; `LAYOUTS_GATE_PORT`, `LAYOUTS_GATE_CHROME`) — 73 checks,
  38. 390 + 1280 px, screenshots in `.scratch/gate-shots/` (LOOK at them). `node theme/check-theme.mjs .` — 0 problems.
  39. - Look at pages: `node tools/shots.mjs [/path …]` with the server running (`WIDTHS=390,1280 FULL=1`, Chrome ports
  40. `LAYOUTS_GATE_CHROME`) → `.scratch/shots/`.
  41. - Other port range (e.g. antcolony workers on 8750–8759): `LAYOUTS_PORT=8750` / `LAYOUTS_GATE_PORT=8750
  42. LAYOUTS_GATE_CHROME=8751-8759` for server, gate and shots.
  43. - **Update the components** (after a commit in components.hybriel): `tools/sync-components.sh [commit]` (default its
  44. HEAD) copies the 17 files (8 × `<name>.hl` + README, month-view/clock.hl) out of git byte-verbatim, writes
  45. `components/SOURCE`, then checks. `tools/sync-components.sh --check` = are the copies still that commit (exit 1 +
  46. the file names if not). Then gate + check-theme + same output, commit.
  47. - **Same output** (cleanups, re-copies): on CODE-ONLY copies, server 8750 + Chrome 8751–8759:
  48. ```bash
  49. rsync -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 before
  50. node tests/same-output.mjs .scratch/x-old .scratch/out-old; node tests/same-output.mjs .scratch/x-new .scratch/out-new
  51. python3 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 drop
  52. python3 tests/same-output-modules.py .scratch/out-old .scratch/out-new # browser modules: same code + imported functions
  53. ```
  54. Masks `?v=` hashes and source positions. Two runs of one tree compare clean (175/175). A dropped `let` turns
  55. `var` into `const` in the browser module, nothing else.
  56. - `./deploy.sh` on Loreana (conductor): gates → backup → rsync → `docker compose up -d --build` on Byrodin
  57. (127.0.0.1:45009, container `layouts.worldapi.org`) → URL 200. First deploy needs the conductor steps in STATUS.md.
  58. ## History
  59. `LOG.md` (dated lines), `reports/NNN-*.md` (worker reports). The Vidoriel workbench's docs (ssr.md) stay in the old
  60. Byrodin folder until it is retired.

Branches

Latest commits

  • 635234dfcomponents re-synced to components.hybriel 5a98d77 (#15 black/white base look); gate 73/0, check-theme 0, screenshots unchangedmre
  • 876b2064docs: workaround note for hybriel#130 (slot marker mid-line)mre
  • 85b56541layouts mission 002 3/3: same-output tests, letcount, shots ports, docs, reportmre
  • 0f325d3blayouts mission 002 2/3: code rules — styles.hl -> components/styles.hl, the one never-reassigned let dropped; gate 73/0, same outputmre
  • a3e74c8alayouts mission 002 1/3: components re-copied byte-verbatim from components.hybriel 3f93d71 by tools/sync-components.sh (+ --check, components/SOURCE); gate 73/0, check-theme 0mre
  • 80ce6ba9report 001 (mission 075)mre
  • 5c6e338flayouts.worldapi.org in Hybriel: WorldAPI theme (tokens, borderless elements, themed components.hybriel components), shells (header, main/user menu, sidebar overlay, content-first, list-first, three-pane), showcase, check-theme helper; gate 73/0 (mission 075)mre