gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmain4099e64aMerge branch 'font-segoe-ui' into mainAtlasmain/components/demo/tracker-demo.hl

3.1 KB

  1. // components/demo/tracker-demo.hl — `/shells/content-first[/:kind]`: SHELL 1 as a mock tracker, signed out. The header has
  2. // the main menu (Series | Shows | Movies | Genres | People) on desktop; on the phone it lives in a phone-only sidebar the
  3. // toggle opens. The content is the centred column the header's contents are flush with. `kind` filters the mock titles.
  4. parent '../main.hl'
  5. import AppHeader from '../../theme/shell/app-header.hl'
  6. import MainMenu from '../../theme/shell/main-menu.hl'
  7. import Sidebar from '../../theme/shell/app-sidebar.hl'
  8. import ContentFirst from '../../theme/shell/content-first.hl'
  9. import { titles } from '../../lib/mock.hl'
  10. static menu = [
  11. { label = 'Series' href = '/shells/content-first/series' }
  12. { label = 'Shows' href = '/shells/content-first/show' count = 12 }
  13. { label = 'Movies' href = '/shells/content-first/movie' }
  14. { label = 'Genres' href = '/shells/content-first/genre' }
  15. { label = 'People' href = '/shells/content-first/person' }
  16. ]
  17. kind = null
  18. // the all-titles page has no path of a menu item: the host says Series is the current one (item.current)
  19. Hybrid items = flag(menu, kind)
  20. String current = kind == null ? '/shells/content-first' : '/shells/content-first/' + kind // MainMenu gets no `current`: it marks the page from the route (hybriel#197)
  21. String heading = kind == null ? 'Everything' : kind.slice(0, 1).toUpperCase() + kind.slice(1)
  22. Hybrid shown = pick(kind)
  23. __title = 'Content-first demo · WorldAPI layouts'
  24. flag(Hybrid list, String k) {
  25. out = []
  26. for (m of list) { out.push({ label = m.label href = m.href count = m.count current = k == null && m.label == 'Series' }) }
  27. return out
  28. }
  29. pick(String k) {
  30. out = []
  31. for (t of titles) {
  32. 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 }) }
  33. }
  34. return out
  35. }
  36. Style {
  37. trackerDemo {
  38. 'ul.titles' {
  39. display = 'grid'
  40. gap = '.25rem'
  41. margin = '0'
  42. padding = '0'
  43. listStyle = 'none'
  44. li {
  45. display = 'flex'
  46. flexWrap = 'wrap'
  47. alignItems = 'baseline'
  48. gap = '.25rem .75rem'
  49. margin = '0'
  50. padding = '.6rem 0'
  51. }
  52. a { fontWeight = '700' }
  53. '.next' {
  54. flexBasis = '100%'
  55. color = 'var(--color-text-muted)'
  56. fontSize = '.9rem'
  57. @media {
  58. minWidth = '40rem'
  59. flexBasis = 'auto'
  60. marginLeft = 'auto'
  61. }
  62. }
  63. }
  64. }
  65. }
  66. View {
  67. trackerDemo {
  68. AppHeader { brand = "Tracker (demo)" brandHref = "/shells/content-first" search = "/search" searchPlaceholder = "Search titles…"
  69. MainMenu { items = items }
  70. a { class = "button primary" href = "/shells" "Log in" }
  71. }
  72. ContentFirst {
  73. Sidebar { desktop = "false"
  74. MainMenu { items = items }
  75. }
  76. main {
  77. p { class = "links" a { href = "/shells" "‹ Shells" } }
  78. h1 { heading }
  79. 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." }
  80. ul { class = "titles"
  81. for (t of shown) { li { a { class = t.type href = current t.title } span { class = t.pill t.kind } span { class = "next" t.next } } }
  82. }
  83. }
  84. }
  85. }
  86. }

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