fix(web): a genre band's fan spans 80% of its width, leftmost cover on top
release / go (push) Successful in 1m59s
release / web (push) Successful in 1m26s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 4m22s
release / android (push) Successful in 4m28s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 4m43s
release / go (push) Successful in 1m59s
release / web (push) Successful in 1m26s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 4m22s
release / android (push) Successful in 4m28s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 4m43s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
// lead: the card's picture and the source of its colour wash.
|
||||
const coverUrls = $derived(covers.map((id) => coverUrl(id)));
|
||||
const lead = $derived(coverUrls[0] ?? playlist.cover_url ?? '');
|
||||
// A band's fan: its own covers, or its lead cover alone when it has none.
|
||||
const fanUrls = $derived(coverUrls.length > 0 ? coverUrls : lead ? [lead] : []);
|
||||
|
||||
// The wash behind a wide card or band is the lead cover's main colour,
|
||||
// toned down (washTone) and darkened so light text reads on it in either
|
||||
@@ -277,7 +279,7 @@
|
||||
</div>
|
||||
{:else if shape === 'band'}
|
||||
<!-- A genre mix: a field of its lead cover's colour, the genre in large
|
||||
type, and a small fan of three covers. -->
|
||||
type, and a fan of three covers across most of its width. -->
|
||||
<div class="card group relative h-full w-full" data-shape="band">
|
||||
{@render kebab()}
|
||||
<a
|
||||
@@ -285,8 +287,8 @@
|
||||
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">
|
||||
{#each (coverUrls.length > 0 ? coverUrls : lead ? [lead] : []) as url, i (i)}
|
||||
<div class="fan" aria-hidden="true" style:--n={fanUrls.length}>
|
||||
{#each fanUrls as url, i (i)}
|
||||
<img src={url} alt="" />
|
||||
{/each}
|
||||
</div>
|
||||
@@ -392,7 +394,11 @@
|
||||
text-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
/* The fan spans 80% of the band's width, its covers as tall as the band
|
||||
allows and overlapping to fit. The leftmost cover sits on top and each
|
||||
one to its right tucks under it. */
|
||||
.fan {
|
||||
--cover: 78cqh;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 50%;
|
||||
@@ -400,15 +406,16 @@
|
||||
display: flex;
|
||||
}
|
||||
.fan img {
|
||||
width: 74cqh;
|
||||
width: var(--cover);
|
||||
flex-shrink: 0;
|
||||
aspect-ratio: 1;
|
||||
object-fit: cover;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 6px 16px rgb(0 0 0 / 0.45);
|
||||
margin-left: -37cqh;
|
||||
margin-left: calc((80cqw - var(--n) * var(--cover)) / (var(--n) - 1));
|
||||
}
|
||||
.fan img:first-child { margin-left: 0; }
|
||||
.fan img:nth-child(1) { transform: rotate(-8deg) translateY(4px); }
|
||||
.fan img:nth-child(2) { transform: translateY(-4px); z-index: 1; }
|
||||
.fan img:nth-child(3) { transform: rotate(8deg) translateY(4px); z-index: 2; }
|
||||
.fan img:nth-child(1) { transform: rotate(-8deg) translateY(4px); z-index: 3; }
|
||||
.fan img:nth-child(2) { transform: translateY(-4px); z-index: 2; }
|
||||
.fan img:nth-child(3) { transform: rotate(8deg) translateY(4px); z-index: 1; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user