From 5561295a9d61f8efc2c648b82a02ac51a39ee36f Mon Sep 17 00:00:00 2001 From: Carina_Hirschle Date: Wed, 3 Jun 2026 15:07:03 +0200 Subject: [PATCH] =?UTF-8?q?Begr=C3=BC=C3=9Fung=20nach=20Tageszeit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- js/script.js | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index e7406f0..38f1b9c 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,6 @@ - isa9 – EIS SoSe 25 @@ -13,6 +12,7 @@

cyan.

+

Creative Studio.

diff --git a/js/script.js b/js/script.js index 896835d..9e79bcc 100644 --- a/js/script.js +++ b/js/script.js @@ -42,4 +42,18 @@ document.addEventListener("DOMContentLoaded", () => { const isDark = document.body.classList.contains("dark"); localStorage.setItem("darkMode", isDark); }); -}); \ No newline at end of file +}); + +// Begruessung nach Tageszeit +const stunde = new Date().getHours(); +let text; + +if (stunde < 10) { + text = "Guten Morgen!"; +} else if (stunde < 18) { + text = "Hallo, schön dass du da bist!"; +} else { + text = "Guten Abend!"; +} + +document.getElementById("begruessung").textContent = text; \ No newline at end of file