Setze die Abspiel-Schaltfläche groß und mittig auf das Vorschaubild
Einstieg (Teaser) und Premium-Karten (Medien-, Programm-, Modul-, Bild-und-Text-Karte) gestalten sie gleich: großer Kreis, halbtransparent, mittig auf dem Bild; läuft der Clip, wird sie zur kleinen Anhalten-Schaltfläche in der Ecke. Skripte, Beschriftungen und Tastaturbedienung bleiben unverändert. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
57f3a18b82
commit
bd91104970
6 files changed
+185
-27
No files matched your search
@@ -70,31 +70,65 @@ .lf-hero__video {
|
||||
|
||||
.lf-hero.is-hero-started .lf-hero__video { opacity: 1; }
|
||||
|
||||
/*
|
||||
* Abspiel-Schaltfläche: Solange der Clip nicht läuft, sitzt sie groß und halbtransparent mittig auf dem Vorschaubild
|
||||
* (rechts neben dem Text, in der schmalen Darstellung mittig auf dem Bild oberhalb des Textes). Läuft der Clip,
|
||||
* wandert sie als kleine „Video anhalten“-Schaltfläche in die Ecke (WCAG 2.2.2), damit sie das Bild nicht verdeckt.
|
||||
* Gleiche Gestaltung wie auf den Karten (.lf-pc__clip-toggle).
|
||||
*/
|
||||
.lf-hero__video-toggle {
|
||||
position: absolute;
|
||||
inset: 12px 12px auto auto;
|
||||
inset-block-start: 50%;
|
||||
inset-inline-start: 72%;
|
||||
z-index: 2;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
min-block-size: 44px;
|
||||
padding: 8px 14px 8px 10px;
|
||||
inline-size: clamp(64px, 9cqi, 96px);
|
||||
block-size: clamp(64px, 9cqi, 96px);
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
background: rgb(3 37 81 / 86%);
|
||||
background: rgb(3 37 81 / 62%);
|
||||
box-shadow: 0 0 0 2px rgb(255 255 255 / 70%), 0 6px 24px rgb(3 37 81 / 35%);
|
||||
font: 600 0.8125rem/1.2 var(--lf-font-ui, system-ui, sans-serif);
|
||||
cursor: pointer;
|
||||
transform: translate(-50%, -50%);
|
||||
transition: background-color 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.lf-hero__video-toggle[hidden] { display: none; }
|
||||
.lf-hero__video-toggle:hover { background: var(--lf-navy-deep, var(--lf-hero-navy)); }
|
||||
.lf-hero__video-toggle:focus-visible { outline: 3px solid var(--lf-hero-yellow); outline-offset: 3px; }
|
||||
.lf-hero__video-icon { inline-size: 20px; block-size: 20px; }
|
||||
.lf-hero__video-toggle:hover { background: rgb(3 37 81 / 82%); transform: translate(-50%, -50%) scale(1.06); }
|
||||
.lf-hero__video-toggle:focus-visible { outline: 3px solid var(--lf-hero-yellow); outline-offset: 4px; }
|
||||
.lf-hero__video-icon { inline-size: 44%; block-size: 44%; }
|
||||
/* Das Dreieck sitzt optisch etwas links; ein kleiner Versatz zentriert es im Kreis. */
|
||||
.lf-hero__video-play { transform: translateX(1px); }
|
||||
.lf-hero__video-label { display: none; }
|
||||
.lf-hero__video-pause,
|
||||
.lf-hero__video-toggle[aria-pressed="true"] .lf-hero__video-play { display: none; }
|
||||
.lf-hero__video-toggle[aria-pressed="true"] .lf-hero__video-pause { display: inline; }
|
||||
|
||||
/* Läuft der Clip: kleine Schaltfläche oben rechts, mit 44 px Trefferfläche. */
|
||||
.lf-hero__video-toggle[aria-pressed="true"] {
|
||||
inset-block-start: 12px;
|
||||
inset-inline-start: auto;
|
||||
inset-inline-end: 12px;
|
||||
inline-size: auto;
|
||||
block-size: auto;
|
||||
min-block-size: 44px;
|
||||
padding: 8px 14px 8px 10px;
|
||||
border-radius: 999px;
|
||||
background: rgb(3 37 81 / 62%);
|
||||
box-shadow: 0 0 0 1px rgb(255 255 255 / 40%);
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.lf-hero__video-toggle[aria-pressed="true"]:hover { background: rgb(3 37 81 / 86%); transform: none; }
|
||||
.lf-hero__video-toggle[aria-pressed="true"] .lf-hero__video-icon { inline-size: 20px; block-size: 20px; }
|
||||
.lf-hero__video-toggle[aria-pressed="true"] .lf-hero__video-label { display: inline; }
|
||||
|
||||
.lf-hero--photo-split::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -237,6 +271,8 @@ @container lf-hero (max-width: 859.99px) {
|
||||
.lf-hero--height-large { min-block-size: 0; }
|
||||
.lf-hero__photo { position: relative; display: block; block-size: auto; aspect-ratio: 16 / 9; }
|
||||
.lf-hero__video { inset: 0 0 auto 0; block-size: auto; aspect-ratio: 16 / 9; border-radius: inherit; }
|
||||
/* Das Bild liegt oben im Format 16:9: Mitte = halbe Breite, halbe Bildhöhe. */
|
||||
.lf-hero__video-toggle:not([aria-pressed="true"]) { inset-block-start: calc(100cqi * 9 / 32); inset-inline-start: 50%; inline-size: clamp(56px, 16cqi, 80px); block-size: clamp(56px, 16cqi, 80px); }
|
||||
.lf-hero--photo-split::before { display: none; }
|
||||
.lf-hero__inner { padding: clamp(var(--pad-card), 3.5cqi, calc(var(--pad-card) * 1.6)); padding-block-end: calc(var(--pad-card) * 1.6); }
|
||||
.lf-hero__copy { max-inline-size: 100%; }
|
||||
@@ -253,6 +289,8 @@ @container lf-hero (max-width: 440px) {
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.lf-hero__video { transition: none; }
|
||||
.lf-hero__video-toggle { transition: none; }
|
||||
.lf-hero__video-toggle:hover { transform: translate(-50%, -50%); }
|
||||
.lf-hero__button { transition: none; }
|
||||
.lf-hero__button:hover { transform: none; }
|
||||
}
|
||||
@@ -393,47 +393,52 @@ .is-clip-playing > .lf-pc__clip {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Abspiel-Schaltfläche: groß und halbtransparent mittig auf dem Vorschaubild; die Größe folgt der Breite des Bildes
|
||||
* (schmale Karte 48 px, breite bis 80 px). Läuft der Clip, wird sie zur kleinen „Anhalten“-Schaltfläche oben rechts, damit
|
||||
* sie das Bild nicht verdeckt. Gleiche Gestaltung wie im Einstieg (.lf-hero__video-toggle).
|
||||
*/
|
||||
.lf-pc__clip-toggle {
|
||||
position: absolute;
|
||||
inset: 8px 8px auto auto;
|
||||
inset: 50% auto auto 50%;
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
inline-size: 30px;
|
||||
block-size: 30px;
|
||||
inline-size: clamp(48px, 24%, 80px);
|
||||
aspect-ratio: 1;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
color: var(--lf-white);
|
||||
background: rgb(3 37 81 / 62%);
|
||||
box-shadow: 0 0 0 1px rgb(255 255 255 / 40%);
|
||||
box-shadow: 0 0 0 2px rgb(255 255 255 / 70%), 0 6px 24px rgb(3 37 81 / 35%);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Klein im Bild, aber mit 44 px Trefferfläche für Finger und Zeiger. */
|
||||
.lf-pc__clip-toggle::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: -7px;
|
||||
transform: translate(-50%, -50%);
|
||||
transition: background-color 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.is-clip-ready > .lf-pc__clip-toggle {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.lf-pc__clip-toggle:hover,
|
||||
.lf-pc__clip-toggle[aria-pressed="true"] {
|
||||
background: var(--lf-navy-deep, var(--lf-navy));
|
||||
.lf-pc__clip-toggle:hover {
|
||||
background: rgb(3 37 81 / 82%);
|
||||
transform: translate(-50%, -50%) scale(1.06);
|
||||
}
|
||||
|
||||
.lf-pc__clip-toggle:focus-visible {
|
||||
outline: 3px solid var(--color-focus);
|
||||
outline-offset: 3px;
|
||||
outline-offset: 4px;
|
||||
}
|
||||
|
||||
.lf-pc__clip-icon {
|
||||
inline-size: 16px;
|
||||
block-size: 16px;
|
||||
inline-size: 44%;
|
||||
block-size: 44%;
|
||||
}
|
||||
|
||||
/* Das Dreieck sitzt optisch etwas links; ein kleiner Versatz zentriert es im Kreis. */
|
||||
.lf-pc__clip-play {
|
||||
transform: translateX(1px);
|
||||
}
|
||||
|
||||
.lf-pc__clip-pause,
|
||||
@@ -445,11 +450,37 @@ .lf-pc__clip-toggle[aria-pressed="true"] .lf-pc__clip-pause {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* Läuft der Clip: kleine Schaltfläche oben rechts, mit 44 px Trefferfläche. */
|
||||
.lf-pc__clip-toggle[aria-pressed="true"] {
|
||||
inset: 8px 8px auto auto;
|
||||
inline-size: 30px;
|
||||
box-shadow: 0 0 0 1px rgb(255 255 255 / 40%);
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.lf-pc__clip-toggle[aria-pressed="true"]::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: -7px;
|
||||
}
|
||||
|
||||
.lf-pc__clip-toggle[aria-pressed="true"]:hover {
|
||||
background: var(--lf-navy-deep, var(--lf-navy));
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.lf-pc__clip-toggle[aria-pressed="true"] .lf-pc__clip-icon {
|
||||
inline-size: 16px;
|
||||
block-size: 16px;
|
||||
}
|
||||
|
||||
.is-clip-playing > .lf-pc__badge {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.lf-pc__clip { transition: none; }
|
||||
.lf-pc__clip-toggle { transition: none; }
|
||||
.lf-pc__clip-toggle:hover { transform: translate(-50%, -50%); }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user