gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit12cd399212cd3992Re-vendor complete Hybriel plugins and runtime to day44mre12cd3992/theme/shell/three-pane.hl

3.6 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. ul {
  20. margin = '0'
  21. padding = '0'
  22. listStyle = 'none'
  23. }
  24. li {
  25. margin = '0'
  26. a {
  27. hover {
  28. textDecoration = 'none'
  29. background = 'var(--color-surface)'
  30. }
  31. }
  32. }
  33. }
  34. '> main' {
  35. display = 'block'
  36. minWidth = '0'
  37. padding = '1rem var(--layout-gutter) 3rem'
  38. '> menu' {
  39. position = 'sticky'
  40. top = 'var(--layout-header)'
  41. zIndex = '2'
  42. display = 'flex'
  43. flexWrap = 'wrap'
  44. gap = '.25rem'
  45. margin = '0 0 1.25rem'
  46. padding = '.3rem'
  47. listStyle = 'none'
  48. background = 'var(--color-background-sunken)'
  49. borderRadius = 'var(--radius-large)'
  50. @media {
  51. minWidth = '60rem'
  52. top = '0'
  53. }
  54. li { margin = '0' }
  55. button {
  56. padding = '.4rem .7rem'
  57. hover { background = 'var(--color-background)' }
  58. }
  59. }
  60. }
  61. 'a.back' {
  62. display = 'inline-flex'
  63. alignItems = 'center'
  64. minHeight = 'var(--layout-tap)'
  65. marginBottom = '1rem'
  66. fontWeight = '600'
  67. @media {
  68. minWidth = '60rem'
  69. display = 'none'
  70. }
  71. }
  72. @media {
  73. minWidth = '60rem'
  74. display = 'grid'
  75. gridTemplateColumns = 'var(--layout-sidebar) var(--layout-list) minmax(0, 1fr)'
  76. height = 'calc(100dvh - var(--layout-header))'
  77. '> app-sidebar' {
  78. minHeight = '0'
  79. overflowY = 'auto'
  80. padding = '1rem .75rem 2rem'
  81. }
  82. }
  83. }
  84. 'three-pane.list' {
  85. '> main' { display = 'none' }
  86. }
  87. 'three-pane.detail' {
  88. '> aside' { display = 'none' }
  89. }
  90. // Keep the whole selector for selector list.
  91. 'three-pane > aside li a,
  92. three-pane > aside li > a:first-child' {
  93. display = 'flex'
  94. flexDirection = 'column'
  95. alignItems = 'stretch'
  96. justifyContent = 'center'
  97. gap = '.1rem'
  98. minHeight = 'var(--layout-tap)'
  99. padding = '.6rem .75rem'
  100. color = 'var(--color-text)'
  101. borderRadius = 'var(--radius-small)'
  102. }
  103. // Keep the whole selector for selector list.
  104. 'three-pane > aside li a.selected,
  105. three-pane > aside li a[aria-current="page"]' {
  106. color = 'var(--color-text-strong)'
  107. background = 'var(--color-surface)'
  108. }
  109. // Keep the whole selector for selector list.
  110. 'three-pane > aside input,
  111. three-pane > aside select' {
  112. width = '100%'
  113. background = 'var(--color-background)'
  114. }
  115. // Keep the whole selector for pseudo-element.
  116. 'three-pane a.back::before' { content = '"‹ "' }
  117. @media {
  118. minWidth = '60rem'
  119. // Keep the whole selector for selector list.
  120. 'three-pane > aside,
  121. three-pane.detail > aside' {
  122. display = 'block'
  123. minHeight = '0'
  124. overflowY = 'auto'
  125. padding = '1rem .75rem 2rem'
  126. background = 'var(--color-background-sunken)'
  127. }
  128. // Keep the whole selector for selector list.
  129. 'three-pane > main,
  130. three-pane.list > main' {
  131. display = 'block'
  132. minHeight = '0'
  133. overflowY = 'auto'
  134. padding = '1.5rem clamp(1.5rem, 4vw, 4rem) 3rem'
  135. }
  136. }
  137. }
  138. View {
  139. threePane { class = view slot }
  140. }

Branches

Latest commits

  • 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
  • b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
  • 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
  • ebd00b6cNest caller slot styles in three-panemre
  • 009991efNest caller slot styles in list-firstmre
  • 494d75d4Nest caller slot styles in app-sidebarmre
  • e5571680Align all plugin sources with Hybriel day38bmre
  • 5d204c46Re-vendor layouts to Hybriel set day38bmre
  • 17e0f03eNest html-prefixed theme component overridesmre
  • e54e735eFormat plain theme elements with nested rules and bare mediamre
  • 547f834eRecord LY7 deployment and live verificationmre
  • fa4600b1Link caller-slot style exceptions to hybriel#270mre
  • 413b11e1Record corrected LY7 nesting, exact CSS and Chrome proofmre
  • b810453etracker-demo: nest child and compound selectors in Stylemre
  • 0b5b1d61notes-demo: nest child and compound selectors in Stylemre
  • ab22bdc2mail-demo: nest child and compound selectors in Stylemre
  • fe2d8de9home: nest child and compound selectors in Stylemre
  • e631791buser-menu: nest child and compound selectors in Stylemre
  • 69604944three-pane: nest child and compound selectors in Stylemre
  • 3e389b83main-menu: nest child and compound selectors in Stylemre