no message
This commit is contained in:
@@ -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 -->
|
||||
|
||||
@@ -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