layouts
All repositories: gitoria
3.7 KB
// components/demo/mail-demo.hl — `/shells/three-pane[/:id]`: SHELL 3 as a mock mail client, signed in. Phone: the message// list first, the folders are the sidebar overlay (header toggle); a message replaces the list, with its own actions and a// link back. Desktop: folders, list and message side by side.parent '../main.hl'import AppHeader from '../../theme/shell/app-header.hl'import UserMenu from '../../theme/shell/user-menu.hl'import Sidebar from '../../theme/shell/app-sidebar.hl'import ThreePane from '../../theme/shell/three-pane.hl'import { folders, mails } from '../../lib/mock.hl'id = nullString view = id == null ? 'list' : 'detail'Hybrid boxes = foldersHybrid rows = listRows(id)Hybrid mail = mailOf(id)Boolean hasMail = id != nullBoolean welcome = id == nullString acted = ''__title = 'Three-pane demo · WorldAPI layouts'listRows(String at) {out = []for (m of mails) { out.push({ href = '/shells/three-pane/' + m.id from = m.from subject = m.subject date = m.date cls = (m.id == at ? 'selected ' : '') + m.unread aria = m.id == at ? 'page' : 'false' }) }return out}mailOf(String at) {for (m of mails) { if (m.id == at) { return m } }return { id = '' from = '' subject = '' date = '' unread = '' body = [] }}Style {mailDemo {mailFrom {display = 'flex'justifyContent = 'space-between'gap = '.5rem'fontSize = '.9rem'color = 'var(--color-text-muted)'span {firstChild {minWidth = '0'overflowWrap = 'anywhere'}lastChild {flex = '0 0 auto'whiteSpace = 'nowrap'}}}mailSubject {display = 'block'overflowWrap = 'anywhere'}aside {'a.unread' {mailSubject {fontWeight = '700'color = 'var(--color-text-strong)'}}}appSidebar {nav {a {display = 'flex'justifyContent = 'space-between'span { color = 'var(--color-text-muted)' }}}}output {display = 'block'marginBottom = '1rem'color = 'var(--color-success)'}}}View {mailDemo { on click(e) { emit mailAction(e) }AppHeader { brand = "Mail (demo)" brandHref = "/shells/three-pane" search = "/search" searchPlaceholder = "Search mail…"UserMenu { name = "Signed in as az5b2 (mock)"a { href = "/shells" "Settings" }a { href = "/shells" "Logout" }}}ThreePane { view = viewSidebar {nav { 'aria-label' = "Folders"h2 { "Folders" }for (f of boxes) { a { href = "/shells/three-pane" f.label span { f.count } } }}nav { 'aria-label' = "Showcase"h2 { "Showcase" }a { class = "back" href = "/shells" "‹ Shells" }}}aside { 'aria-label' = "Inbox"ul { for (r of rows) { li { a { href = r.href class = r.cls 'aria-current' = r.aria mailFrom { span { r.from } span { r.date } } mailSubject { r.subject } } } } }}main {if (welcome) {h1 { "Inbox" }p { class = "muted" "Pick a message. (A phone never shows this text: it opens on the list.)" }}if (hasMail) {a { class = "back" href = "/shells/three-pane" "Inbox" }menu { 'aria-label' = "Message actions"li { button { type = "button" value = "Replied" "Reply" } }li { button { type = "button" value = "Forwarded" "Forward" } }li { button { type = "button" value = "Archived" "Archive" } }li { button { type = "button" class = "danger" value = "Deleted" "Delete" } }}output { acted }h1 { mail.subject }p { class = "muted" mail.from " · " mail.date }article { for (t of mail.body) { p { t } } }}}}}}// the actions are mock: they only say what they would have doneon mailAction(e) {b = e.target.closest('menu button')if (b != null) { acted = b.value + ' (mock — nothing happened)' }}
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