Add theme settings, and remove the old theme system

This commit is contained in:
tyuXX 2026-11-15 20:48:49 +03:00
parent 567ac1a26d
commit 9f4a3197de
22 changed files with 2301 additions and 463 deletions

View file

@ -7,6 +7,7 @@
--bg-hover: #212a3c;
--border: #2a3449;
--border-bright: #3d4d6b;
--border-subtle: rgba(42, 52, 73, 0.55);
--text: #e2e8f0;
--text-dim: #94a3b8;
--text-faint: #64748b;
@ -19,64 +20,86 @@
--amber: #f59e0b;
--red: #f87171;
--violet: #a78bfa;
--bg-glass: rgba(18, 22, 31, 0.9);
--bg-inset: rgba(11, 14, 20, 0.65);
--bg-header-fade: rgba(11, 14, 20, 0.92);
--overlay-scrim: rgba(7, 10, 15, 0.84);
--badge-bg: rgba(11, 14, 20, 0.72);
--btn-primary-bg: rgba(52, 152, 219, 0.18);
--btn-primary-hover: rgba(52, 152, 219, 0.34);
--btn-primary-text: #dbeafe;
--btn-warn-bg: rgba(245, 158, 11, 0.15);
--btn-warn-text: #fde68a;
--btn-danger-bg: rgba(248, 113, 113, 0.12);
--btn-danger-text: #fecaca;
--btn-ghost-bg: rgba(18, 22, 31, 0.65);
--title-color: #f8fafc;
--grid-line-color: rgba(148, 163, 184, 0.03);
--bg-gradient: none;
--panel-gradient: none;
--shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.45);
--shadow-modal: 0 12px 32px rgba(0, 0, 0, 0.6);
--mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
--sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
--chamfer: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
--chamfer-sm: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
--radius-panel: 0px;
--radius-sm: 0px;
}
body[data-target="lunar"], body[data-target="moon-landing"] {
body[data-dynamic-theme="on"][data-target="lunar"],
body[data-dynamic-theme="on"][data-target="moon-landing"] {
--sim-accent: #93c5fd;
--sim-accent-dim: rgba(147, 197, 253, 0.26);
--sim-glow: rgba(147, 197, 253, 0.14);
}
body[data-target="mars"] {
body[data-dynamic-theme="on"][data-target="mars"] {
--sim-accent: #fb923c;
--sim-accent-dim: rgba(251, 146, 60, 0.28);
--sim-glow: rgba(251, 146, 60, 0.14);
}
body[data-target="jupiter"], body[data-target="asteroid"] {
body[data-dynamic-theme="on"][data-target="jupiter"],
body[data-dynamic-theme="on"][data-target="asteroid"] {
--sim-accent: #a78bfa;
--sim-accent-dim: rgba(167, 139, 250, 0.28);
--sim-glow: rgba(167, 139, 250, 0.14);
}
body[data-target="solar"], body[data-target="l1"] {
body[data-dynamic-theme="on"][data-target="solar"],
body[data-dynamic-theme="on"][data-target="l1"] {
--sim-accent: #fbbf24;
--sim-accent-dim: rgba(251, 191, 36, 0.28);
--sim-glow: rgba(251, 191, 36, 0.14);
}
body[data-weather="solar-wind"] {
body[data-dynamic-theme="on"][data-weather="solar-wind"] {
--sim-accent: #38bdf8;
--sim-accent-dim: rgba(56, 189, 248, 0.30);
--sim-glow: rgba(56, 189, 248, 0.16);
}
body[data-weather="solar-storm"] {
body[data-dynamic-theme="on"][data-weather="solar-storm"] {
--sim-accent: #f59e0b;
--sim-accent-dim: rgba(245, 158, 11, 0.34);
--sim-glow: rgba(245, 158, 11, 0.18);
}
body[data-weather="radiation-storm"] {
body[data-dynamic-theme="on"][data-weather="radiation-storm"] {
--sim-accent: #f87171;
--sim-accent-dim: rgba(248, 113, 113, 0.34);
--sim-glow: rgba(248, 113, 113, 0.18);
}
body[data-weather="micrometeoroid"] {
body[data-dynamic-theme="on"][data-weather="micrometeoroid"] {
--sim-accent: #c084fc;
--sim-accent-dim: rgba(192, 132, 252, 0.32);
--sim-glow: rgba(192, 132, 252, 0.16);
}
body[data-dynamic-theme="off"] {
--sim-accent: var(--brand-blue);
--sim-accent-dim: rgba(96, 165, 250, 0.25);
--sim-glow: rgba(96, 165, 250, 0.14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
height: 100%;
background: var(--bg-deep);
background-color: var(--bg-deep);
background-image: var(--bg-gradient);
color: var(--text);
font-family: var(--sans);
font-size: 14px;
@ -89,8 +112,8 @@ body::before {
position: fixed; inset: 0; pointer-events: none; z-index: 0;
background-image:
radial-gradient(circle at 50% 15%, var(--sim-glow), transparent 65%),
linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
linear-gradient(var(--grid-line-color) 1px, transparent 1px),
linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
background-size: 100% 100%, 44px 44px, 44px 44px;
transition: background 0.6s ease;
}