Skip to content

Commit b3dd766

Browse files
authored
docs(catalog): every card on screen plays a small looping video instead of a live player (#7146)
* docs(catalog): every card on screen plays a small looping video instead of a live player * docs(catalog): the preview generator also writes each card's small loop and poster * fix(catalog): end ffprobe options before the card file, as the argv contract requires * fix(catalog): a pause control for the card loops; none play in a hidden tab or under 25% visible
1 parent d36cad7 commit b3dd766

4 files changed

Lines changed: 167 additions & 334 deletions

File tree

‎docs/catalog-gallery.css‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
.hfc-gallery .hfc-media :is(img,video) { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; margin:0; border:0; border-radius:0; }
1818
.hfc-gallery .hfc-preview-host { position:absolute; inset:0; pointer-events:none; opacity:0; }
1919
.hfc-gallery .hfc-preview-host[data-ready="true"] { opacity:1; }
20-
.hfc-gallery .hfc-preview-host hyperframes-player { display:block; width:100%; height:100%; pointer-events:none; }
2120
.hfc-gallery .hfc-fallback { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:24px; height:100%; text-align:center; color:#ccc; background:#141414; }
2221
.hfc-gallery .hfc-fallback span { color:#999; font-size:10px; }
2322
.hfc-gallery .hfc-fallback strong { font-size:18px; line-height:1.2; }
@@ -79,3 +78,20 @@
7978
.hfc-gallery .mw .sq path{stroke-dasharray:220;stroke-dashoffset:220;}
8079
@media(prefers-reduced-motion:reduce){.hfc-gallery .mw .sq path{stroke-dashoffset:0;}}
8180
@media(max-width:600px){.hfc-gallery{padding:0 18px;}.hfc-gallery .hfc-hero{padding:28px 0;}}
81+
82+
/* Pause previews: the visitor's stop for the looping cards. */
83+
.hfc-gallery .hfc-pause {
84+
margin-top: 14px;
85+
padding: 7px 14px;
86+
border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
87+
border-radius: 999px;
88+
background: transparent;
89+
color: inherit;
90+
font: inherit;
91+
font-size: 13px;
92+
cursor: pointer;
93+
}
94+
.hfc-gallery .hfc-pause:focus-visible {
95+
outline: 2px solid color-mix(in srgb, currentColor 45%, transparent);
96+
outline-offset: 2px;
97+
}

0 commit comments

Comments
 (0)