Skip to content

Commit 74f0991

Browse files
committed
修复详情页演职人员图标与片段悬停布局
1 parent 5aa96c3 commit 74f0991

3 files changed

Lines changed: 31 additions & 1 deletion

File tree

web/src/components/media/CastGrid.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ export default function CastGrid({ persons }: CastGridProps) {
6666
return (
6767
<section className="nv-cast-grid-section" aria-labelledby="cast-grid-title">
6868
<div className="nv-cast-grid-header">
69-
<h2 id="cast-grid-title" className="nv-section-title">{t('castGrid.title')}</h2>
69+
<h2 id="cast-grid-title" className="nv-section-title inline-flex items-center gap-2">
70+
<Users size={17} className="text-[var(--nv-action-primary)]" aria-hidden="true" />
71+
{t('castGrid.title')}
72+
</h2>
7073
<span>{sortedPersons.length}</span>
7174
</div>
7275

web/src/components/media/hero-section-backdrop.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.nv-detail-hero-backdrop-shell {
22
position: relative;
33
isolation: isolate;
4+
overflow: hidden;
45
}
56

67
.nv-detail-hero-local-backdrop {
@@ -9,6 +10,8 @@
910
z-index: 0;
1011
width: calc(100% + 2px);
1112
height: calc(100% + 2px);
13+
max-width: none;
14+
max-height: none;
1215
object-fit: cover;
1316
object-position: center 32%;
1417
pointer-events: none;

web/src/styles/ui-media-detail.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,30 @@
312312
.nv-cast-rail .nv-person-card-artwork { border-radius: 5px; }
313313
.nv-cast-rail .nv-person-card:hover .nv-person-card-artwork { transform: translateY(-1px); box-shadow: none; }
314314

315+
/* Highlight previews swap from a thumbnail to an animated asset on hover.
316+
* Keep every card bound to the responsive grid so the replacement asset's
317+
* intrinsic dimensions can never resize the card or reflow the section. */
318+
.nv-highlight-grid {
319+
display: grid;
320+
grid-template-columns: repeat(var(--nv-highlight-preview-count, 4), minmax(0, 1fr));
321+
align-items: stretch;
322+
gap: 12px;
323+
}
324+
.nv-highlight-card {
325+
width: 100%;
326+
min-width: 0;
327+
height: 100%;
328+
}
329+
.nv-highlight-card-media {
330+
width: 100%;
331+
min-width: 0;
332+
}
333+
.nv-highlight-card-media > img {
334+
display: block;
335+
width: 100%;
336+
height: 100%;
337+
}
338+
315339
.nv-detail-section-heading {
316340
display: flex;
317341
align-items: flex-end;

0 commit comments

Comments
 (0)