gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit5f82554e5f82554enotes-demo: format Style with nested rules and bare mediamre5f82554e/theme/shell/list-first.hl

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

Branches

Latest commits

  • 5f82554enotes-demo: format Style with nested rules and bare mediamre
  • 3dc27d78mail-demo: format Style with nested rules and bare mediamre
  • cf9648afhome: format Style with nested rules and bare mediamre
  • 846a6242user-menu: format Style with nested rules and bare mediamre
  • 4d58708cthree-pane: format Style with nested rules and bare mediamre
  • 0bbfc553main-menu: format Style with nested rules and bare mediamre
  • 7755199dlist-first: format Style with nested rules and bare mediamre
  • 35199303content-first: format Style with nested rules and bare mediamre
  • 00f6e698app-sidebar: format Style with nested rules and bare mediamre
  • bb2f29c9app-header: format Style with nested rules and bare mediamre
  • 3aca2d7fSync components from 8176eb1 with reviewed nested stylesmre
  • 87e4003dRe-vendor layouts to Hybriel set day35mre
  • d8628cfflayouts: a startup error prints its message before exit 1 (hybriel#247)mre
  • 180fd76elayouts: MdEditor from components 59704ce (text on the clipboard always pastes, a file manager copy still attaches; pipe rows; empty Table-button table; tickets#49, notes#5)mre
  • a3eda8afRe-vendor Hybriel master 7a684920 (binary 74ab3715): plugins whole, startup fault exits 1; files-upload gate 340/0mre
  • 025d5880WIP re-vendor Hybriel set-day27b (a9712e61, master f5ff97bf): plugins whole, startup fault exits 1; NOT deployable: files-upload emit refused (see .scratch/rv27-upload)mre
  • 42183a71Merge sb3-standby: layouts deploys through its standbymre
  • 408de1f2layouts: no jobs switch needed in the standbymre
  • 0b85f57elayouts: a standby container (port 45019, profile standby); deploy hands over through standby-swap.sh without a gapmre
  • 31e40b8bMerge dm3-media: range handling in the layouts media routemre