diff --git a/adventskalender/2025/js/popup.js b/adventskalender/2025/js/popup.js
index c253157..e100b68 100644
--- a/adventskalender/2025/js/popup.js
+++ b/adventskalender/2025/js/popup.js
@@ -34,13 +34,28 @@ const popupData = {
};
// === Platzhalterfunktion ===
-function placeholder(text) {
- return `
-
-
${text}
-
(Inhalt wird noch produziert)
-
- `;
+function openPopup(day) {
+ const data = popupData[day];
+ if (!data) return;
+
+ const tag = String(day).padStart(2, '0');
+ const url = `/2025/inhalte/tag${tag}.html`;
+
+ fetch(url)
+ .then(res => {
+ if (!res.ok) throw new Error("Inhalt nicht gefunden");
+ return res.text();
+ })
+ .then(html => {
+ popupContent.innerHTML = `${data.title}
${html}`;
+ popupOverlay.classList.add("active");
+ })
+ .catch(err => {
+ // Fallback auf bekannte JS-Daten
+ popupContent.innerHTML = `${data.title}
${data.content}`;
+ popupOverlay.classList.add("active");
+ console.warn(`Türchen ${day}: HTML konnte nicht geladen werden. Fallback verwendet.`, err);
+ });
}
// === Öffnen / Schließen ===