gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit7d38cec47d38cec4docker-compose: nofile 65536 (default soft 1024 refused boot: errno 24 in fs.listDir, Hybriel 528bc89f)mre7d38cec4/theme/shell/main-menu.hl

3.0 KB

  1. // main-menu.hl — THE MAIN MENU: the app's top-level links, `Series | Shows | Movies` (docs/layouts/main-menu.md).
  2. // Write it twice from ONE list: in the header (shown from 60rem) and in the sidebar (shown on the phone, where the
  3. // header has no room). The link whose href is `current` (or a page below it) is marked: class `current` and
  4. // aria-current="page". Without a matching path the host says which one: `current = "/docs"` (the page /read/x is
  5. // under Docs) or `current = true` on the item itself. An item may carry a small count: `count = 3` (a badge, not text).
  6. //
  7. // static menu = [ { label = 'Series' href = '/series' } { label = 'Movies' href = '/movies' } ]
  8. // AppHeader { MainMenu { items = menu current = "/series" } }
  9. // Sidebar { desktop = "false" MainMenu { items = menu current = "/series" } }
  10. Hybrid items = []
  11. String current = ''
  12. String label = 'Main menu'
  13. Hybrid rows = build(items, current)
  14. // one row per link: the current one (the page itself or a page below it) is marked
  15. build(list, at) {
  16. out = []
  17. for (it of list) {
  18. let here = it.current == true || at == it.href || (it.href != '/' && at.startsWith(it.href + '/'))
  19. let n = it.count == null ? '' : '' + it.count
  20. out.push({ label = it.label href = it.href count = n has = n != '' cls = here ? 'current' : '' aria = here ? 'page' : 'false' })
  21. }
  22. return out
  23. }
  24. Style {
  25. 'main-menu' { display = 'block' }
  26. 'main-menu a' { display = 'flex' alignItems = 'center' minHeight = 'var(--layout-tap)' padding = '.55rem .75rem' fontWeight = '600' color = 'var(--color-text)' borderRadius = 'var(--radius-small)' }
  27. 'main-menu a:hover' { textDecoration = 'none' color = 'var(--color-text-strong)' background = 'var(--color-surface)' }
  28. // the marked link: accent text AND a bar in the accent (not colour alone), on the surface
  29. 'main-menu a.current' { color = 'var(--color-accent)' background = 'var(--color-surface)' boxShadow = 'inset .2rem 0 0 var(--color-accent)' }
  30. 'main-menu a span.count' { marginLeft = '.5rem' padding = '0 .45rem' minWidth = '1.4rem' textAlign = 'center' fontSize = '.8rem' fontWeight = '700' lineHeight = '1.4rem' color = 'var(--color-accent-text)' background = 'var(--color-accent)' borderRadius = 'var(--radius-small)' }
  31. // in the header: only from 60rem, the links in a row
  32. 'application-header main-menu' { display = 'none' }
  33. // in the sidebar: only on the phone, the links stacked
  34. 'app-sidebar main-menu' { marginBottom = '1rem' }
  35. '@media (min-width: 60rem)' {
  36. 'application-header main-menu' { display = 'block' marginLeft = 'auto' }
  37. 'application-header main-menu nav' { display = 'flex' gap = '.15rem' }
  38. 'application-header main-menu a' { minHeight = '2.25rem' padding = '.45rem .7rem' }
  39. 'application-header main-menu a.current' { boxShadow = 'inset 0 -.2rem 0 var(--color-accent)' }
  40. 'app-sidebar main-menu' { display = 'none' }
  41. }
  42. }
  43. View {
  44. mainMenu {
  45. nav { 'aria-label' = label
  46. for (r of rows) { a { href = r.href class = r.cls 'aria-current' = r.aria r.label if (r.has) { span { class = 'count' r.count } } } }
  47. }
  48. }
  49. }

Branches

Latest commits

  • 7d38cec4docker-compose: nofile 65536 (default soft 1024 refused boot: errno 24 in fs.listDir, Hybriel 528bc89f)mre
  • 5965963adeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • 9b3828aemission 046a: report, LOGmre
  • 4b37356emission 046: franchise seed supersedeCollections reads the curated timelines once (10 s one-tick block at the end of boot)mre
  • ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mre
  • 322b3293mission 046: photoQueue guard for non-row fetch results (damaged persons index)mre
  • e5b99aecmission 046: photoQueue in slices (people.hl photoQueueStart/Step, jobs.hl photoTick), tests/photoqueue.hlmre
  • 31dcf2admission 045: report, LOGmre
  • 9c3971d0tests/persons-skip-count.hlmre
  • 4d72e365mission 045mre
  • b9cae4c9slices: skip and count non-row values from range(); merge persons pass falls back to iterate; guard testmre
  • 3db7dc31merge w44-jobs-slices into w43-trkmemmre
  • 593dab6fmission 043: report, LOGmre
  • 1a5a4818boot scans back to iterate (slices measured slower: titles 114 s, episodes 141 s, persons failed); lambda per rowmre
  • 03d29893boot scans read primary-key slices (lib/slices.hl from mission 044): iterate is eager too; people view log line back; allShows/allEpisodes stay for toolsmre
  • 23375c58mission 044: report, LOG, STATUSmre
  • c6fd928emission 044: 4096 slices for tables over 200 K rows, 15 ms budget, TRACKER_SLICE_DEPTH for testsmre
  • fb057680mission 044: jobs.hl imports mergeLeft (gate found it), mission file, slices benchmre
  • 0d6293ebmission 043: mission filemre
  • d25bd14amission 044: sliced merge prepare + sliced collections prepare; jobs-dump old/new check + bulk fixturemre