style(web): Modul-Kacheln einfarbig, Akzent nur fuer das Modul im Fokus
Statt bunter Modulfarben neutrale graue Kacheln; gelb (persoenliche Akzentfarbe) nur fuer den gewaehlten Eintrag der Seitenleiste und den Seitenkopf des Moduls. Schrift auf Akzentflaechen wird jetzt je nach Akzentfarbe hell oder dunkel gewaehlt (readableOnAccent). Anmelde- Mosaik und Dashboard-Hintergruende nur noch in Gelb, Grau, Graphit; Salbei ersetzt durch Kiesel. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { create } from 'zustand';
|
||||
import { readableOnAccent } from '@/lib/color';
|
||||
|
||||
export interface AuthUser {
|
||||
id: string;
|
||||
@@ -31,8 +32,11 @@ function applyAccentColor(color: string | null | undefined) {
|
||||
root.style.removeProperty('--sidebar-accent-foreground');
|
||||
if (color) {
|
||||
root.style.setProperty('--primary', color);
|
||||
// Schrift auf der Akzentflaeche: hell oder dunkel, je nach Kontrast.
|
||||
root.style.setProperty('--primary-foreground', readableOnAccent(color));
|
||||
} else {
|
||||
root.style.removeProperty('--primary');
|
||||
root.style.removeProperty('--primary-foreground');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user