gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit9f3653769f365376README: the bar's controls (jb19)mre9f365376/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

  • 9f365376README: the bar's controls (jb19)mre
  • d18851fdjb19: pressed switches look different (whole selector), queue column cannot widen past the panel, gates follow the new bar (jb3, jb11, jb15)mre
  • 82b54c0ejb19: bar Shuffle · Previous · Play · Next · Repeat, no 10 s buttons; Shuffle switch (shuffle from the playing song, back to the list), Repeat off/all/one, both remembered in ui.json; Shuffle my favourites an ordinary button; gate tests/jb19.mjsmre
  • ba354710jb19: icons pinned to components.hybriel 46fefaa (shuffle, repeat, repeatOne, prevTrack, nextTrack)mre
  • d8e8d059jb19 step 2: media-player from components.hybriel c96709c (skip, repeat options; the end of a song only calls onPlay), sync-components.sh and SOURCE point to it, jb11 counts media loads and metadata writes (from jb21 d3a026e)mre
  • 7b048c1bRecords: jb19 done, L2 live stepmre
  • 665185aeMission 009: jb19 livemre
  • 47b2d3beRecords: P1 resumedmre
  • 8e326e94Records: resetKey blockedmre
  • f72dd7edRecords: icons comingmre
  • b264e5deRecords: P1 icons stopmre
  • 514d7cbeRecords: mission 008 startedmre
  • 61c40127Mission 008: #19 + #21mre
  • 6dcaeb46Records: resetKey planmre
  • c5dbf2ecRecords: R2 resultmre
  • 956069b8Records: R1 result, mission 007mre
  • 3c8a2e12Mission 007: #20 sort scrollmre
  • deb8cef5Records: mission 006 startedmre
  • 4f0ad42fMission 006: jukebox#20mre
  • 800cae06Records: #21 planmre