gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit43b564db43b564dbMerge branch 'records-1124b' into mainJukebox43b564db/theme/shell/app-sidebar.hl

3.3 KB

  1. // app-sidebar.hl — THE SIDEBAR: on the phone an overlay that slides in from the left (the header's toggle opens it), from
  2. // 60rem a column of the shell (content-first, three-pane) (docs/layouts/app-sidebar.md). ONE per page: it is `#sidebar`.
  3. //
  4. // ContentFirst {
  5. // Sidebar { MainMenu { items = menu current = "/series" } nav { a { href = "/series/new" "New series" } } }
  6. // main { … }
  7. // }
  8. //
  9. // `desktop = "false"`: a sidebar for the phone only (it holds just the main menu, which the header shows on desktop).
  10. // The overlay is the browser's popover: Esc, a tap outside, the × and a tap on one of its links close it.
  11. String desktop = 'true'
  12. String closeLabel = 'Close'
  13. String cls = desktop == 'false' ? 'mobile-only' : ''
  14. slot = null
  15. Style {
  16. 'app-sidebar:popover-open' {
  17. position = 'fixed'
  18. inset = '0 auto 0 0'
  19. display = 'block'
  20. width = 'min(20rem, 86vw)'
  21. height = '100dvh'
  22. maxHeight = 'none'
  23. margin = '0'
  24. padding = '.5rem 1rem 2rem'
  25. overflowY = 'auto'
  26. color = 'var(--color-text)'
  27. background = 'var(--color-background-sunken)'
  28. border = '0'
  29. }
  30. // Keep the whole selector for pseudo-element.
  31. 'app-sidebar::backdrop' {
  32. background = 'var(--color-background-sunken)'
  33. opacity = '.7'
  34. }
  35. appSidebar {
  36. '> button.sidebar-close' {
  37. display = 'flex'
  38. width = 'var(--layout-tap)'
  39. height = 'var(--layout-tap)'
  40. minHeight = '0'
  41. marginLeft = 'auto'
  42. padding = '0'
  43. fontSize = '1.6rem'
  44. fontWeight = '400'
  45. lineHeight = '1'
  46. color = 'var(--color-text-muted)'
  47. @media {
  48. minWidth = '60rem'
  49. display = 'none'
  50. }
  51. }
  52. }
  53. // Keep the whole selector for selector list.
  54. 'app-sidebar nav a.current,
  55. app-sidebar nav a[aria-current="page"]' {
  56. color = 'var(--color-accent)'
  57. background = 'var(--color-surface)'
  58. }
  59. // Keep the whole selector for selector list.
  60. 'app-sidebar,
  61. app-sidebar:popover-open' {
  62. @media {
  63. minWidth = '60rem'
  64. position = 'static'
  65. inset = 'auto'
  66. display = 'block'
  67. width = 'auto'
  68. height = 'auto'
  69. margin = '0'
  70. padding = '0'
  71. overflow = 'visible'
  72. color = 'inherit'
  73. background = 'transparent'
  74. border = '0'
  75. }
  76. }
  77. // Keep the whole selector for selector list.
  78. 'app-sidebar.mobile-only,
  79. app-sidebar.mobile-only:popover-open' {
  80. @media {
  81. minWidth = '60rem'
  82. display = 'none'
  83. }
  84. }
  85. // Caller slot content is unknown here, so its selectors must be whole.
  86. 'app-sidebar h2' {
  87. margin = '1rem 0 .35rem'
  88. padding = '0 .75rem'
  89. fontSize = '.8rem'
  90. fontWeight = '700'
  91. letterSpacing = '.04em'
  92. textTransform = 'uppercase'
  93. color = 'var(--color-text-muted)'
  94. }
  95. 'app-sidebar nav a' {
  96. display = 'flex'
  97. alignItems = 'center'
  98. minHeight = 'var(--layout-tap)'
  99. padding = '.45rem .75rem'
  100. color = 'var(--color-text)'
  101. borderRadius = 'var(--radius-small)'
  102. }
  103. 'app-sidebar nav a:hover' {
  104. textDecoration = 'none'
  105. color = 'var(--color-text-strong)'
  106. background = 'var(--color-surface)'
  107. }
  108. }
  109. View {
  110. appSidebar { id = "sidebar" class = cls popover = "auto" on click(e) { emit sidebarClick(e) }
  111. button { type = "button" class = "sidebar-close" popovertarget = "sidebar" popovertargetaction = "hide" title = closeLabel 'aria-label' = closeLabel "×" }
  112. slot
  113. }
  114. }
  115. // a tap on a link inside the open overlay closes it (a page change in place would leave it open)
  116. on sidebarClick(e) {
  117. if (e.target.closest('a') != null && e.currentTarget.matches(':popover-open')) { e.currentTarget.hidePopover() }
  118. }

Branches

Latest commits

  • 43b564dbMerge branch 'records-1124b' into mainJukebox
  • fa86b08c|||PR Records 2026-11-24: LOG, STATUS, missions 020-023mre
  • 0a2ae3daMerge remote-tracking branch 'origin/records-1123' into records-1124mre
  • 9a48cfcaMerge branch 'vendor-theme' into mainJukebox
  • 170d3735Merge branch 'code-order-2' into mainJukebox
  • 3f1918a7|||PR Re-sync layouts theme 4099e64 with Segoe UI firstmre
  • 2e7f6a43Vendor virtual-list 489afcf from components.hybrielmre
  • 0ba85799Merge branch 'reset-classes' into mainJukebox
  • 502eeed5jukebox#20: vendor virtual-list initial resetKey baseline fixmre
  • 6d5ce287|||PR jukebox#9 Centralize songs table reads and writes in db.hlmre
  • dcca21abjukebox#8 Move copies and queue logic into their topicsmre
  • 3b76651cjukebox#20: update virtual-list README pin and resetKey optionsmre
  • bc09e1e8|||PR jukebox#20: reset virtual lists through resetKey (partial validation)mre
  • a3796dc5Records: live step waits for idlemre
  • 3b158e16Records: merges of #9 and #11mre
  • 27204167Merge main into records-1123mre
  • 10f8a8c8Merge branch 'code-order' into mainJukebox
  • 204fc828Merge branch 'day72' into mainJukebox
  • 8e8d0e2b|||PR Records: PROCEDURES.md, missions 016-019, GO 2026-11-23mre
  • 95f5faae|||PR jukebox#7 Drop needless let declarationsmre