gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit99db79f099db79f0re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre99db79f0/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(list, 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(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. 'tracker-demo ul.titles' { display = 'grid' gap = '.25rem' margin = '0' padding = '0' listStyle = 'none' }
  38. 'tracker-demo ul.titles li' { display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.25rem .75rem' margin = '0' padding = '.6rem 0' }
  39. 'tracker-demo ul.titles a' { fontWeight = '700' }
  40. 'tracker-demo ul.titles .next' { flexBasis = '100%' color = 'var(--color-text-muted)' fontSize = '.9rem' }
  41. '@media (min-width: 40rem)' {
  42. 'tracker-demo ul.titles .next' { flexBasis = 'auto' marginLeft = 'auto' }
  43. }
  44. }
  45. View {
  46. trackerDemo {
  47. AppHeader { brand = "Tracker (demo)" brandHref = "/shells/content-first" search = "/search" searchPlaceholder = "Search titles…"
  48. MainMenu { items = items }
  49. a { class = "button primary" href = "/shells" "Log in" }
  50. }
  51. ContentFirst {
  52. Sidebar { desktop = "false"
  53. MainMenu { items = items }
  54. }
  55. main {
  56. p { class = "links" a { href = "/shells" "‹ Shells" } }
  57. h1 { heading }
  58. 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." }
  59. ul { class = "titles"
  60. for (t of shown) { li { a { class = t.type href = current t.title } span { class = t.pill t.kind } span { class = "next" t.next } } }
  61. }
  62. }
  63. }
  64. }
  65. }

Branches

Latest commits

  • 99db79f0re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
  • 30353f60tests: e2e-md-showcase Chrome range from LAYOUTS_GATE_CHROME_MD, default unchangedmre
  • 16a7878cre-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
  • 6af559e8docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
  • 5599cf56deploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • 0bcc6294Mission 011: e2e-197, brief, report, LOGmre
  • 137303c5MainMenu marks the current page from the route (hybriel#197, server-rendered); current prop/item.current stay as fallback; tracker demo drops current; gate: SSR marker; docsmre
  • 9325b403Re-vendor Hybriel to master 7f13a82f (hl:web batch 2: #190 #193 #197 #194 named regions); plugins whole, bin/hybriel static build (git-ignored)mre
  • b31dc74dusage: calendar (theme 76f99f6-era ContentFirst, user menu, ☰ menu) and tracker (theme 76f99f6, modal + pagination current, own current marker until hybriel#197) rowsmre
  • 8a3d5d40Mission 010: brief, report, LOG, STATUSmre
  • a56abf1fSync components to components.hybriel 3794c59 (MdEditor real-key fixes); showcase real-key check on the md-editor pagemre
  • 76f99f64E2E in lisbeth's Chrome for the menu's current page (mission 009): tests/e2e-menu-current.mjs, reportmre
  • 159b1d53MainMenu/Sidebar: current page marked beyond colour, count badge, item current flag; gate 300/0 (mission 009)mre
  • 0573eed3usage: notes + tickets on MdEditor (md-editor.js retired), gitoria on theme dbe3de7, tracker theme oldermre
  • 78478f6eSync showcase to components.hybriel 1442e58: pick-mode page, comments attach, md-editor rows/files off; gates 285/0mre
  • dbe3de79Display bugs from a real Chrome walk (mission 007): Settings page and in-shell doc reader instead of raw .md links, closed phone search hidden whatever a page says, /elements form rules scoped, three-pane danger contrast; display audit gate (132 -> 244 checks), walk + Settings e2e toolsmre
  • 1875a051Theme: 44 px tap targets mobile first (layoutTap), 16 px fields, desktop denser only in @media 60rem; 390 px tap audit + gate checks (mission 006)mre
  • 3d4f8e19Sync showcase to components.hybriel 9db927d: comments and files-upload pages, pagination onPage, md-editor readonly, gate 99 checksmre
  • 64d635acmission brief 005mre
  • 0d0fef25paths: projects moved into /media/STORAGE/projects/WorldAPI/mre