jukebox
All repositories: gitoria
6.0 KB
// components/styles.hl — the app's own CSS: the WorldAPI theme (theme/theme.hl, copied verbatim from layouts.worldapi.org; never edited here)// 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// compact player bar. Tokens only, no written colours, no borders. MOBILE FIRST: the phone's rules outside a block; the one// `@media (min-width: 60rem)` block adds the wide layout.inherit '../theme/theme.hl'import { var } from 'hl:web/css'import { yellow } from '../shared/tokens.hl'colorAccent = var(yellow)// the player bar's height (0 until a song was picked); the screens take what is left of the viewport'.jb-app' { '--jb-bar' = '0rem' }'.jb-app.playing' { '--jb-bar' = '4.25rem' }// a screen: as high as the viewport under the header minus the bar; its list scrolls inside, the header and the bar stay'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' }'jb-screen > virtual-list' { flex = '1 1 auto' height = 'auto' minHeight = '0' marginInline = '-.6rem' }'jb-tools' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.35rem .6rem' paddingBottom = '.25rem' }'jb-tools select' { flex = '1 1 9rem' minWidth = '0' }'jb-tools input[type="search"]' { flex = '1 1 100%' }'jb-count input[type="number"]' { flex = 'none' width = '4.5rem' minHeight = '2.25rem' padding = '.2rem .5rem' textAlign = 'center' }'jb-tools button.on' { color = 'var(--color-accent-text)' background = 'var(--color-accent)' }'jb-count' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.25rem .5rem' minHeight = '1.75rem' color = 'var(--color-text-muted)' fontSize = '.9rem' }'jb-tabs' { display = 'flex' gap = '.4rem' paddingBottom = '.25rem' }'jb-tabs button.on' { color = 'var(--color-accent-text)' background = 'var(--color-accent)' }// the head of an artist or an album, above the rows (it scrolls away with them)'jb-head' { display = 'block' padding = '.25rem .6rem .75rem' }'jb-head h1' { margin = '0' fontSize = '1.3rem' }'jb-head p' { margin = '.1rem 0 0' color = 'var(--color-text-muted)' }'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)' }'jb-head.jb-album' { textAlign = 'center' }// the search screen's artists and albums, above the songs'jb-hits' { display = 'block' padding = '0 0 .25rem' }'jb-hits h2' { margin = '.5rem .6rem .15rem' fontSize = '.85rem' letterSpacing = '.04em' textTransform = 'uppercase' color = 'var(--color-text-muted)' }'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' }'jb-hits button:hover' { background = 'var(--color-surface)' }'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' }'jb-hits button span.jb-name' { flex = '1 1 auto' minWidth = '0' overflow = 'hidden' textOverflow = 'ellipsis' whiteSpace = 'nowrap' }'jb-hits button span.jb-note' { flex = 'none' fontSize = '.85rem' color = 'var(--color-text-muted)' }'jb-hits p' { margin = '.4rem .6rem' color = 'var(--color-text-muted)' }// 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// (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.'.jb-bar' { display = 'none' }'.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)' }'.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' }'.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))' }'.jb-bar media-player .mp-cover img' { width = '2.5rem' height = '2.5rem' }'.jb-bar media-player .mp-cover div' { minWidth = '0' }'.jb-bar media-player .mp-cover h2' { margin = '0' fontSize = '.95rem' lineHeight = '1.3' fontWeight = '600' overflow = 'hidden' textOverflow = 'ellipsis' whiteSpace = 'nowrap' }'.jb-bar media-player .mp-cover p' { margin = '0' fontSize = '.8rem' overflow = 'hidden' textOverflow = 'ellipsis' whiteSpace = 'nowrap' }'.jb-bar media-player mp-buttons' { gridArea = 'buttons' flexWrap = 'nowrap' gap = '0' paddingRight = 'max(.25rem, calc((100% - var(--layout-column)) / 2))' }'.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' }'.jb-bar media-player mp-buttons button.mp-play' { background = 'transparent' }'.jb-bar media-player mp-seek' { gridArea = 'seek' height = '1rem' margin = '0' }'.jb-bar media-player mp-seek .mp-track' { top = '.375rem' left = '0' right = '0' height = '.25rem' borderRadius = '0' }'.jb-bar media-player mp-seek .mp-thumb' { display = 'none' }'.jb-bar media-player .mp-queue-title, .jb-bar media-player ol.mp-queue' { display = 'none' }'@media (min-width: 60rem)' {'.jb-app.playing' { '--jb-bar' = '4.75rem' }'jb-screen' { paddingTop = '1rem' }'jb-tools select' { flex = '0 0 14rem' }'.jb-bar media-player mp-buttons .mp-times' { display = 'inline-flex' marginLeft = '.5rem' }}
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