Noch mehr KI Fehler
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
<!-- === Basisbild (Platzhalter oder Hauptmotiv) ===
|
<!-- === Basisbild (Platzhalter oder Hauptmotiv) ===
|
||||||
<div class="image-wrapper">
|
<div class="image-wrapper">
|
||||||
<picture>
|
<picture>
|
||||||
<!-- AVIF -->
|
<!-- AVIF
|
||||||
<source
|
<source
|
||||||
type="image/avif"
|
type="image/avif"
|
||||||
srcset="
|
srcset="
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
/2025/assets/images/3840/avif/Basisbild.avif 3840w"
|
/2025/assets/images/3840/avif/Basisbild.avif 3840w"
|
||||||
sizes="100vw">
|
sizes="100vw">
|
||||||
|
|
||||||
<!-- WebP -->
|
<!-- WebP
|
||||||
<source
|
<source
|
||||||
type="image/webp"
|
type="image/webp"
|
||||||
srcset="
|
srcset="
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
/2025/assets/images/3840/webp/Basisbild.webp 3840w"
|
/2025/assets/images/3840/webp/Basisbild.webp 3840w"
|
||||||
sizes="100vw">
|
sizes="100vw">
|
||||||
|
|
||||||
<!-- JPEG-Fallback -->
|
<!-- JPEG-Fallback
|
||||||
<img
|
<img
|
||||||
src="/2025/assets/images/1366/jpeg/Basisbild.jpeg"
|
src="/2025/assets/images/1366/jpeg/Basisbild.jpeg"
|
||||||
srcset="
|
srcset="
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ function openPopup(day) {
|
|||||||
v.loop = true;
|
v.loop = true;
|
||||||
v.play().catch(() => {});
|
v.play().catch(() => {});
|
||||||
});
|
});
|
||||||
}, 500); // 500 ms – Zeit für DOM + Quellen
|
}, 500);
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
popupContent.innerHTML = `<h2>${data.title}</h2>${data.content}`;
|
popupContent.innerHTML = `<h2>${data.title}</h2>${data.content}`;
|
||||||
@@ -113,11 +113,48 @@ function closePopup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// === Schließen-Events ===
|
// === Schließen-Events ===
|
||||||
popupClose.addEventListener("click", closePopup);
|
if (popupClose) popupClose.addEventListener("click", closePopup);
|
||||||
popupOverlay.addEventListener("click", e => {
|
if (popupOverlay) {
|
||||||
if (e.target === popupOverlay) closePopup();
|
popupOverlay.addEventListener("click", e => {
|
||||||
});
|
if (e.target === popupOverlay) closePopup();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// === Export für door-open.js ===
|
// === Export für door-open.js ===
|
||||||
window.openPopup = openPopup;
|
window.openPopup = openPopup;
|
||||||
window.closePopup = closePopup;
|
window.closePopup = closePopup;
|
||||||
|
|
||||||
|
// ============================================================
|
||||||
|
// Ergänzung: Gesperrte Türchen – Popup mit Zufallsspruch + Zeitangabe
|
||||||
|
// ============================================================
|
||||||
|
|
||||||
|
window.showLockedPopup = function (day) {
|
||||||
|
const sprueche = [
|
||||||
|
"🎁 Na na na, hier wird nicht geschummelt!",
|
||||||
|
"❄️ Geduld ist auch eine Form von Magie.",
|
||||||
|
"🎅 Ho ho ho – zu früh! Versuch es später nochmal.",
|
||||||
|
"⏳ Die Tür klemmt noch – vielleicht morgen?",
|
||||||
|
"🍪 Kein Plätzchen für Ungeduldige!",
|
||||||
|
"🎄 Schön, dass du neugierig bist – aber noch ist Geheimniszeit!",
|
||||||
|
"🔒 Tür verriegelt. Der Weihnachtszauber hat Öffnungszeiten.",
|
||||||
|
"✨ Geduld, kleiner Weihnachtself – noch ein bisschen Glitzer abwarten!",
|
||||||
|
"🕯️ Zu früh dran? Das Lichtlein brennt noch nicht für dich."
|
||||||
|
];
|
||||||
|
|
||||||
|
const zufall = sprueche[Math.floor(Math.random() * sprueche.length)];
|
||||||
|
|
||||||
|
const yearMatch = document.title.match(/\d{4}/);
|
||||||
|
const year = yearMatch ? parseInt(yearMatch[0], 10) : new Date().getFullYear();
|
||||||
|
const unlockDate = new Date(year, 11, parseInt(day, 10), 0, 0, 0);
|
||||||
|
|
||||||
|
const options = { day: "2-digit", month: "long", year: "numeric", hour: "2-digit", minute: "2-digit" };
|
||||||
|
const dateText = unlockDate.toLocaleString("de-DE", options).replace(" um", ",");
|
||||||
|
|
||||||
|
popupContent.innerHTML = `
|
||||||
|
<h2>Türchen ${day} ist noch geschlossen</h2>
|
||||||
|
<p>${zufall}</p>
|
||||||
|
<p style="margin-top: 10px; opacity: 0.8;">🔓 Öffnet sich am <strong>${dateText}</strong></p>
|
||||||
|
`;
|
||||||
|
|
||||||
|
popupOverlay.classList.add("active");
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user