chore: sync public repository
CI / checks (push) Has been cancelled

This commit is contained in:
maddin
2026-03-22 15:36:47 +00:00
parent 6fbd1bb3c2
commit 847f20c9d7
16 changed files with 402 additions and 23 deletions
+35
View File
@@ -12,6 +12,7 @@
}
.app-logo {
filter: var(--icon-filter);
height: var(--logo-size);
width: var(--logo-size);
}
@@ -194,6 +195,7 @@
}
.dash-icon {
filter: var(--icon-filter);
height: var(--header-icon-size);
width: var(--header-icon-size);
}
@@ -1383,6 +1385,39 @@ select:disabled {
justify-self: end;
}
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .period-header,
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .kpi-bar__item,
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .day-row,
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .week-group-header {
border-color: var(--color-border);
}
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .period-header {
background: var(--color-surface-list-alt);
}
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .kpi-bar__item,
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .ui-chip,
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .week-group-header {
background: var(--color-surface);
}
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .ui-chip {
border-color: var(--color-border);
}
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .day-row {
background: var(--color-surface-list);
}
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .day-row--weekend {
background: var(--color-surface-list-alt);
}
:is(html[data-theme="light"], html[data-theme="auto"][data-theme-resolved="light"]) .day-row--today {
background: var(--color-surface-list-today);
}
.week-group-card-mobile .day-list {
gap: var(--stack-1);
padding-inline-start: var(--space-2);
+2
View File
@@ -173,6 +173,8 @@
.site-footer-inner {
align-items: flex-start;
flex-direction: column;
padding-bottom: var(--space-7);
padding-bottom: calc(var(--space-7) + env(safe-area-inset-bottom));
}
}
+99 -1
View File
@@ -23,7 +23,7 @@
--color-warning-bg: #6d5500;
--color-chip-bg: #202124;
--color-weekend: #22252b;
--color-day-today: #1a3f4a;
--color-day-today: #214331;
--color-accent: #9e7700;
--color-badge-bg: #f3f3f3;
--color-badge-text: #222326;
@@ -31,6 +31,10 @@
--color-header-badge-bg: #1d1d1f;
--color-header-badge-label: #f5f5f5;
--color-header-badge-text: #f5f5f5;
--color-surface-list: #2a2b2e;
--color-surface-list-alt: #24262a;
--color-surface-list-today: #214331;
--icon-filter: none;
--font-family-base: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
--font-size-xs: 0.75rem;
@@ -99,3 +103,97 @@
--bp-md: 51.25em;
--bp-sm: 32.5em;
}
html {
color-scheme: dark;
}
html[data-theme="dark"] {
color-scheme: dark;
}
html[data-theme="light"] {
color-scheme: light;
--color-bg: #f3f4f6;
--color-surface: #ffffff;
--color-surface-2: #edf1f5;
--color-surface-3: #f7f8fa;
--color-surface-4: #e7ebf0;
--color-border: #d4dae2;
--color-border-soft: #e1e6ec;
--color-text: #17191d;
--color-text-muted: #5f6772;
--color-link: #17191d;
--color-primary: #dde3ea;
--color-primary-hover: #d1d8e1;
--color-button-primary: #4d8a55;
--color-button-primary-hover: #43784a;
--color-button-primary-border: #5c9a64;
--color-danger: #c95a5a;
--color-danger-strong: #d62828;
--color-success: #2f7d33;
--color-success-strong: #2cd600;
--color-success-bg: #e7f6e9;
--color-warning: #9f7200;
--color-warning-bg: #fff0c4;
--color-chip-bg: #e8ebf0;
--color-weekend: #ebeef2;
--color-day-today: #d7f1dc;
--color-accent: #9e7700;
--color-badge-bg: #2c2d2f;
--color-badge-text: #f5f5f5;
--color-workhours: #7f53d9;
--color-header-badge-bg: #e5e9ef;
--color-header-badge-label: #17191d;
--color-header-badge-text: #17191d;
--color-surface-list: #dde4ec;
--color-surface-list-alt: #cfd8e2;
--color-surface-list-today: #d1ebd6;
--icon-filter: brightness(0) saturate(100%) invert(8%) sepia(8%) saturate(834%) hue-rotate(182deg) brightness(92%) contrast(92%);
}
html[data-theme="auto"] {
color-scheme: dark;
}
@media (prefers-color-scheme: light) {
html[data-theme="auto"] {
color-scheme: light;
--color-bg: #f3f4f6;
--color-surface: #ffffff;
--color-surface-2: #edf1f5;
--color-surface-3: #f7f8fa;
--color-surface-4: #e7ebf0;
--color-border: #d4dae2;
--color-border-soft: #e1e6ec;
--color-text: #17191d;
--color-text-muted: #5f6772;
--color-link: #17191d;
--color-primary: #dde3ea;
--color-primary-hover: #d1d8e1;
--color-button-primary: #4d8a55;
--color-button-primary-hover: #43784a;
--color-button-primary-border: #5c9a64;
--color-danger: #c95a5a;
--color-danger-strong: #d62828;
--color-success: #2f7d33;
--color-success-strong: #2cd600;
--color-success-bg: #e7f6e9;
--color-warning: #9f7200;
--color-warning-bg: #fff0c4;
--color-chip-bg: #e8ebf0;
--color-weekend: #ebeef2;
--color-day-today: #d7f1dc;
--color-accent: #9e7700;
--color-badge-bg: #2c2d2f;
--color-badge-text: #f5f5f5;
--color-workhours: #7f53d9;
--color-header-badge-bg: #e5e9ef;
--color-header-badge-label: #17191d;
--color-header-badge-text: #17191d;
--color-surface-list: #dde4ec;
--color-surface-list-alt: #cfd8e2;
--color-surface-list-today: #d1ebd6;
--icon-filter: brightness(0) saturate(100%) invert(8%) sepia(8%) saturate(834%) hue-rotate(182deg) brightness(92%) contrast(92%);
}
}
+2
View File
@@ -4,8 +4,10 @@ import { initForms } from './components/forms.js?v=20260322a';
import { initModal } from './components/modal.js';
import { initDashboard } from './components/dashboard.js';
import { initSettingsSections } from './components/settings-sections.js';
import { initTheme } from './components/theme.js';
function initApp() {
initTheme();
initCsrf();
initFlash();
initForms();
+42
View File
@@ -0,0 +1,42 @@
function resolveTheme(root) {
const preference = root.dataset.theme || 'auto';
if (preference === 'light' || preference === 'dark') {
return preference;
}
return window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
}
function applyThemeState(root) {
const resolved = resolveTheme(root);
root.dataset.themeResolved = resolved;
const themeMeta = document.querySelector('meta[name="theme-color"]');
if (themeMeta) {
const background = getComputedStyle(root).getPropertyValue('--color-bg').trim();
if (background) {
themeMeta.setAttribute('content', background);
}
}
}
export function initTheme() {
const root = document.documentElement;
if (!root) {
return;
}
applyThemeState(root);
const media = window.matchMedia('(prefers-color-scheme: light)');
const handleChange = () => {
if ((root.dataset.theme || 'auto') === 'auto') {
applyThemeState(root);
}
};
if (typeof media.addEventListener === 'function') {
media.addEventListener('change', handleChange);
} else if (typeof media.addListener === 'function') {
media.addListener(handleChange);
}
}