From 50e40139fd490c8cb1fc07cb8272126cb18cb020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Tonh=C3=A4user?= Date: Thu, 11 Jun 2026 12:20:56 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20Vollbild-=C3=9Cbergang=20des=20Gewinner?= =?UTF-8?q?bilds=20mit=20wei=C3=9Fem=20Verlauf=20zur=20Landung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- public/custom/tiefenflug.css | 13 +++++++++++++ public/custom/tiefenflug.js | 21 +++++++++++++++++++++ public/start-2.html | 3 +++ 3 files changed, 37 insertions(+) diff --git a/public/custom/tiefenflug.css b/public/custom/tiefenflug.css index d6df301..a6dd044 100644 --- a/public/custom/tiefenflug.css +++ b/public/custom/tiefenflug.css @@ -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. diff --git a/public/custom/tiefenflug.js b/public/custom/tiefenflug.js index 006c516..77cba2e 100644 --- a/public/custom/tiefenflug.js +++ b/public/custom/tiefenflug.js @@ -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 : ''; } diff --git a/public/start-2.html b/public/start-2.html index 503e7c9..921f656 100644 --- a/public/start-2.html +++ b/public/start-2.html @@ -125,6 +125,9 @@ + + +
SCROLLEN ↓