Farbe nach Tageszeit

This commit is contained in:
lena_smd02 2026-07-01 12:56:32 +02:00
parent 241e6482f0
commit 1f19073ed3
2 changed files with 16 additions and 1 deletions

View file

@ -94,3 +94,7 @@ h1 {
.galerie img:hover { .galerie img:hover {
transform: scale(1.03); transform: scale(1.03);
} }
.morgen { color: #d97706; } /* warmes Orange */
.tag { color: #16a34a; } /* frisches Grün */
.abend { color: #4338ca; } /* tiefes Blau */

View file

@ -53,3 +53,14 @@ if (stunde < 10) {
} }
document.getElementById("begruessung").textContent = text; document.getElementById("begruessung").textContent = text;
const el = document.getElementById("begruessung");
el.textContent = text;
if (stunde < 10) {
el.classList.add("morgen");
} else if (stunde < 18) {
el.classList.add("tag");
} else {
el.classList.add("abend");
}