From 8ea61977b5a86a4653d333f56deb35e7eead1abc Mon Sep 17 00:00:00 2001 From: rubisalpha Date: Mon, 13 Apr 2026 12:00:05 +0000 Subject: [PATCH] Supprimer js/theme.js --- js/theme.js | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 js/theme.js diff --git a/js/theme.js b/js/theme.js deleted file mode 100644 index 4cfbb77..0000000 --- a/js/theme.js +++ /dev/null @@ -1,22 +0,0 @@ -function toggleTheme() { - const body = document.body; - const btn = document.getElementById('toggle-theme'); - body.classList.toggle('light-mode'); - - if (body.classList.contains('light-mode')) { - btn.textContent = '🌙'; - localStorage.setItem('theme', 'light'); - } else { - btn.textContent = '☀️'; - localStorage.setItem('theme', 'dark'); - } -} - -(function() { - const theme = localStorage.getItem('theme'); - const btn = document.getElementById('toggle-theme'); - if (theme === 'light') { - document.body.classList.add('light-mode'); - if (btn) btn.textContent = '🌙'; - } -})(); \ No newline at end of file