feat: add plain palette option and update related components and styles
This commit is contained in:
@@ -49,6 +49,40 @@
|
||||
|
||||
:root {
|
||||
--radius: 0.65rem;
|
||||
--background: oklch(0.985 0 0);
|
||||
--foreground: oklch(0.205 0 0);
|
||||
--card: oklch(1 0 0);
|
||||
--card-foreground: oklch(0.205 0 0);
|
||||
--popover: oklch(1 0 0);
|
||||
--popover-foreground: oklch(0.205 0 0);
|
||||
--primary: oklch(0.32 0 0);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--secondary: oklch(0.96 0 0);
|
||||
--secondary-foreground: oklch(0.24 0 0);
|
||||
--muted: oklch(0.96 0 0);
|
||||
--muted-foreground: oklch(0.48 0 0);
|
||||
--accent: oklch(0.94 0 0);
|
||||
--accent-foreground: oklch(0.24 0 0);
|
||||
--destructive: oklch(0.59 0.225 25);
|
||||
--border: oklch(0.89 0 0);
|
||||
--input: oklch(0.89 0 0);
|
||||
--ring: oklch(0.56 0 0);
|
||||
--chart-1: oklch(0.44 0 0);
|
||||
--chart-2: oklch(0.56 0 0);
|
||||
--chart-3: oklch(0.68 0 0);
|
||||
--chart-4: oklch(0.76 0 0);
|
||||
--chart-5: oklch(0.84 0 0);
|
||||
--sidebar: oklch(0.96 0 0);
|
||||
--sidebar-foreground: oklch(0.24 0 0);
|
||||
--sidebar-primary: oklch(0.32 0 0);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.92 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.24 0 0);
|
||||
--sidebar-border: oklch(0.87 0 0);
|
||||
--sidebar-ring: oklch(0.56 0 0);
|
||||
}
|
||||
|
||||
:root[data-palette="green"] {
|
||||
--background: oklch(0.973 0.011 112);
|
||||
--foreground: oklch(0.22 0.021 210);
|
||||
--card: oklch(0.996 0.004 105);
|
||||
@@ -151,6 +185,40 @@
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: oklch(0.18 0 0);
|
||||
--foreground: oklch(0.94 0 0);
|
||||
--card: oklch(0.225 0 0);
|
||||
--card-foreground: oklch(0.94 0 0);
|
||||
--popover: oklch(0.225 0 0);
|
||||
--popover-foreground: oklch(0.94 0 0);
|
||||
--primary: oklch(0.82 0 0);
|
||||
--primary-foreground: oklch(0.18 0 0);
|
||||
--secondary: oklch(0.285 0 0);
|
||||
--secondary-foreground: oklch(0.94 0 0);
|
||||
--muted: oklch(0.285 0 0);
|
||||
--muted-foreground: oklch(0.7 0 0);
|
||||
--accent: oklch(0.32 0 0);
|
||||
--accent-foreground: oklch(0.94 0 0);
|
||||
--destructive: oklch(0.68 0.19 25);
|
||||
--border: oklch(1 0 0 / 10%);
|
||||
--input: oklch(1 0 0 / 14%);
|
||||
--ring: oklch(0.62 0 0);
|
||||
--chart-1: oklch(0.82 0 0);
|
||||
--chart-2: oklch(0.72 0 0);
|
||||
--chart-3: oklch(0.62 0 0);
|
||||
--chart-4: oklch(0.52 0 0);
|
||||
--chart-5: oklch(0.42 0 0);
|
||||
--sidebar: oklch(0.16 0 0);
|
||||
--sidebar-foreground: oklch(0.93 0 0);
|
||||
--sidebar-primary: oklch(0.82 0 0);
|
||||
--sidebar-primary-foreground: oklch(0.18 0 0);
|
||||
--sidebar-accent: oklch(0.27 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.94 0 0);
|
||||
--sidebar-border: oklch(1 0 0 / 9%);
|
||||
--sidebar-ring: oklch(0.62 0 0);
|
||||
}
|
||||
|
||||
.dark[data-palette="green"] {
|
||||
--background: oklch(0.18 0.016 190);
|
||||
--foreground: oklch(0.94 0.009 155);
|
||||
--card: oklch(0.225 0.018 190);
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ const geistMono = Geist_Mono({
|
||||
const paletteScript = `
|
||||
try {
|
||||
var palette = window.localStorage.getItem("dashboard_palette");
|
||||
document.documentElement.dataset.palette = palette === "blue" || palette === "gray" ? palette : "green";
|
||||
document.documentElement.dataset.palette = palette === "plain" || palette === "blue" || palette === "green" || palette === "gray" ? palette : "plain";
|
||||
} catch (_) {
|
||||
document.documentElement.dataset.palette = "green";
|
||||
document.documentElement.dataset.palette = "plain";
|
||||
}
|
||||
`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user