From 7a8dae5a41bc838057501574094368f063a8b408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Orzech?= Date: Sat, 28 Jun 2025 17:07:14 +0200 Subject: [PATCH] Update index.html background changes deleted --- index.html | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/index.html b/index.html index 11c61e3..9dc8fb1 100644 --- a/index.html +++ b/index.html @@ -398,35 +398,6 @@ return hour >= 20 || hour < 6; // 8 PM to 5:59 AM }; - const updateBackgroundColor = () => { - if (document.documentElement.classList.contains('dark')) { - document.body.style.background = ''; - return; - } - - const hour = new Date().getHours(); - let fromColor, toColor; - - if (hour >= 5 && hour < 7) { // Dawn - fromColor = '#FFDAB9'; // PeachPuff - toColor = '#87CEEB'; // SkyBlue - } else if (hour >= 7 && hour < 12) { // Morning - fromColor = '#87CEFA'; // LightSkyBlue - toColor = '#B0E0E6'; // PowderBlue - } else if (hour >= 12 && hour < 17) { // Afternoon - fromColor = '#ADD8E6'; // LightBlue - toColor = '#F0E68C'; // Khaki - } else if (hour >= 17 && hour < 19) { // Dusk - fromColor = '#FFA07A'; // LightSalmon - toColor = '#20B2AA'; // LightSeaGreen - } else { // Evening/Night (fallback for light mode) - fromColor = '#E6E6FA'; // Lavender - toColor = '#D8BFD8'; // Thistle - } - - document.body.style.background = `linear-gradient(to right, ${fromColor}, ${toColor}`; - }; - const setTheme = (theme) => { localStorage.setItem('theme', theme); updateThemeButtons(theme); @@ -443,7 +414,6 @@ removeStars(); stopShootingStars(); toggleCelestialBodies(true, false); - updateBackgroundColor(); } else { removeStars(); stopShootingStars();