Update theme colors and enhance dark mode styling

- Changed the dark theme background color in `app.js` for improved aesthetics.
- Added new CSS variables for dark theme elements in `style.css`, enhancing visual consistency and user experience.
- Updated styling for various components in dark mode, including duty markers and calendar sticky behavior, to align with the new theme parameters.
This commit is contained in:
2026-02-18 15:06:35 +03:00
parent 1a0c49967e
commit d0d22c150a
2 changed files with 23 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
const RETRY_DELAY_MS = 800;
const RETRY_AFTER_ACCESS_DENIED_MS = 1200;
const THEME_BG = { dark: "#1a1b26", light: "#d5d6db" };
const THEME_BG = { dark: "#17212b", light: "#d5d6db" };
function getTheme() {
if (typeof window === "undefined") return "dark";

View File

@@ -27,6 +27,20 @@
--error: #c43b3b;
}
/* Dark theme: prefer Telegram themeParams, fallback to Telegram dark palette */
[data-theme="dark"] {
--bg: var(--tg-theme-bg-color, #17212b);
--surface: var(--tg-theme-secondary-bg-color, #232e3c);
--text: var(--tg-theme-text-color, #f5f5f5);
--muted: var(--tg-theme-hint-color, #708499);
--accent: var(--tg-theme-link-color, #6ab3f3);
--today: var(--tg-theme-link-color, var(--tg-theme-accent-text-color, #6ab2f2));
--duty: #5c9b4a;
--unavailable: #b8860b;
--vacation: #5a9bb8;
--error: #e06c75;
}
html {
scrollbar-gutter: stable;
scrollbar-width: none;
@@ -125,6 +139,10 @@ body {
box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .calendar-sticky.is-scrolled {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.calendar {
display: grid;
grid-template-columns: repeat(7, 1fr);
@@ -453,6 +471,10 @@ body {
border-left-color: var(--vacation);
}
[data-theme="dark"] .duty-marker {
background: color-mix(in srgb, var(--duty) 25%, transparent);
}
.duty-item .duty-item-type {
grid-column: 1;
grid-row: 1;