feat(страницы): тот же переключатель темы на ценах, политике, условиях, оплате и статистике; на телефоне — внизу справа

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
anor
2026-11-18 02:15:37 +10:00
co-authored by Claude Code
parent 3204879d87
commit d9c20b7c68
7 changed files with 103 additions and 0 deletions
+21
View File
@@ -286,5 +286,26 @@ async function load() {
}
load();
</script>
<!-- Переключатель темы — тот же на всех страницах (сказал Хозяин 18.11) -->
<style>
#theme-fab { position: fixed; top: .8rem; right: .8rem; width: 38px; height: 38px; border-radius: 50%;
border: 1.5px solid var(--border, #ddd0bf); background: var(--card, var(--bg-card, #fff));
color: var(--text, #2b2926); cursor: pointer; font-size: 1rem; line-height: 1; z-index: 50; }
@media (max-width: 640px) { #theme-fab { top: auto; bottom: .9rem; right: .9rem; } }
</style>
<button id="theme-fab" onclick="toggleTheme()" title="Светлая / тёмная тема" aria-label="Переключить тему">☾</button>
<script>
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' ? '☀' : '☾';
}
applyThemeIcon();
</script>
</body>
</html>