feat(web): dominant-color accent strip on PlayerBar + bigger Home tiles
test-web / test (push) Successful in 36s
test-web / test (push) Successful in 36s
#9 — new lib/media/dominantColor.ts: load cover image, downsample to 1x1 canvas, read pixel. Approximates the dominant tone via the browser's bilinear mean — close enough for an ambient accent without the 5KB ColorThief dependency. Same-origin cover URLs so no CORS dance. Result cached by URL so revisits are free. PlayerBar samples the current track's cover and pipes the resulting rgb into a 2px accent strip above both the compact and desktop variants. Transparent until the first resolve; 300ms transition on colour change so track-skips fade rather than snap. #10 — slight bump to Home tile widths so a typical viewport shows roughly 5-6 across instead of cramming 8-9: Playlists w-56, all remaining AlbumCard rows w-48 (Recently Added + both Rediscover album scrollers). Replaces the wave-2 sizes that were still showing 7-8 across on wider screens.
This commit is contained in:
@@ -143,8 +143,9 @@
|
||||
>
|
||||
{#snippet item(rowItem: PlaylistRowItem)}
|
||||
<!-- Playlists at the page anchor: largest of the carousels.
|
||||
Recently added stays at w-44; Rediscover steps down. -->
|
||||
<div class="w-52">
|
||||
Sized so a typical viewport shows ~5-6 across instead
|
||||
of cramming 8-9. -->
|
||||
<div class="w-56">
|
||||
{#if rowItem.kind === 'real'}
|
||||
<PlaylistCard playlist={rowItem.playlist} />
|
||||
{:else}
|
||||
@@ -174,7 +175,7 @@
|
||||
ariaLabel="Recently added"
|
||||
>
|
||||
{#snippet item(album: import('$lib/api/types').AlbumRef)}
|
||||
<div class="w-44"><AlbumCard {album} /></div>
|
||||
<div class="w-48"><AlbumCard {album} /></div>
|
||||
{/snippet}
|
||||
</HorizontalScrollRow>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user