gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit8d9ed0b88d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre8d9ed0b8/theme/shell/list-first.hl

2.9 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. ul {
  18. margin = '0'
  19. padding = '0'
  20. listStyle = 'none'
  21. }
  22. li {
  23. margin = '0'
  24. a {
  25. hover {
  26. textDecoration = 'none'
  27. background = 'var(--color-surface)'
  28. }
  29. }
  30. }
  31. }
  32. '> main' {
  33. display = 'block'
  34. minWidth = '0'
  35. padding = '1rem var(--layout-gutter) 3rem'
  36. }
  37. 'a.back' {
  38. display = 'inline-flex'
  39. alignItems = 'center'
  40. minHeight = 'var(--layout-tap)'
  41. marginBottom = '1rem'
  42. fontWeight = '600'
  43. @media {
  44. minWidth = '60rem'
  45. display = 'none'
  46. }
  47. }
  48. @media {
  49. minWidth = '60rem'
  50. display = 'grid'
  51. gridTemplateColumns = 'var(--layout-list) minmax(0, 1fr)'
  52. height = 'calc(100dvh - var(--layout-header))'
  53. }
  54. }
  55. 'list-first.list' {
  56. '> main' { display = 'none' }
  57. }
  58. 'list-first.detail' {
  59. '> aside' { display = 'none' }
  60. }
  61. // Keep the whole selector for selector list.
  62. 'list-first > aside li a,
  63. list-first > aside li > a:first-child' {
  64. display = 'flex'
  65. flexDirection = 'column'
  66. alignItems = 'stretch'
  67. justifyContent = 'center'
  68. gap = '.1rem'
  69. minHeight = 'var(--layout-tap)'
  70. padding = '.6rem .75rem'
  71. color = 'var(--color-text)'
  72. borderRadius = 'var(--radius-small)'
  73. }
  74. // Keep the whole selector for selector list.
  75. 'list-first > aside li a.selected,
  76. list-first > aside li a[aria-current="page"]' {
  77. color = 'var(--color-text-strong)'
  78. background = 'var(--color-surface)'
  79. }
  80. // Keep the whole selector for selector list.
  81. 'list-first > aside input,
  82. list-first > aside select' {
  83. width = '100%'
  84. background = 'var(--color-background)'
  85. }
  86. // Keep the whole selector for pseudo-element.
  87. 'list-first a.back::before' { content = '"‹ "' }
  88. @media {
  89. minWidth = '60rem'
  90. // Keep the whole selector for selector list.
  91. 'list-first > aside,
  92. list-first.detail > aside' {
  93. display = 'block'
  94. minHeight = '0'
  95. overflowY = 'auto'
  96. padding = '1rem .75rem 2rem'
  97. background = 'var(--color-background-sunken)'
  98. }
  99. // Keep the whole selector for selector list.
  100. 'list-first > main,
  101. list-first.list > main' {
  102. display = 'block'
  103. minHeight = '0'
  104. overflowY = 'auto'
  105. padding = '1.5rem clamp(1.5rem, 5vw, 5rem) 3rem'
  106. }
  107. }
  108. }
  109. View {
  110. listFirst { class = view slot }
  111. }

Branches

Latest commits

  • 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
  • 05413975list-first: nest child and compound selectors in Stylemre
  • c545b642content-first: nest child and compound selectors in Stylemre