layouts
All repositories: gitoria
2.6 KB
// components/demo/notes-demo.hl — `/shells/list-first[/:id]`: SHELL 2 as a mock Notes app, signed in. On the phone `/`// shows only the list (its welcome text is never seen there); a note's route shows only the note, with a link back.// Desktop: list and note side by side; `/` shows the welcome text beside the list.parent '../main.hl'import AppHeader from '../../theme/shell/app-header.hl'import UserMenu from '../../theme/shell/user-menu.hl'import ListFirst from '../../theme/shell/list-first.hl'import { notes } from '../../lib/mock.hl'id = nullString view = id == null ? 'list' : 'detail'Hybrid rows = listRows(id)Hybrid note = noteOf(id)Boolean hasNote = id != nullBoolean welcome = id == nullBoolean emptyNote = note.paragraphs.length == 0__title = 'List-first demo · WorldAPI layouts'// the list with the opened note markedlistRows(String at) {out = []for (n of notes) { out.push({ href = '/shells/list-first/' + n.id title = n.title updated = n.updated cls = n.id == at ? 'selected' : '' aria = n.id == at ? 'page' : 'false' }) }return out}noteOf(String at) {for (n of notes) { if (n.id == at) { return n } }return { id = '' title = '' updated = '' paragraphs = [] }}Style {// The note fields retain their shared demo-root selectors.notesDemo {noteTitle {display = 'block'fontWeight = '600'color = 'var(--color-text-strong)'}noteUpdated {display = 'block'fontSize = '.85rem'color = 'var(--color-text-muted)'}noteFilter {display = 'block'padding = '.25rem .75rem .75rem'}}}View {notesDemo {AppHeader { brand = "Notes (demo)" brandHref = "/shells/list-first"UserMenu { name = "Signed in as az5b2 (mock)"a { href = "/shells" "Settings" }a { href = "/shells" "Logout" }}}ListFirst { view = viewaside { 'aria-label' = "Notes"noteFilter { input { type = "search" placeholder = "Filter notes" 'aria-label' = "Filter notes" } }ul { for (r of rows) { li { a { href = r.href class = r.cls 'aria-current' = r.aria noteTitle { r.title } noteUpdated { r.updated } } } } }}main {if (welcome) {h1 { "Notes" }p { class = "muted" "Pick a note on the left. (A phone never shows this text: it opens on the list.)" }p { class = "links" a { href = "/shells" "‹ Shells" } }}if (hasNote) {a { class = "back" href = "/shells/list-first" "All notes" }h1 { note.title }p { class = "muted" "Updated " note.updated }article { for (t of note.paragraphs) { p { t } } }if (emptyNote) { p { class = "empty" "This note is empty." } }}}}}}
Branches
Latest commits
- 4099e64aMerge branch 'font-segoe-ui' into mainAtlas
- e14fb795|||PR Theme font: Segoe UI first (his choice 2026-11-19)Atlas
- 44071d2cMerge branch 'hl-standard-5' into mainAtlas
- 5ea64202|||PR Gate: count the new-tab check's console errors tooAtlas
- 2752ceddMerge branch 'hl-standard-4' into mainAtlas
- ac552b81|||PR Gate: keyboard (Tab/Enter/Space) and Back/Forward/reload/new-tab checks (HL-STANDARD F5, F21)Atlas
- 8cddcaa9Merge branch 'hl-standard-2' into mainAtlas
- 2b480a64|||PR Type the route parameter of main-menu build (HL-STANDARD L10)Atlas
- ab54a39dMerge branch 'hl-standard' into mainAtlas
- 04d36fcf|||PR Type function parameters and drop unneeded let (HL-STANDARD L2, L10)Atlas
- 220c8fa4Merge branch 'readme-audit' into mainAtlas
- b78fb85a|||PR README matches the codemre
- 9f351699Preserve comments and nest supported selectors without changing rendered outputmre
- 97110ad9WIP: nest accepted layout selectors; stopped at startup parse failuremre
- ce4a0baeKeep caller slot styles whole so minimal shell apps startmre
- 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
- b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
- ebd00b6cNest caller slot styles in three-panemre
- 009991efNest caller slot styles in list-firstmre