diff --git a/public/custom/tiefenflug.css b/public/custom/tiefenflug.css index 78a1e77..2f09788 100644 --- a/public/custom/tiefenflug.css +++ b/public/custom/tiefenflug.css @@ -276,11 +276,13 @@ .flug-foto { position: absolute; left: 50%; top: 50%; width: clamp(180px, 22vw, 300px); - aspect-ratio: 3 / 2; + aspect-ratio: 3 / 2; /* Fallback bis das Bild geladen ist – JS setzt das echte Format */ transform-style: preserve-3d; will-change: transform, opacity; pointer-events: none; } +/* Hochformat (vom JS erkannt): schmaler, damit das Foto nicht zu hoch wird */ +.flug-foto.hochformat { width: clamp(150px, 16vw, 220px); } .flug-foto img { width: 100%; height: 100%; object-fit: cover; @@ -322,36 +324,6 @@ border-radius: var(--radius-karte); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); } -/* 3D-Medaille: flache CSS-Münze, dreht sich dauerhaft um die Y-Achse */ -.medaille-3d { - position: absolute; right: -48px; top: 50%; - width: 96px; height: 96px; - margin-top: -48px; - perspective: 420px; - z-index: 3; -} -.medaille-kern { - position: relative; - width: 100%; height: 100%; - transform-style: preserve-3d; - animation: muenzdrehung 6s linear infinite; -} -@keyframes muenzdrehung { - from { transform: rotateY(0deg); } - to { transform: rotateY(360deg); } -} -.medaille-seite { - position: absolute; inset: 0; - border-radius: 50%; - backface-visibility: hidden; - background: radial-gradient(circle at 35% 30%, #f3d27a, #c9a227 60%, #9a7a1c); - display: flex; align-items: center; justify-content: center; - font-weight: 600; font-size: 34px; color: #fff; - border: 3px solid #fff; - box-shadow: 0 10px 28px rgba(154, 122, 28, 0.45), inset 0 2px 6px rgba(255, 255, 255, 0.5); -} -.medaille-seite.hinten { transform: rotateY(180deg); } - /* Gold-Schriftzug: Verlauf wandert durch den Text */ .preis-text { position: relative; @@ -472,7 +444,7 @@ @media (prefers-reduced-motion: reduce) { .flug-foto img, .flug-hinweis, - .medaille-kern, .preis-text, .preis-text .rieseln { animation: none; } + .preis-text, .preis-text .rieseln { animation: none; } } @media (max-width: 760px) { diff --git a/public/custom/tiefenflug.js b/public/custom/tiefenflug.js index 77cba2e..373ca27 100644 --- a/public/custom/tiefenflug.js +++ b/public/custom/tiefenflug.js @@ -27,7 +27,6 @@ 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')); @@ -36,6 +35,20 @@ var partikel = [].slice.call(buehne.querySelectorAll('.partikel')) .filter(function (p) { return p.offsetParent !== null; }); + // Bildformat übernehmen: Rahmen ans echte Seitenverhältnis des Fotos + // anpassen, damit Hochformat-Bilder nicht auf 3:2 zugeschnitten werden + fotos.forEach(function (foto) { + var bild = foto.querySelector('img'); + if (!bild) return; + function formatSetzen() { + if (!bild.naturalWidth || !bild.naturalHeight) return; + foto.style.aspectRatio = bild.naturalWidth + ' / ' + bild.naturalHeight; + foto.classList.toggle('hochformat', bild.naturalHeight > bild.naturalWidth); + } + if (bild.complete) formatSetzen(); + else bild.addEventListener('load', formatSetzen, { once: true }); + }); + var FLUG_TIEFE = 1650; // px, die die Kamera nach vorn fliegt var FLUG_ENDE = 0.65; // Anteil der Strecke, bis zu dem die Kamerafahrt läuft var ABSCHIED = [0.55, 0.65]; // Fotos räumen die Bühne (alles ausblenden) @@ -147,7 +160,7 @@ }, 350); } - // Vollbild: Bild wächst über den Viewport, Medaille/Schriftzug blenden + // Vollbild: Bild wächst über den Viewport, der Schriftzug blendet // 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); @@ -160,7 +173,6 @@ 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; diff --git a/public/start-2.html b/public/start-2.html index 921f656..f754ee3 100644 --- a/public/start-2.html +++ b/public/start-2.html @@ -112,13 +112,6 @@
-
-