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
+20
View File
@@ -82,5 +82,25 @@ async function poll() {
}
poll();
</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; }
</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>
+20
View File
@@ -123,5 +123,25 @@ html { color-scheme: light; }
</div>
</div>
<!-- Переключатель темы — тот же на всех страницах (сказал Хозяин 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; }
</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>
+20
View File
@@ -131,5 +131,25 @@ html { color-scheme: light; }
</div>
</div>
<!-- Переключатель темы — тот же на всех страницах (сказал Хозяин 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; }
</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>
+1
View File
@@ -50,6 +50,7 @@ html { color-scheme: light; }
:root[data-theme="dark"] input { background: #262019; color: var(--text); }
:root[data-theme="dark"] button:hover { background: #c2564a; }
#theme-fab { position: fixed; top: .8rem; right: .8rem; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font-size: 1rem; line-height: 1; }
@media (max-width: 640px) { #theme-fab { top: auto; bottom: .9rem; right: .9rem; } }
</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){}})();
+1
View File
@@ -47,6 +47,7 @@ html { color-scheme: light; }
: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; }
@media (max-width: 640px) { #theme-fab { top: auto; bottom: .9rem; right: .9rem; } }
</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){}})();
+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>
+20
View File
@@ -98,5 +98,25 @@ html { color-scheme: light; }
</div>
</div>
<!-- Переключатель темы — тот же на всех страницах (сказал Хозяин 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; }
</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>