gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit2a4cfc552a4cfc55jukebox: library screens (songs, artists, albums, artist, album, search, favourites), compact player bar, /stream with Range, thumbnails, virtual list vendored, ui gate and real-library checkmre2a4cfc55/components/styles.hl

6.0 KB

  1. // components/styles.hl — the app's own CSS: the WorldAPI theme (theme/theme.hl, copied verbatim from layouts.worldapi.org; never edited here)
  2. // plus what the library screens need: the page that fills the screen under the header, the toolbar, the album head, the search results, and the
  3. // compact player bar. Tokens only, no written colours, no borders. MOBILE FIRST: the phone's rules outside a block; the one
  4. // `@media (min-width: 60rem)` block adds the wide layout.
  5. inherit '../theme/theme.hl'
  6. import { var } from 'hl:web/css'
  7. import { yellow } from '../shared/tokens.hl'
  8. colorAccent = var(yellow)
  9. // the player bar's height (0 until a song was picked); the screens take what is left of the viewport
  10. '.jb-app' { '--jb-bar' = '0rem' }
  11. '.jb-app.playing' { '--jb-bar' = '4.25rem' }
  12. // a screen: as high as the viewport under the header minus the bar; its list scrolls inside, the header and the bar stay
  13. 'jb-screen' { display = 'flex' flexDirection = 'column' height = 'calc(100dvh - var(--layout-header) - var(--jb-bar))' paddingInline = 'max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2))' paddingTop = '.5rem' }
  14. 'jb-screen > virtual-list' { flex = '1 1 auto' height = 'auto' minHeight = '0' marginInline = '-.6rem' }
  15. 'jb-tools' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.35rem .6rem' paddingBottom = '.25rem' }
  16. 'jb-tools select' { flex = '1 1 9rem' minWidth = '0' }
  17. 'jb-tools input[type="search"]' { flex = '1 1 100%' }
  18. 'jb-count input[type="number"]' { flex = 'none' width = '4.5rem' minHeight = '2.25rem' padding = '.2rem .5rem' textAlign = 'center' }
  19. 'jb-tools button.on' { color = 'var(--color-accent-text)' background = 'var(--color-accent)' }
  20. 'jb-count' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.25rem .5rem' minHeight = '1.75rem' color = 'var(--color-text-muted)' fontSize = '.9rem' }
  21. 'jb-tabs' { display = 'flex' gap = '.4rem' paddingBottom = '.25rem' }
  22. 'jb-tabs button.on' { color = 'var(--color-accent-text)' background = 'var(--color-accent)' }
  23. // the head of an artist or an album, above the rows (it scrolls away with them)
  24. 'jb-head' { display = 'block' padding = '.25rem .6rem .75rem' }
  25. 'jb-head h1' { margin = '0' fontSize = '1.3rem' }
  26. 'jb-head p' { margin = '.1rem 0 0' color = 'var(--color-text-muted)' }
  27. 'jb-head img, jb-head .jb-nocover' { display = 'block' width = 'min(100%, 18rem)' aspectRatio = '1 / 1' margin = '0 auto .75rem' objectFit = 'cover' borderRadius = 'var(--radius-large)' background = 'var(--color-surface)' }
  28. 'jb-head.jb-album' { textAlign = 'center' }
  29. // the search screen's artists and albums, above the songs
  30. 'jb-hits' { display = 'block' padding = '0 0 .25rem' }
  31. 'jb-hits h2' { margin = '.5rem .6rem .15rem' fontSize = '.85rem' letterSpacing = '.04em' textTransform = 'uppercase' color = 'var(--color-text-muted)' }
  32. 'jb-hits button' { display = 'flex' alignItems = 'center' gap = '.7rem' width = '100%' height = '3.25rem' minHeight = '0' margin = '0' padding = '0 .6rem' fontWeight = '400' textAlign = 'left' color = 'var(--color-text)' background = 'transparent' }
  33. 'jb-hits button:hover' { background = 'var(--color-surface)' }
  34. 'jb-hits button img, jb-hits button .jb-nopic' { flex = 'none' width = '2.25rem' height = '2.25rem' borderRadius = 'var(--radius-small)' background = 'var(--color-surface)' objectFit = 'cover' }
  35. 'jb-hits button span.jb-name' { flex = '1 1 auto' minWidth = '0' overflow = 'hidden' textOverflow = 'ellipsis' whiteSpace = 'nowrap' }
  36. 'jb-hits button span.jb-note' { flex = 'none' fontSize = '.85rem' color = 'var(--color-text-muted)' }
  37. 'jb-hits p' { margin = '.4rem .6rem' color = 'var(--color-text-muted)' }
  38. // the player bar: fixed at the bottom, compact. A thin seek line across the top of the bar, under it the small cover with title and artist and the buttons
  39. // (back, play / pause, forward; the times from 60rem). No queue list, no speed, no mute: a 13,000-song queue is not drawn and the bar has no room for more.
  40. '.jb-bar' { display = 'none' }
  41. '.jb-app.playing .jb-bar' { display = 'block' position = 'fixed' left = '0' right = '0' bottom = '0' zIndex = '15' height = 'var(--jb-bar)' background = 'var(--color-background-sunken)' }
  42. '.jb-bar media-player' { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr) auto' gridTemplateRows = '1rem 1fr' gridTemplateAreas = '"seek seek" "cover buttons"' alignItems = 'center' height = '100%' background = 'transparent' }
  43. '.jb-bar media-player .mp-cover' { gridArea = 'cover' display = 'flex' alignItems = 'center' gap = '.6rem' margin = '0' minWidth = '0' paddingInline = 'max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2))' }
  44. '.jb-bar media-player .mp-cover img' { width = '2.5rem' height = '2.5rem' }
  45. '.jb-bar media-player .mp-cover div' { minWidth = '0' }
  46. '.jb-bar media-player .mp-cover h2' { margin = '0' fontSize = '.95rem' lineHeight = '1.3' fontWeight = '600' overflow = 'hidden' textOverflow = 'ellipsis' whiteSpace = 'nowrap' }
  47. '.jb-bar media-player .mp-cover p' { margin = '0' fontSize = '.8rem' overflow = 'hidden' textOverflow = 'ellipsis' whiteSpace = 'nowrap' }
  48. '.jb-bar media-player mp-buttons' { gridArea = 'buttons' flexWrap = 'nowrap' gap = '0' paddingRight = 'max(.25rem, calc((100% - var(--layout-column)) / 2))' }
  49. '.jb-bar media-player mp-buttons .mp-mute, .jb-bar media-player mp-buttons .mp-speed, .jb-bar media-player mp-buttons .mp-times' { display = 'none' }
  50. '.jb-bar media-player mp-buttons button.mp-play' { background = 'transparent' }
  51. '.jb-bar media-player mp-seek' { gridArea = 'seek' height = '1rem' margin = '0' }
  52. '.jb-bar media-player mp-seek .mp-track' { top = '.375rem' left = '0' right = '0' height = '.25rem' borderRadius = '0' }
  53. '.jb-bar media-player mp-seek .mp-thumb' { display = 'none' }
  54. '.jb-bar media-player .mp-queue-title, .jb-bar media-player ol.mp-queue' { display = 'none' }
  55. '@media (min-width: 60rem)' {
  56. '.jb-app.playing' { '--jb-bar' = '4.75rem' }
  57. 'jb-screen' { paddingTop = '1rem' }
  58. 'jb-tools select' { flex = '0 0 14rem' }
  59. '.jb-bar media-player mp-buttons .mp-times' { display = 'inline-flex' marginLeft = '.5rem' }
  60. }

Branches

Latest commits

  • 2a4cfc55jukebox: library screens (songs, artists, albums, artist, album, search, favourites), compact player bar, /stream with Range, thumbnails, virtual list vendored, ui gate and real-library checkmre
  • 93a44212jukebox: report, numbers of the full scan, notes on the index key rulemre
  • bf5167dajukebox: index keys without commas (mpackdb loses them after a reopen), comma fixture and gate checksmre
  • 28a82fa2jukebox: README, STATUS, LOG, DECISIONSmre
  • d13987dfjukebox: library scanner, ID3 reader, mpackdb database and JSON API, with fixtures and a gatemre