gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitf7936c20f7936c20Lists keep their scroll position across a reload (jukebox#20): per-list offsets in storage/ui.json, gate jb20mref7936c20/theme/shell/three-pane.hl

4.0 KB

  1. // three-pane.hl — SHELL 3, e.g. an email client: folders, the list of the open folder, the opened item with its own actions
  2. // (docs/layouts/three-pane.md).
  3. // Phone: the list first (folders = the sidebar overlay from the header's toggle); a tap on an item shows it and the list
  4. // goes (`a.back` returns). 60rem+: all three side by side over the full width, each scrolling on its own.
  5. //
  6. // ThreePane { view = view // 'list' on the folder's route, 'detail' on an item's route
  7. // Sidebar { nav { a { href = "/inbox" 'aria-current' = "page" "Inbox" } } }
  8. // aside { ul { li { a { href = "/inbox/m1" "Subject" } } } }
  9. // main { a { class = "back" href = "/inbox" "Inbox" } menu { li { button { "Reply" } } } article { … } }
  10. // }
  11. String view = 'list'
  12. slot = null
  13. Style {
  14. threePane {
  15. display = 'block'
  16. '> aside' {
  17. display = 'block'
  18. padding = '.5rem calc(var(--layout-gutter) - .75rem) 2rem'
  19. }
  20. '> main' {
  21. display = 'block'
  22. minWidth = '0'
  23. padding = '1rem var(--layout-gutter) 3rem'
  24. '> menu' {
  25. position = 'sticky'
  26. top = 'var(--layout-header)'
  27. zIndex = '2'
  28. display = 'flex'
  29. flexWrap = 'wrap'
  30. gap = '.25rem'
  31. margin = '0 0 1.25rem'
  32. padding = '.3rem'
  33. listStyle = 'none'
  34. background = 'var(--color-background-sunken)'
  35. borderRadius = 'var(--radius-large)'
  36. @media {
  37. minWidth = '60rem'
  38. top = '0'
  39. }
  40. }
  41. }
  42. 'a.back' {
  43. display = 'inline-flex'
  44. alignItems = 'center'
  45. minHeight = 'var(--layout-tap)'
  46. marginBottom = '1rem'
  47. fontWeight = '600'
  48. @media {
  49. minWidth = '60rem'
  50. display = 'none'
  51. }
  52. }
  53. @media {
  54. minWidth = '60rem'
  55. display = 'grid'
  56. gridTemplateColumns = 'var(--layout-sidebar) var(--layout-list) minmax(0, 1fr)'
  57. height = 'calc(100dvh - var(--layout-header))'
  58. '> app-sidebar' {
  59. minHeight = '0'
  60. overflowY = 'auto'
  61. padding = '1rem .75rem 2rem'
  62. }
  63. }
  64. }
  65. 'three-pane.list' {
  66. '> main' { display = 'none' }
  67. }
  68. 'three-pane.detail' {
  69. '> aside' { display = 'none' }
  70. }
  71. // slot content from the caller: nesting refused (hybriel#270)
  72. 'three-pane > aside ul' {
  73. margin = '0'
  74. padding = '0'
  75. listStyle = 'none'
  76. }
  77. // slot content from the caller: nesting refused (hybriel#270)
  78. 'three-pane > aside li' { margin = '0' }
  79. // Keep the whole selector for selector list.
  80. 'three-pane > aside li a,
  81. three-pane > aside li > a:first-child' {
  82. display = 'flex'
  83. flexDirection = 'column'
  84. alignItems = 'stretch'
  85. justifyContent = 'center'
  86. gap = '.1rem'
  87. minHeight = 'var(--layout-tap)'
  88. padding = '.6rem .75rem'
  89. color = 'var(--color-text)'
  90. borderRadius = 'var(--radius-small)'
  91. }
  92. // slot content from the caller: nesting refused (hybriel#270)
  93. 'three-pane > aside li a' {
  94. hover {
  95. textDecoration = 'none'
  96. background = 'var(--color-surface)'
  97. }
  98. }
  99. // Keep the whole selector for selector list.
  100. 'three-pane > aside li a.selected,
  101. three-pane > aside li a[aria-current="page"]' {
  102. color = 'var(--color-text-strong)'
  103. background = 'var(--color-surface)'
  104. }
  105. // Keep the whole selector for selector list.
  106. 'three-pane > aside input,
  107. three-pane > aside select' {
  108. width = '100%'
  109. background = 'var(--color-background)'
  110. }
  111. // Keep the whole selector for pseudo-element.
  112. 'three-pane a.back::before' { content = '"‹ "' }
  113. // slot content from the caller: nesting refused (hybriel#270)
  114. 'three-pane > main > menu li' { margin = '0' }
  115. // slot content from the caller: nesting refused (hybriel#270)
  116. 'three-pane > main > menu button' {
  117. padding = '.4rem .7rem'
  118. hover { background = 'var(--color-background)' }
  119. }
  120. @media {
  121. minWidth = '60rem'
  122. // Keep the whole selector for selector list.
  123. 'three-pane > aside,
  124. three-pane.detail > aside' {
  125. display = 'block'
  126. minHeight = '0'
  127. overflowY = 'auto'
  128. padding = '1rem .75rem 2rem'
  129. background = 'var(--color-background-sunken)'
  130. }
  131. // Keep the whole selector for selector list.
  132. 'three-pane > main,
  133. three-pane.list > main' {
  134. display = 'block'
  135. minHeight = '0'
  136. overflowY = 'auto'
  137. padding = '1.5rem clamp(1.5rem, 4vw, 4rem) 3rem'
  138. }
  139. }
  140. }
  141. View {
  142. threePane { class = view slot }
  143. }

Branches

Latest commits

  • f7936c20Lists keep their scroll position across a reload (jukebox#20): per-list offsets in storage/ui.json, gate jb20mre
  • d67906devirtual-list and icons from components.hybriel e5b98ec (centerId, scrollTop, onScroll)mre
  • df7920ceRecords: R3 startedmre
  • 0549f038Mission 010: jb20 livemre
  • 273494e2STATUS rewrittenmre
  • 227c9b96Records: jb19 livemre
  • 9f365376README: the bar's controls (jb19)mre
  • d18851fdjb19: pressed switches look different (whole selector), queue column cannot widen past the panel, gates follow the new bar (jb3, jb11, jb15)mre
  • 82b54c0ejb19: bar Shuffle · Previous · Play · Next · Repeat, no 10 s buttons; Shuffle switch (shuffle from the playing song, back to the list), Repeat off/all/one, both remembered in ui.json; Shuffle my favourites an ordinary button; gate tests/jb19.mjsmre
  • ba354710jb19: icons pinned to components.hybriel 46fefaa (shuffle, repeat, repeatOne, prevTrack, nextTrack)mre
  • d8e8d059jb19 step 2: media-player from components.hybriel c96709c (skip, repeat options; the end of a song only calls onPlay), sync-components.sh and SOURCE point to it, jb11 counts media loads and metadata writes (from jb21 d3a026e)mre
  • 7b048c1bRecords: jb19 done, L2 live stepmre
  • 665185aeMission 009: jb19 livemre
  • 47b2d3beRecords: P1 resumedmre
  • 8e326e94Records: resetKey blockedmre
  • f72dd7edRecords: icons comingmre
  • b264e5deRecords: P1 icons stopmre
  • 514d7cbeRecords: mission 008 startedmre
  • 61c40127Mission 008: #19 + #21mre
  • 6dcaeb46Records: resetKey planmre