no message

This commit is contained in:
2025-11-15 13:34:34 +01:00
parent 673d54d89f
commit 4d8ded3981
3 changed files with 110 additions and 12 deletions

View File

@@ -3,6 +3,11 @@
<!-- TITEL -->
<div class="popup-header">
<h2>🎁 2. Dezember Wenn es still wird</h2>
<div class="popup-tools">
<button id="btn-font-toggle" aria-label="Schriftart umschalten">A⇄A</button>
<button id="btn-font-up" aria-label="Schrift vergrößern">A+</button>
<button id="btn-font-down" aria-label="Schrift verkleinern">A</button>
</div>
</div>
<!-- ZWEI SPALTEN -->

View File

@@ -157,4 +157,48 @@ window.showLockedPopup = function (day) {
`;
popupOverlay.classList.add("active");
};
};
// ============================================================
// Zusatzfunktionen: Schriftart & Schriftgröße
// ============================================================
document.addEventListener("DOMContentLoaded", () => {
const popupBody = document.querySelector(".popup-body");
// --- BUTTONS ---
const btnFontToggle = document.getElementById("btn-font-toggle");
const btnFontUp = document.getElementById("btn-font-up");
const btnFontDown = document.getElementById("btn-font-down");
if (!popupBody) return;
// --- 1) Schriftart toggle ---
if (btnFontToggle) {
btnFontToggle.addEventListener("click", () => {
popupBody.classList.toggle("font-readable");
});
}
// --- 2) Schriftgröße anpassen ---
let currentScale = 1; // 1 = normal
function applyScale() {
popupBody.style.fontSize = `${currentScale}em`;
}
if (btnFontUp) {
btnFontUp.addEventListener("click", () => {
currentScale = Math.min(currentScale + 0.1, 2);
applyScale();
});
}
if (btnFontDown) {
btnFontDown.addEventListener("click", () => {
currentScale = Math.max(currentScale - 0.1, 0.5);
applyScale();
});
}
});