enlargable show tiles

This commit is contained in:
2026-06-22 19:55:06 +00:00
parent 3b61a131c1
commit 86fbfa56bf
3 changed files with 44 additions and 3 deletions
+3 -2
View File
@@ -17,7 +17,7 @@
} @else { } @else {
<div class="show-list"> <div class="show-list">
@for (show of state.shows; track show.id) { @for (show of state.shows; track show.id) {
<article class="show-card"> <article class="show-card" [class.expanded]="expandedShowId === show.id" (click)="toggleShow(show.id)">
<!-- Left: Show art badge --> <!-- Left: Show art badge -->
<div class="show-card-art"> <div class="show-card-art">
@if (show.show_art_url) { @if (show.show_art_url) {
@@ -33,8 +33,9 @@
<div class="show-card-right" [class.has-hero]="show.hero_image_url" [style.background-image]="show.hero_image_url ? 'url(' + resolveAsset(show.hero_image_url) + ')' : ''"> <div class="show-card-right" [class.has-hero]="show.hero_image_url" [style.background-image]="show.hero_image_url ? 'url(' + resolveAsset(show.hero_image_url) + ')' : ''">
<div class="show-card-overlay"></div> <div class="show-card-overlay"></div>
<div class="show-card-info"> <div class="show-card-info">
<span class="show-card-chevron" aria-hidden="true">&#x25B6;</span>
<h3 class="show-title">{{ show.title }}</h3> <h3 class="show-title">{{ show.title }}</h3>
<p class="show-description">{{ show.description }}</p> <p class="show-description" [class.expanded]="expandedShowId === show.id">{{ show.description }}</p>
<div class="show-meta"> <div class="show-meta">
<span class="show-host"> <span class="show-host">
<span aria-hidden="true">&#x1F399;</span> {{ show.host }} <span aria-hidden="true">&#x1F399;</span> {{ show.host }}
+33 -1
View File
@@ -43,13 +43,21 @@
border-radius: $radius-lg; border-radius: $radius-lg;
overflow: hidden; overflow: hidden;
box-shadow: $shadow-md; box-shadow: $shadow-md;
transition: transform $transition-normal, box-shadow $transition-normal; transition: transform $transition-normal, box-shadow $transition-normal, border-color $transition-normal;
min-height: 180px; min-height: 180px;
cursor: pointer;
border-left: 4px solid transparent;
&:hover { &:hover {
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: $shadow-lg; box-shadow: $shadow-lg;
} }
&.expanded {
border-left-color: var(--color-accent);
box-shadow: 0 8px 30px rgba(232, 122, 46, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
transform: translateY(-3px);
}
} }
// ── Left: Show art badge (square) ────────────────────────── // ── Left: Show art badge (square) ──────────────────────────
@@ -131,6 +139,24 @@
line-height: 1.25; line-height: 1.25;
} }
// ── Chevron indicator ──────────────────────────────────────
.show-card-chevron {
position: absolute;
top: $spacing-lg;
right: $spacing-xl;
z-index: 3;
font-size: 0.7rem;
color: rgba(255, 255, 255, 0.45);
transition: transform $transition-normal, color $transition-normal;
pointer-events: none;
}
.show-card.expanded .show-card-chevron {
transform: rotate(90deg);
color: var(--color-accent);
}
// ── Show description (line-clamped) ──────────────────────── // ── Show description (line-clamped) ────────────────────────
.show-description { .show-description {
@@ -143,6 +169,12 @@
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
transition: max-height $transition-slow ease, opacity $transition-normal;
&.expanded {
-webkit-line-clamp: unset;
overflow: visible;
}
} }
// ── Meta row (host + genre) ──────────────────────────────── // ── Meta row (host + genre) ────────────────────────────────
+8
View File
@@ -24,6 +24,14 @@ export class ScheduleComponent {
private showService = inject(ShowService); private showService = inject(ShowService);
readonly config = inject(StationConfigService).config; readonly config = inject(StationConfigService).config;
/** ID of the currently expanded show card — null means none. */
expandedShowId: number | null = null;
/** Toggle expansion: clicking the active card collapses it; clicking another expands it. */
toggleShow(showId: number): void {
this.expandedShowId = this.expandedShowId === showId ? null : showId;
}
/** Async pipe drives the template — guarantees change detection on every emission. */ /** Async pipe drives the template — guarantees change detection on every emission. */
readonly schedule$: Observable<ScheduleState> = readonly schedule$: Observable<ScheduleState> =
this.showService.getShows().pipe( this.showService.getShows().pipe(