Skip to content

Commit 241357d

Browse files
Show a trailer and learn line in the wisdom gallery
Adds the trailer control and learn line to the first-guide gallery, in the desktop name row and below the mobile portrait. The desktop portrait keeps its aspect ratio by deriving width from height inside a flex frame, instead of stretching to a fixed box. The mobile modal scrolls as one block so the taller layout cannot overlap the action button. Figures rebuild once translations finish loading, so a cold cache no longer leaves placeholder text.
1 parent e7dd06e commit 241357d

2 files changed

Lines changed: 245 additions & 30 deletions

File tree

client/src/components/WisdomGalleryModal.module.css

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440

441441
.essenceText {
442442
color: var(--cosmic-silver);
443-
font-size: clamp(1.0625rem, 1.7vw, 1.2rem); /* 17px floor → 19.2px desktop cap */
443+
font-size: clamp(0.9375rem, 1.4vw, 1.0625rem); /* 15px floor → 17px cap — trimmed so the longer revised bios fit the frame */
444444
line-height: 1.5;
445445
font-style: italic;
446446
text-align: center;
@@ -1160,4 +1160,121 @@
11601160
.modal {
11611161
display: none;
11621162
}
1163+
}
1164+
1165+
/* ============================================================
1166+
Figure page revision — golden "you will learn" line + trailer
1167+
play control. Desktop: in the name row. Mobile: under the portrait.
1168+
============================================================ */
1169+
1170+
.figureHook {
1171+
display: flex;
1172+
flex-direction: column;
1173+
align-items: center;
1174+
gap: 0.5rem;
1175+
width: 100%;
1176+
margin-top: 0.5rem;
1177+
}
1178+
1179+
.learnLine {
1180+
margin: 0;
1181+
max-width: 32ch;
1182+
text-align: center;
1183+
color: var(--gold-subtle);
1184+
font-size: clamp(0.9375rem, 0.875rem + 0.4vw, 1.125rem);
1185+
font-weight: 500;
1186+
line-height: 1.4;
1187+
text-shadow:
1188+
0 1px 4px color-mix(in srgb, var(--utility-pure-black) 70%, transparent),
1189+
0 0 12px color-mix(in srgb, var(--gold-subtle) 25%, transparent);
1190+
}
1191+
1192+
.trailerBtn {
1193+
display: inline-flex;
1194+
align-items: center;
1195+
justify-content: center;
1196+
gap: 6px;
1197+
min-height: 44px; /* WCAG touch target */
1198+
padding: 0 16px;
1199+
border-radius: 999px;
1200+
border: 1px solid color-mix(in srgb, var(--gold-subtle) 40%, transparent);
1201+
background: color-mix(in srgb, var(--gold-subtle) 14%, transparent);
1202+
color: var(--gold-subtle);
1203+
font-family: var(--ui-font-family);
1204+
font-size: 0.8125rem;
1205+
font-weight: 600;
1206+
letter-spacing: 0.02em;
1207+
cursor: pointer;
1208+
-webkit-tap-highlight-color: transparent;
1209+
transition: background 0.2s ease, border-color 0.2s ease;
1210+
}
1211+
1212+
.trailerBtn:hover {
1213+
background: color-mix(in srgb, var(--gold-subtle) 26%, transparent);
1214+
border-color: color-mix(in srgb, var(--gold-subtle) 70%, transparent);
1215+
}
1216+
1217+
.trailerBtnActive {
1218+
background: color-mix(in srgb, var(--gold-subtle) 26%, transparent);
1219+
border-color: var(--gold-subtle);
1220+
}
1221+
1222+
.trailerBtn:focus-visible {
1223+
outline: 2px solid var(--gold-subtle);
1224+
outline-offset: 2px;
1225+
}
1226+
1227+
.trailerBtn svg {
1228+
flex-shrink: 0;
1229+
}
1230+
1231+
.trailerLabel {
1232+
white-space: nowrap;
1233+
}
1234+
1235+
/* The learn line + trailer button add height below the portrait. On phones
1236+
that cannot fit the whole modal, scroll it as one block: galleryMain holds
1237+
its natural height (flex: 1 0 auto, no shrink) rather than collapsing and
1238+
letting the carousel overlap the action button below it. */
1239+
@media (max-width: 768px) {
1240+
.galleryContent {
1241+
overflow-y: auto;
1242+
-webkit-overflow-scrolling: touch;
1243+
}
1244+
1245+
.galleryMain {
1246+
flex: 1 0 auto;
1247+
}
1248+
1249+
.mobileCarousel {
1250+
height: auto;
1251+
}
1252+
}
1253+
1254+
/* Desktop triptych: keep each portrait inside its grid row so it can never
1255+
overlap the name + golden line beneath it. The portrait scales to the
1256+
space the row leaves, instead of holding a fixed height. */
1257+
@media (min-width: 768px) {
1258+
.portraitGrid {
1259+
grid-template-rows: minmax(0, 1fr);
1260+
}
1261+
1262+
/* Centering the frame lets the portrait shrink (keeping its aspect ratio)
1263+
instead of stretching. width: auto only follows aspect-ratio inside a
1264+
flex/grid parent — a plain block would just fill the column. */
1265+
.portraitFrame {
1266+
display: flex;
1267+
align-items: center;
1268+
justify-content: center;
1269+
min-height: 0;
1270+
}
1271+
1272+
/* Height drives the size, width follows from the portrait aspect ratio set
1273+
on the base .glassFrame rule. Capped at the fixed design dimensions. */
1274+
.glassFrame {
1275+
height: 100%;
1276+
width: auto;
1277+
max-height: var(--portrait-height);
1278+
max-width: var(--portrait-width);
1279+
}
11631280
}

0 commit comments

Comments
 (0)