gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmain10f8a8c8Merge branch 'code-order' into mainJukeboxmain/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

  • 10f8a8c8Merge branch 'code-order' into mainJukebox
  • 204fc828Merge branch 'day72' into mainJukebox
  • 95f5faae|||PR jukebox#7 Drop needless let declarationsmre
  • 33072bb5|||PR Record day72 gates and Chrome proofmre
  • 95f2cd73|||PR Use typed parent methods for screen playback and local server facesmre
  • 6422a020Sync media-player at 51c3818mre
  • b582ba1cVendor complete Hybriel day72 plugin setmre
  • 02dccbc9Merge branch 'records-1119' into mainJukebox
  • a39e1c23|||PR Records: missions 013-015, reconnect fix livemre
  • fc7db075Merge branch 'reconnect-retry' into mainJukebox
  • ac6f4c6fL2: plain declaration for a in pickedNextmre
  • 2f335086Review round 2: only an explicit queue pick drops pend (not the automatic advance); jb23 records every source changemre
  • 3eb6695fReview fixes: action generation, queue pick clears pend, Previous/Next retry the decided request, typed handlersmre
  • 7a53c0c2|||PR A tap lost to a dead socket plays after reconnect (mission 015)mre
  • 1f0cd77bMerge branch 'records-day41' into mainJukebox
  • 67be229f|||PR Records: day41 live (PR #4), mission 012, statusmre
  • 0bb027daconductor: caramboleyo is the user, not owner/creatorApollo
  • 04f5d9d5Merge branch 'day41' into mainJukebox
  • 8ed6da45|||PR README: media-player pin df9e7dfmre
  • d5d45fc3|||PR media-player df9e7df (repeat-one fix), sync pin and SOURCEmre