layouts
All repositories: gitoria
3.1 KB
// components/demo/tracker-demo.hl — `/shells/content-first[/:kind]`: SHELL 1 as a mock tracker, signed out. The header has// the main menu (Series | Shows | Movies | Genres | People) on desktop; on the phone it lives in a phone-only sidebar the// toggle opens. The content is the centred column the header's contents are flush with. `kind` filters the mock titles.parent '../main.hl'import AppHeader from '../../theme/shell/app-header.hl'import MainMenu from '../../theme/shell/main-menu.hl'import Sidebar from '../../theme/shell/app-sidebar.hl'import ContentFirst from '../../theme/shell/content-first.hl'import { titles } from '../../lib/mock.hl'static menu = [{ label = 'Series' href = '/shells/content-first/series' }{ label = 'Shows' href = '/shells/content-first/show' count = 12 }{ label = 'Movies' href = '/shells/content-first/movie' }{ label = 'Genres' href = '/shells/content-first/genre' }{ label = 'People' href = '/shells/content-first/person' }]kind = null// the all-titles page has no path of a menu item: the host says Series is the current one (item.current)Hybrid items = flag(menu, kind)String current = kind == null ? '/shells/content-first' : '/shells/content-first/' + kind // MainMenu gets no `current`: it marks the page from the route (hybriel#197)String heading = kind == null ? 'Everything' : kind.slice(0, 1).toUpperCase() + kind.slice(1)Hybrid shown = pick(kind)__title = 'Content-first demo · WorldAPI layouts'flag(Hybrid list, String k) {out = []for (m of list) { out.push({ label = m.label href = m.href count = m.count current = k == null && m.label == 'Series' }) }return out}pick(String k) {out = []for (t of titles) {if (k == null || t.kind.toLowerCase() == k) { out.push({ title = t.title kind = t.kind type = t.type pill = 'pill ' + t.type next = t.next }) }}return out}Style {trackerDemo {'ul.titles' {display = 'grid'gap = '.25rem'margin = '0'padding = '0'listStyle = 'none'li {display = 'flex'flexWrap = 'wrap'alignItems = 'baseline'gap = '.25rem .75rem'margin = '0'padding = '.6rem 0'}a { fontWeight = '700' }'.next' {flexBasis = '100%'color = 'var(--color-text-muted)'fontSize = '.9rem'@media {minWidth = '40rem'flexBasis = 'auto'marginLeft = 'auto'}}}}}View {trackerDemo {AppHeader { brand = "Tracker (demo)" brandHref = "/shells/content-first" search = "/search" searchPlaceholder = "Search titles…"MainMenu { items = items }a { class = "button primary" href = "/shells" "Log in" }}ContentFirst {Sidebar { desktop = "false"MainMenu { items = items }}main {p { class = "links" a { href = "/shells" "‹ Shells" } }h1 { heading }p { class = "muted" "Content-first: the phone shows this content and slides the sidebar in from the header; desktop keeps the header's menu and this column, flush with each other. Signed out: a login where the user menu would be." }ul { class = "titles"for (t of shown) { li { a { class = t.type href = current t.title } span { class = t.pill t.kind } span { class = "next" t.next } } }}}}}}
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