feat(web): rich search rows (#148)
Every search row — library and TMDB alike — gains a w92 poster thumbnail with a same-size blank fallback, a TMDB rating chip (hidden when there are no votes), and a trailer chip that resolves GET /api/trailer on click only, opening the tab inside the handler. Episode hits carry the series' TMDB id so their chip resolves too.
This commit is contained in:
+72
-3
@@ -699,12 +699,13 @@ body {
|
||||
transition: background 150ms var(--ease-out);
|
||||
}
|
||||
|
||||
.row-tmdb:hover:not(:disabled),
|
||||
.row-tmdb:focus-visible {
|
||||
.row-tmdb:hover:not(:disabled):not([aria-disabled="true"]),
|
||||
.row-tmdb:focus-visible:not([aria-disabled="true"]) {
|
||||
background: var(--panel);
|
||||
}
|
||||
|
||||
.row-tmdb:disabled {
|
||||
.row-tmdb:disabled,
|
||||
.row-tmdb[aria-disabled="true"] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@@ -730,6 +731,68 @@ body {
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
/* ---- rich search rows (#148): poster, rating chip, trailer chip -------- */
|
||||
|
||||
.row-rich {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.row-main {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: baseline;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-1) var(--space-3);
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* w92 is the right order of magnitude for a row; the blank is the same
|
||||
box, so the column edge holds while results stream in */
|
||||
.row-poster,
|
||||
.row-poster-blank {
|
||||
width: 2.75rem;
|
||||
aspect-ratio: 2 / 3;
|
||||
flex-shrink: 0;
|
||||
align-self: center;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.row-poster {
|
||||
display: block;
|
||||
background: var(--panel-raised);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.chip[role="button"] {
|
||||
cursor: pointer;
|
||||
transition:
|
||||
color 150ms var(--ease-out),
|
||||
border-color 150ms var(--ease-out);
|
||||
}
|
||||
|
||||
.chip[role="button"]:hover,
|
||||
.chip[role="button"]:focus-visible {
|
||||
color: var(--accent);
|
||||
border-color: oklch(from var(--accent) l c h / 45%);
|
||||
}
|
||||
|
||||
.row-trailer[data-state="pending"] {
|
||||
color: var(--ink-faint);
|
||||
}
|
||||
|
||||
/* no video on TMDB is an ordinary outcome: quiet and dashed, not fault red */
|
||||
.row-trailer[data-state="none"] {
|
||||
border-style: dashed;
|
||||
color: var(--ink-faint);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.row-trailer[data-state="blocked"] {
|
||||
color: var(--signal-warn);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* ---- add flow (inline, root and policy pre-filled) -------------------- */
|
||||
|
||||
.add-panel {
|
||||
@@ -1390,6 +1453,12 @@ body {
|
||||
fill: var(--ink-muted);
|
||||
}
|
||||
|
||||
/* a row chip is smaller than the detail page's rating readout */
|
||||
.row-rating .star {
|
||||
width: 0.625rem;
|
||||
height: 0.625rem;
|
||||
}
|
||||
|
||||
.movie-meta {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user