gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit7eb2898d7eb2898dRecords: mpackdb second-opener rule until day38mre7eb2898d/theme/shell/list-first.hl

3.1 KB

  1. // list-first.hl — SHELL 2, e.g. Notes: the list and the opened item (docs/layouts/list-first.md).
  2. // Phone: the list first; a tap on an item opens its page, where only the item shows (with a `a.back` link to the list).
  3. // 60rem+: list and item side by side over the full width, each scrolling on its own; `/` shows a welcome text.
  4. //
  5. // ListFirst { view = view // 'list' on the list's own route, 'detail' on an item's route
  6. // aside { ul { li { a { href = "/notes/n1" class = "selected" "Reading list" } } } }
  7. // main { a { class = "back" href = "/notes" "All notes" } h1 { "Reading list" } … }
  8. // }
  9. String view = 'list'
  10. slot = null
  11. Style {
  12. listFirst {
  13. display = 'block'
  14. '> aside' {
  15. display = 'block'
  16. padding = '.5rem calc(var(--layout-gutter) - .75rem) 2rem'
  17. }
  18. '> main' {
  19. display = 'block'
  20. minWidth = '0'
  21. padding = '1rem var(--layout-gutter) 3rem'
  22. }
  23. 'a.back' {
  24. display = 'inline-flex'
  25. alignItems = 'center'
  26. minHeight = 'var(--layout-tap)'
  27. marginBottom = '1rem'
  28. fontWeight = '600'
  29. @media {
  30. minWidth = '60rem'
  31. display = 'none'
  32. }
  33. }
  34. @media {
  35. minWidth = '60rem'
  36. display = 'grid'
  37. gridTemplateColumns = 'var(--layout-list) minmax(0, 1fr)'
  38. height = 'calc(100dvh - var(--layout-header))'
  39. }
  40. }
  41. 'list-first.list' {
  42. '> main' { display = 'none' }
  43. }
  44. 'list-first.detail' {
  45. '> aside' { display = 'none' }
  46. }
  47. // slot content from the caller: nesting refused (hybriel#270)
  48. 'list-first > aside ul' {
  49. margin = '0'
  50. padding = '0'
  51. listStyle = 'none'
  52. }
  53. // slot content from the caller: nesting refused (hybriel#270)
  54. 'list-first > aside li' { margin = '0' }
  55. // Keep the whole selector for selector list.
  56. 'list-first > aside li a,
  57. list-first > aside li > a:first-child' {
  58. display = 'flex'
  59. flexDirection = 'column'
  60. alignItems = 'stretch'
  61. justifyContent = 'center'
  62. gap = '.1rem'
  63. minHeight = 'var(--layout-tap)'
  64. padding = '.6rem .75rem'
  65. color = 'var(--color-text)'
  66. borderRadius = 'var(--radius-small)'
  67. }
  68. // slot content from the caller: nesting refused (hybriel#270)
  69. 'list-first > aside li a' {
  70. hover {
  71. textDecoration = 'none'
  72. background = 'var(--color-surface)'
  73. }
  74. }
  75. // Keep the whole selector for selector list.
  76. 'list-first > aside li a.selected,
  77. list-first > aside li a[aria-current="page"]' {
  78. color = 'var(--color-text-strong)'
  79. background = 'var(--color-surface)'
  80. }
  81. // Keep the whole selector for selector list.
  82. 'list-first > aside input,
  83. list-first > aside select' {
  84. width = '100%'
  85. background = 'var(--color-background)'
  86. }
  87. // Keep the whole selector for pseudo-element.
  88. 'list-first a.back::before' { content = '"‹ "' }
  89. @media {
  90. minWidth = '60rem'
  91. // Keep the whole selector for selector list.
  92. 'list-first > aside,
  93. list-first.detail > aside' {
  94. display = 'block'
  95. minHeight = '0'
  96. overflowY = 'auto'
  97. padding = '1rem .75rem 2rem'
  98. background = 'var(--color-background-sunken)'
  99. }
  100. // Keep the whole selector for selector list.
  101. 'list-first > main,
  102. list-first.list > main' {
  103. display = 'block'
  104. minHeight = '0'
  105. overflowY = 'auto'
  106. padding = '1.5rem clamp(1.5rem, 5vw, 5rem) 3rem'
  107. }
  108. }
  109. }
  110. View {
  111. listFirst { class = view slot }
  112. }

Branches

Latest commits

  • 7eb2898dRecords: mpackdb second-opener rule until day38mre
  • b011f98eRecords: style form live on day35mre
  • 60d90cb2Records: L1 woken for the restartmre
  • 75ae544fRecords: restart waits for the connection to closemre
  • e0b75951Records: L1 merged and pushed, restart waits for an open connectionmre
  • f2b5db98styles: format styles with nested rules and bare queriesmre
  • f036bab4search: format styles with nested rules and bare queriesmre
  • ef9a9d4asongs: format styles with nested rules and bare queriesmre
  • f22f9aacmain: format styles with nested rules and bare queriesmre
  • f56cd7c7Sync icons from 8176eb1 and verify mixed component sourcesmre
  • d56e5054Sync theme and shared tokens from layouts 17e0f03mre
  • b1362547Re-vendor to Hybriel set day35mre
  • 89e10f08Records: mission 002 rollback wordingmre
  • 9485dee7Records: mission 002 brief (live step)mre
  • 9ba68fe7Records: S1b reviewedmre
  • 193dfff1Records: S1 result, S1b startedmre
  • 028ed776Records: mission 001 continuation S1bmre
  • 1838d7e8Records: S1 startedmre
  • a43fca3fRecords: mission 001 decided pointsmre
  • 41773828Records: statusmre