diff --git a/public/index.html b/public/index.html index 4535335..38cd044 100644 --- a/public/index.html +++ b/public/index.html @@ -25,6 +25,7 @@ +
@@ -228,6 +229,16 @@ document.getElementById('btnReset').onclick = () => { chatHistory = []; chat.innerHTML = ''; setStatus('🧹 Очищено'); }; + + // Тема + const btnTheme = document.getElementById('btnTheme'); + let dark = localStorage.getItem('say_dark') !== '0'; + function applyTheme() { + document.body.className = dark ? 'dark' : 'light'; + btnTheme.textContent = dark ? '🌙' : '☀️'; + } + applyTheme(); + btnTheme.onclick = () => { dark = !dark; localStorage.setItem('say_dark', dark ? '1' : '0'); applyTheme(); };