feat: Vollbild-Übergang des Gewinnerbilds mit weißem Verlauf zur Landung
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d7db9124c6
commit
50e40139fd
3 files changed
+37
No files matched your search
@@ -448,6 +448,19 @@
|
||||
.name-moment span:nth-child(13) { transition-delay: 1.20s; }
|
||||
.name-moment span:nth-child(14) { transition-delay: 1.30s; }
|
||||
|
||||
/* Vollbild-Übergang: Gewinnerbild wächst, Verlauf ins Weiße */
|
||||
.preis-bild { will-change: transform; }
|
||||
.preis-bild img { transition: border-radius 0.4s ease-out, box-shadow 0.4s ease-out; }
|
||||
.preis.vollbild .preis-bild img { border-radius: 0; box-shadow: none; }
|
||||
.landung-verlauf {
|
||||
position: absolute; left: 0; right: 0; bottom: 0;
|
||||
height: 30vh;
|
||||
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
/* ==================== FALLBACKS ====================
|
||||
- .kein-js: steht im HTML und wird von tiefenflug.js entfernt;
|
||||
ohne JS bleibt sie stehen und das Intro verschwindet.
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
var hinweis = document.getElementById('flug-hinweis');
|
||||
var nameMoment = document.getElementById('name-moment');
|
||||
var nameGefuellt = false;
|
||||
var preisBild = document.getElementById('preis-bild');
|
||||
var medaille = document.getElementById('medaille');
|
||||
var preisText = document.getElementById('preis-text');
|
||||
var verlauf = document.getElementById('landung-verlauf');
|
||||
var geister = [].slice.call(buehne.querySelectorAll('.geist'));
|
||||
var fotos = [].slice.call(buehne.querySelectorAll('.flug-foto'))
|
||||
.filter(function (f) { return f.offsetParent !== null; }); // mobil ausgeblendete überspringen
|
||||
@@ -143,6 +147,23 @@
|
||||
}, 350);
|
||||
}
|
||||
|
||||
// Vollbild: Bild wächst über den Viewport, Medaille/Schriftzug blenden
|
||||
// aus, der weiße Verlauf holt die Landung herein
|
||||
var vollT = Math.max(0, Math.min((fortschritt - VOLLBILD[0]) / (VOLLBILD[1] - VOLLBILD[0]), 1));
|
||||
var weichVoll = 1 - Math.pow(1 - vollT, 3);
|
||||
if (vollT > 0) {
|
||||
var zielBreite = window.innerWidth / preisBild.offsetWidth;
|
||||
var zielHoehe = window.innerHeight / preisBild.offsetHeight;
|
||||
var ziel = Math.max(zielBreite, zielHoehe) * 1.02;
|
||||
preisBild.style.transform = 'scale(' + (1 + (ziel - 1) * weichVoll) + ')';
|
||||
} else {
|
||||
preisBild.style.transform = '';
|
||||
}
|
||||
preis.classList.toggle('vollbild', vollT > 0.01);
|
||||
medaille.style.opacity = Math.max(0, 1 - vollT * 3);
|
||||
preisText.style.opacity = Math.max(0, 1 - vollT * 2);
|
||||
verlauf.style.opacity = vollT;
|
||||
|
||||
hinweis.style.opacity = fortschritt > 0.05 ? 0 : '';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user