fix(web): genre fans grow with their band, and short shelves fill the row
release / go (push) Successful in 1m51s
release / web (push) Successful in 1m31s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m22s
release / android (push) Successful in 4m58s
release / Build signed APK (push) Successful in 5m6s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 27s
release / Verify release artifacts (tag releases only) (push) Skipped
release / go (push) Successful in 1m51s
release / web (push) Successful in 1m31s
release / govulncheck (push) Successful in 20s
release / integration (push) Successful in 4m22s
release / android (push) Successful in 4m58s
release / Build signed APK (push) Successful in 5m6s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 27s
release / Verify release artifacts (tag releases only) (push) Skipped
A genre band's fan of covers is sized to the band's height (74% of it), larger than before, and may run under the genre's name again; the name sits on a dark translucent backing that keeps it readable over any cover. A shelf with fewer items than fit across the page now splits the whole width between them, so no shelf ends partway across. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,11 +27,12 @@
|
||||
each · refreshed today"), shown beside the title so the items need
|
||||
not repeat it. */
|
||||
meta?: string;
|
||||
/** Size items to the row instead of a fixed width: the row shows a whole
|
||||
number of items that fill its width, each at least `min` px wide (and,
|
||||
when there are fewer items than fit, at most `max` px). The width is
|
||||
set as --tile-w on the track; an item wrapper uses it as its width. */
|
||||
fit?: { min: number; max: number };
|
||||
/** Size items to the row instead of a fixed width: the items always fill
|
||||
the row's width, a whole number of them at a time, each at least `min`
|
||||
px wide; a row of fewer items than fit splits the width between them.
|
||||
The width is set as --tile-w on the track; an item wrapper uses it as
|
||||
its width. */
|
||||
fit?: { min: number };
|
||||
/** Accessible label for the section as a whole. */
|
||||
ariaLabel?: string;
|
||||
} = $props();
|
||||
@@ -81,7 +82,7 @@
|
||||
const BLEED = 16;
|
||||
const itemCount = $derived(Math.max(0, ...rows.map((r) => r.length)));
|
||||
const tileWidth = $derived(
|
||||
fit ? shelfTileWidth(clientWidth - BLEED, itemCount, fit.min, fit.max, GAP) : 0
|
||||
fit ? shelfTileWidth(clientWidth - BLEED, itemCount, fit.min, GAP) : 0
|
||||
);
|
||||
|
||||
// clientWidth follows the window, not just scrolling, so tiles resize live.
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
{@render kebab()}
|
||||
<a
|
||||
href={`/playlists/${playlist.id}`}
|
||||
class="wash relative flex h-full w-full flex-col justify-end overflow-hidden rounded-xl p-3 text-left transition-shadow duration-150 hover:shadow-lg"
|
||||
class="wash band relative flex h-full w-full flex-col items-start justify-end overflow-hidden rounded-xl p-3 text-left transition-shadow duration-150 hover:shadow-lg"
|
||||
style:--wash={washRgb}
|
||||
>
|
||||
<div class="fan" aria-hidden="true">
|
||||
@@ -377,9 +377,21 @@
|
||||
4.5:1 on the lightest wash washTone allows (shelf.test.ts checks it). */
|
||||
.on-wash-2 { color: color-mix(in srgb, var(--fs-parchment) 90%, transparent); }
|
||||
.on-wash-3 { color: color-mix(in srgb, var(--fs-parchment) 80%, transparent); }
|
||||
/* The genre name keeps clear of the fan: the fan is three 3.75rem covers
|
||||
overlapping by half (7.5rem) plus its 0.75rem inset. */
|
||||
.band-name { max-width: calc(100% - 8.75rem); overflow-wrap: anywhere; }
|
||||
/* A band sizes its fan to its own height, so the covers grow with the
|
||||
band. The fan may run under the genre name; the name sits on a dark,
|
||||
translucent backing that keeps it above 4.5:1 even over a white cover
|
||||
(70% obsidian over white is about #565859, 5.7:1 against parchment). */
|
||||
.band { container-type: size; }
|
||||
.band-name {
|
||||
max-width: 85%;
|
||||
padding: 0.125rem 0.5rem;
|
||||
margin-left: -0.25rem;
|
||||
border-radius: 6px;
|
||||
background: rgb(14 16 19 / 0.7);
|
||||
backdrop-filter: blur(6px);
|
||||
text-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.fan {
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
@@ -388,12 +400,12 @@
|
||||
display: flex;
|
||||
}
|
||||
.fan img {
|
||||
width: 3.75rem;
|
||||
width: 74cqh;
|
||||
aspect-ratio: 1;
|
||||
object-fit: cover;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 6px 16px rgb(0 0 0 / 0.45);
|
||||
margin-left: -1.875rem;
|
||||
margin-left: -37cqh;
|
||||
}
|
||||
.fan img:first-child { margin-left: 0; }
|
||||
.fan img:nth-child(1) { transform: rotate(-8deg) translateY(4px); }
|
||||
|
||||
Reference in New Issue
Block a user