feat: тёмная тема на admin/register/security + бамп версии
Распространил тёмную тему на остальные живые страницы (админка, регистрация, страница безопасности) — выбор общий с чатом через localStorage['theme'], FOUC-скрипт в <head>, переключатель (в навигации админки / плавающая кнопка на register и security). Палитра та же, что в чате. Депрекированные фреймы (batch3/ssr/wizard/generate/reference/check — кнопки закомментированы) не трогал. Версия: v.2026-06-10b. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,9 +29,30 @@ th { background: var(--bg); font-weight: 600; }
|
||||
.back:hover { text-decoration: underline; }
|
||||
.compare-good { color: #2b8a3e; }
|
||||
.compare-bad { color: #c92a2a; }
|
||||
|
||||
/* ===== Тёмная тема (общая с чатом; выбор в localStorage['theme']) ===== */
|
||||
html { color-scheme: light; }
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
--bg: #16140f; --bg-card: #211d17; --text: #ece4d7; --text-muted: #a89c8a;
|
||||
--border: #3a332a; --accent: #d9695c;
|
||||
--shadow-md: 0 8px 28px rgba(0,0,0,.55);
|
||||
}
|
||||
:root[data-theme="dark"] strong { color: #ece4d7; }
|
||||
:root[data-theme="dark"] .highlight { background: #2a2410; }
|
||||
:root[data-theme="dark"] .compare-good { color: #5fc27e; }
|
||||
:root[data-theme="dark"] .compare-bad { color: #ff8585; }
|
||||
#theme-fab { position: fixed; top: .8rem; right: .8rem; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text); cursor: pointer; font-size: 1rem; line-height: 1; }
|
||||
</style>
|
||||
<script>
|
||||
(function(){try{var t=localStorage.getItem('theme');if(t!=='dark'&&t!=='light'){t=(window.matchMedia&&matchMedia('(prefers-color-scheme: dark)').matches)?'dark':'light';}document.documentElement.setAttribute('data-theme',t);}catch(e){}})();
|
||||
function toggleTheme(){var n=document.documentElement.getAttribute('data-theme')==='dark'?'light':'dark';document.documentElement.setAttribute('data-theme',n);try{localStorage.setItem('theme',n);}catch(e){}applyThemeIcon();}
|
||||
function applyThemeIcon(){var b=document.getElementById('theme-fab');if(b)b.textContent=document.documentElement.getAttribute('data-theme')==='dark'?'☀':'☾';}
|
||||
document.addEventListener('DOMContentLoaded',applyThemeIcon);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<button id="theme-fab" onclick="toggleTheme()" title="Светлая / тёмная тема" aria-label="Переключить тему">☾</button>
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user