layouts
All repositories: gitoria
6.3 KB
// components/elements.hl — `/elements`: every plain element the theme styles, with mock content: text, links, buttons,// fields, foldables, a drop zone, a table, pills and type colours, empty states and an overlong title.parent './main.hl'import SiteHeader from './site-header.hl'import SiteSidebar from './site-sidebar.hl'import ContentFirst from '../theme/shell/content-first.hl'__title = 'Elements · WorldAPI layouts'String dropped = 'Nothing dropped yet.'Style {elementsPage {section {marginBottom = '2.5rem'form {display = 'grid'gap = '1rem'maxWidth = '32rem'p { margin = '0' }}}fieldset {label {display = 'inline-flex'alignItems = 'center'gap = '.4rem'marginRight = '1rem'fontWeight = '400'color = 'var(--color-text)'}}}'elements-page p.row' {display = 'flex'flexWrap = 'wrap'alignItems = 'center'gap = '.5rem'}'elements-page section input:not([type="checkbox"]):not([type="radio"]),elements-page section select' { width = '100%' }}View {elementsPage {SiteHeader { current = "/elements" }ContentFirst {SiteSidebar { current = "/elements" }main {h1 { "Elements" }p { class = "muted" "Plain HTML, themed. No frames: a border appears only where it means something — the foldable and the drop zone below, and the focus ring." }section {h2 { "Text" }p { "Body text is light on dark. " strong { "Strong text and titles are white." } " Links take the accent: " a { href = "/elements" "a link to this page" } ". Inline " code { "code" } ", a key " kbd { "Ctrl" } " and " small { "small print" } "." }p { class = "muted" "Muted text says something secondary: updated 3 minutes ago." }h3 { "A third-level title" }ul { li { "First point" } li { "Second point, with a longer text that wraps onto the next line on a phone to show the indent of the list" } li { "Third point" } }pre { code { "inherit './theme/theme.hl'" } }}section {h2 { "Buttons" }p { class = "row"button { type = "button" class = "primary" "Save" }button { type = "button" "Cancel" }button { type = "button" class = "danger" "Delete" }button { type = "button" disabled = "disabled" "Disabled" }a { class = "button" href = "/elements" "A link as a button" }}p { class = "muted" "Quiet by default; the accent marks the one main action; danger says it destroys something." }}section {h2 { "Fields" }form { method = "get" action = "/elements"p { label { 'for' = "el-title" "Title" } input { id = "el-title" type = "text" name = "title" placeholder = "A title" } }p { label { 'for' = "el-mail" "E-mail (invalid)" } input { id = "el-mail" type = "email" name = "mail" value = "not an address" 'aria-invalid' = "true" } }p { label { 'for' = "el-kind" "Kind" } select { id = "el-kind" name = "kind" option { "Series" } option { "Movie" } option { "Show" } } }p { label { 'for' = "el-notes" "Notes" } textarea { id = "el-notes" name = "notes" placeholder = "Write…" } }fieldset {legend { "Show" }label { input { type = "checkbox" name = "watched" checked = "checked" } "Watched" }label { input { type = "radio" name = "order" value = "new" checked = "checked" } "Newest first" }label { input { type = "radio" name = "order" value = "old" } "Oldest first" }}p { button { type = "submit" "Send" } }}}section {h2 { "Foldables" }p { class = "muted" "The border is part of the foldable, like the tracker's seasons." }details { open = "open"summary { "Season 2 · 8 episodes" }ol { li { "The Fall" } li { "Lamia" } li { "Feral" } }}details {summary { "Season 1 · 10 episodes" }p { "Folded until opened." }}}section {h2 { "Drop zone" }dropZone { id = "el-drop" on dragover(e) { emit elDragOver(e) } on dragleave(e) { emit elDragLeave(e) } on drop(e) { emit elDrop(e) }"Drop a file here"}p { class = "muted" output { id = "el-dropped" dropped } }}section {h2 { "Table" }table {thead { tr { th { "Title" } th { "Type" } th { "Next" } } }tbody {tr { td { "Reacher" } td { span { class = "pill type-2" "Series" } } td { "S03E08" } }tr { td { "Dune: Part Two" } td { span { class = "pill type-1" "Movie" } } td { class = "muted" "watched" } }tr { td { "Late Night with the Devil" } td { span { class = "pill type-1" "Movie" } } td { "—" } }tr { td { "Taskmaster" } td { span { class = "pill type-3" "Show" } } td { "S18E02" } }}}}section {h2 { "Type colours and pills" }p { class = "muted" "Six slots an app names (the tracker: 1 Movie, 2 Series, 3 Show, 4 Genre, 5 Person). A pill is inverted: text on the colour." }p { class = "row"span { class = "pill type-1" "Movie" } span { class = "pill type-2" "Series" } span { class = "pill type-3" "Show" }span { class = "pill type-4" "Genre" } span { class = "pill type-5" "Person" } span { class = "pill type-6" "Type 6" }}p { class = "row"a { class = "type-1" href = "/elements" "Dune: Part Two" } a { class = "type-2" href = "/elements" "Reacher" } a { class = "type-3" href = "/elements" "Taskmaster" }a { class = "type-4" href = "/elements" "Science Fiction" } a { class = "type-5" href = "/elements" "Alan Ritchson" }}p { class = "row"span { class = "pill" "Accent" } span { class = "pill success" "Running" } span { class = "pill warning" "Paused" } span { class = "pill danger" "Ended" } span { class = "pill quiet" "Unknown" }}}section {h2 { "Empty state and an overlong title" }p { class = "empty" "No notes yet." }h3 { "Averyveryverylongtitlewithoutanyspacethatmustnotpushthepagesidewaysonaphone and then some more words to wrap" }}}}}}on elDragOver(e) {e.preventDefault()e.currentTarget.classList.add('over')}on elDragLeave(e) { e.currentTarget.classList.remove('over') }on elDrop(e) {e.preventDefault()e.currentTarget.classList.remove('over')files = e.dataTransfer.filesdropped = files.length > 0 ? 'Dropped: ' + files[0].name + ' (kept nowhere — a showcase)' : 'Dropped something without a file.'}
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