feat(страницы): тот же переключатель темы на ценах, политике, условиях, оплате и статистике; на телефоне — внизу справа
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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){}})();
|
||||
|
||||
@@ -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){}})();
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user