Logik Farbwechsel Tageszeiten
This commit is contained in:
parent
fb5dff68a9
commit
d0ea461b98
1 changed files with 12 additions and 1 deletions
11
js/script.js
11
js/script.js
|
|
@ -118,3 +118,14 @@ if (stunde < 10) {
|
|||
}
|
||||
|
||||
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");
|
||||
}
|
||||
Loading…
Reference in a new issue