no message
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user