feat: add color palette definitions and data for various themes.
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
font-family: 'Inter';
|
font-family: 'Inter';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-display: swap;
|
font-display: optional;
|
||||||
src: url('/fonts/inter/Inter-Medium.woff2') format('woff2');
|
src: url('/fonts/inter/Inter-Medium.woff2') format('woff2');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
font-family: 'Inter';
|
font-family: 'Inter';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-display: swap;
|
font-display: optional;
|
||||||
src: url('/fonts/inter/Inter-SemiBold.woff2') format('woff2');
|
src: url('/fonts/inter/Inter-SemiBold.woff2') format('woff2');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
font-family: 'Inter';
|
font-family: 'Inter';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-display: swap;
|
font-display: optional;
|
||||||
src: url('/fonts/inter/Inter-Bold.woff2') format('woff2');
|
src: url('/fonts/inter/Inter-Bold.woff2') format('woff2');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
font-family: 'JetBrains Mono';
|
font-family: 'JetBrains Mono';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: optional;
|
||||||
src: url('/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2') format('woff2');
|
src: url('/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2') format('woff2');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
font-family: 'JetBrains Mono';
|
font-family: 'JetBrains Mono';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-display: swap;
|
font-display: optional;
|
||||||
src: url('/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2') format('woff2');
|
src: url('/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2') format('woff2');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
font-family: 'JetBrains Mono';
|
font-family: 'JetBrains Mono';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-display: swap;
|
font-display: optional;
|
||||||
src: url('/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2') format('woff2');
|
src: url('/fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2') format('woff2');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getDefinition } from '$lib/data/unitDefinitions';
|
import { getDefinition } from '$lib/data/unitDefinitions';
|
||||||
import type { CalculatorDef } from '$lib/data/calculators';
|
import type { CalculatorDef } from '$lib/data/calculatorLoader';
|
||||||
|
|
||||||
export let config: CalculatorDef;
|
export let config: CalculatorDef;
|
||||||
|
|
||||||
@@ -11,8 +11,10 @@
|
|||||||
|
|
||||||
$: label1 = config.labels.in1 || 'Unit 1';
|
$: label1 = config.labels.in1 || 'Unit 1';
|
||||||
$: label2 = config.labels.in2 || 'Unit 2';
|
$: label2 = config.labels.in2 || 'Unit 2';
|
||||||
$: def1 = getDefinition(label1, config.category);
|
$: {
|
||||||
$: def2 = getDefinition(label2, config.category);
|
getDefinition(label1, config.category).then(d => { def1 = d; });
|
||||||
|
getDefinition(label2, config.category).then(d => { def2 = d; });
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="definition-card">
|
<section class="definition-card">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { calculators } from './calculators';
|
import { loadCalculators, type CalculatorDef } from './calculatorLoader';
|
||||||
|
|
||||||
const domainDefinitions: Record<string, { summary: string; context: string }> = {
|
const domainDefinitions: Record<string, { summary: string; context: string }> = {
|
||||||
length: {
|
length: {
|
||||||
@@ -97,7 +97,6 @@ const normalizeLabel = (label?: string): string | undefined => {
|
|||||||
return alias ?? trimmed;
|
return alias ?? trimmed;
|
||||||
};
|
};
|
||||||
|
|
||||||
const definitions: Record<string, Record<string, string>> = {};
|
|
||||||
const categoryPriority = [...Object.keys(domainDefinitions)];
|
const categoryPriority = [...Object.keys(domainDefinitions)];
|
||||||
|
|
||||||
const buildDefinition = (label: string, categoryKey: string): string => {
|
const buildDefinition = (label: string, categoryKey: string): string => {
|
||||||
@@ -107,17 +106,36 @@ const buildDefinition = (label: string, categoryKey: string): string => {
|
|||||||
return `${label} ${description}`;
|
return `${label} ${description}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
calculators.forEach(calc => {
|
// Lazily built definitions cache
|
||||||
const { category, labels } = calc;
|
let definitions: Record<string, Record<string, string>> | null = null;
|
||||||
Object.values(labels).forEach(label => {
|
let buildPromise: Promise<void> | null = null;
|
||||||
const normalized = normalizeLabel(label);
|
|
||||||
if (!normalized) return;
|
async function ensureBuilt(): Promise<Record<string, Record<string, string>>> {
|
||||||
const bucket = definitions[normalized] || {};
|
if (definitions) return definitions;
|
||||||
const text = buildDefinition(normalized, category);
|
if (buildPromise) {
|
||||||
bucket[category] = text;
|
await buildPromise;
|
||||||
definitions[normalized] = bucket;
|
return definitions!;
|
||||||
|
}
|
||||||
|
|
||||||
|
buildPromise = loadCalculators().then(calculators => {
|
||||||
|
const defs: Record<string, Record<string, string>> = {};
|
||||||
|
calculators.forEach(calc => {
|
||||||
|
const { category, labels } = calc;
|
||||||
|
Object.values(labels).forEach(label => {
|
||||||
|
const normalized = normalizeLabel(label);
|
||||||
|
if (!normalized) return;
|
||||||
|
const bucket = defs[normalized] || {};
|
||||||
|
const text = buildDefinition(normalized, category);
|
||||||
|
bucket[category] = text;
|
||||||
|
defs[normalized] = bucket;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
definitions = defs;
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
await buildPromise;
|
||||||
|
return definitions!;
|
||||||
|
}
|
||||||
|
|
||||||
const findByPriority = (entries: Record<string, string>, preferred?: string): string | undefined => {
|
const findByPriority = (entries: Record<string, string>, preferred?: string): string | undefined => {
|
||||||
if (!entries) return undefined;
|
if (!entries) return undefined;
|
||||||
@@ -129,11 +147,10 @@ const findByPriority = (entries: Record<string, string>, preferred?: string): st
|
|||||||
return fallback.length ? fallback[0] : undefined;
|
return fallback.length ? fallback[0] : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function getDefinition(label: string, category?: string): string | undefined {
|
export async function getDefinition(label: string, category?: string): Promise<string | undefined> {
|
||||||
const normalized = normalizeLabel(label);
|
const normalized = normalizeLabel(label);
|
||||||
if (!normalized) return undefined;
|
if (!normalized) return undefined;
|
||||||
const entries = definitions[normalized];
|
const defs = await ensureBuilt();
|
||||||
|
const entries = defs[normalized];
|
||||||
return findByPriority(entries, category);
|
return findByPriority(entries, category);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const unitDefinitions = definitions;
|
|
||||||
|
|||||||
244
hdyc-svelte/src/lib/palettes.ts
Normal file
244
hdyc-svelte/src/lib/palettes.ts
Normal file
@@ -0,0 +1,244 @@
|
|||||||
|
export type ThemeMode = 'light' | 'dark';
|
||||||
|
export type PaletteVar =
|
||||||
|
| 'bg'
|
||||||
|
| 'bg-elevated'
|
||||||
|
| 'sidebar-bg'
|
||||||
|
| 'card-bg'
|
||||||
|
| 'input-bg'
|
||||||
|
| 'hover-bg'
|
||||||
|
| 'border'
|
||||||
|
| 'text'
|
||||||
|
| 'text-muted'
|
||||||
|
| 'accent'
|
||||||
|
| 'accent-dark'
|
||||||
|
| 'accent-glow'
|
||||||
|
| 'accent-gradient'
|
||||||
|
| 'header-bg';
|
||||||
|
|
||||||
|
export type PaletteTheme = Record<PaletteVar, string>;
|
||||||
|
|
||||||
|
export type Palette = {
|
||||||
|
slug: string;
|
||||||
|
label: string;
|
||||||
|
light: PaletteTheme;
|
||||||
|
dark: PaletteTheme;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const palettes: Palette[] = [
|
||||||
|
{
|
||||||
|
slug: 'classic',
|
||||||
|
label: 'Classic',
|
||||||
|
light: {
|
||||||
|
bg: '#f8fafc',
|
||||||
|
'bg-elevated': '#ffffff',
|
||||||
|
'sidebar-bg': '#ffffff',
|
||||||
|
'card-bg': '#ffffff',
|
||||||
|
'input-bg': 'rgba(15, 23, 42, 0.04)',
|
||||||
|
'hover-bg': 'rgba(15, 23, 42, 0.08)',
|
||||||
|
border: 'rgba(15, 23, 42, 0.12)',
|
||||||
|
text: '#0f172a',
|
||||||
|
'text-muted': '#475569',
|
||||||
|
accent: '#10b981',
|
||||||
|
'accent-dark': '#059669',
|
||||||
|
'accent-glow': 'rgba(16, 185, 129, 0.15)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #10b981, #06b6d4)',
|
||||||
|
'header-bg': 'rgba(255, 255, 255, 0.95)',
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
bg: '#0c0f14',
|
||||||
|
'bg-elevated': '#12161e',
|
||||||
|
'sidebar-bg': '#10141b',
|
||||||
|
'card-bg': 'rgba(18, 22, 30, 0.85)',
|
||||||
|
'input-bg': 'rgba(255, 255, 255, 0.04)',
|
||||||
|
'hover-bg': 'rgba(255, 255, 255, 0.06)',
|
||||||
|
border: 'rgba(255, 255, 255, 0.08)',
|
||||||
|
text: '#e8ecf4',
|
||||||
|
'text-muted': '#7b8498',
|
||||||
|
accent: '#10b981',
|
||||||
|
'accent-dark': '#059669',
|
||||||
|
'accent-glow': 'rgba(16, 185, 129, 0.15)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #10b981, #06b6d4)',
|
||||||
|
'header-bg': 'rgba(12, 15, 20, 0.85)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
slug: 'emerald',
|
||||||
|
label: 'Emerald',
|
||||||
|
light: {
|
||||||
|
'bg': '#f6fbf9',
|
||||||
|
'bg-elevated': '#ffffff',
|
||||||
|
'sidebar-bg': '#ffffff',
|
||||||
|
'card-bg': '#ffffff',
|
||||||
|
'input-bg': '#ecf7f1',
|
||||||
|
'hover-bg': '#d5f0df',
|
||||||
|
'border': 'rgba(4, 120, 87, 0.25)',
|
||||||
|
'text': '#0b2c1f',
|
||||||
|
'text-muted': '#4a6b5c',
|
||||||
|
'accent': '#047857',
|
||||||
|
'accent-dark': '#065f46',
|
||||||
|
'accent-glow': 'rgba(4, 120, 87, 0.2)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #047857, #0ea5e9)',
|
||||||
|
'header-bg': 'rgba(255, 255, 255, 0.95)',
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
'bg': '#0b1313',
|
||||||
|
'bg-elevated': 'rgba(4, 20, 15, 0.85)',
|
||||||
|
'sidebar-bg': '#08110f',
|
||||||
|
'card-bg': 'rgba(6, 19, 13, 0.75)',
|
||||||
|
'input-bg': 'rgba(16, 185, 129, 0.08)',
|
||||||
|
'hover-bg': 'rgba(16, 185, 129, 0.12)',
|
||||||
|
'border': 'rgba(16, 185, 129, 0.35)',
|
||||||
|
'text': '#e9fcea',
|
||||||
|
'text-muted': '#9fdac4',
|
||||||
|
'accent': '#10b981',
|
||||||
|
'accent-dark': '#059669',
|
||||||
|
'accent-glow': 'rgba(16, 185, 129, 0.25)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #10b981, #0ea5e9)',
|
||||||
|
'header-bg': 'rgba(12, 15, 20, 0.85)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
slug: 'sunset',
|
||||||
|
label: 'Sunset',
|
||||||
|
light: {
|
||||||
|
'bg': '#fff8f2',
|
||||||
|
'bg-elevated': '#ffffff',
|
||||||
|
'sidebar-bg': '#ffffff',
|
||||||
|
'card-bg': '#fff4ef',
|
||||||
|
'input-bg': '#ffe3d8',
|
||||||
|
'hover-bg': '#ffd3bf',
|
||||||
|
'border': 'rgba(249, 115, 22, 0.25)',
|
||||||
|
'text': '#3d1b0b',
|
||||||
|
'text-muted': '#7a4a37',
|
||||||
|
'accent': '#f97316',
|
||||||
|
'accent-dark': '#c2410c',
|
||||||
|
'accent-glow': 'rgba(249, 115, 22, 0.25)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #f97316, #ec4899)',
|
||||||
|
'header-bg': 'rgba(255, 255, 255, 0.96)',
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
'bg': '#0f0505',
|
||||||
|
'bg-elevated': 'rgba(15, 5, 5, 0.85)',
|
||||||
|
'sidebar-bg': '#0c0404',
|
||||||
|
'card-bg': 'rgba(19, 6, 6, 0.7)',
|
||||||
|
'input-bg': 'rgba(251, 113, 133, 0.08)',
|
||||||
|
'hover-bg': 'rgba(251, 113, 133, 0.14)',
|
||||||
|
'border': 'rgba(251, 113, 133, 0.35)',
|
||||||
|
'text': '#ffe7e0',
|
||||||
|
'text-muted': '#f9a6aa',
|
||||||
|
'accent': '#fb7185',
|
||||||
|
'accent-dark': '#be123c',
|
||||||
|
'accent-glow': 'rgba(251, 113, 133, 0.25)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #fb7185, #f97316)',
|
||||||
|
'header-bg': 'rgba(12, 8, 6, 0.85)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
slug: 'ocean',
|
||||||
|
label: 'Ocean',
|
||||||
|
light: {
|
||||||
|
'bg': '#f4fbff',
|
||||||
|
'bg-elevated': '#ffffff',
|
||||||
|
'sidebar-bg': '#ffffff',
|
||||||
|
'card-bg': '#f0f7ff',
|
||||||
|
'input-bg': '#dcefff',
|
||||||
|
'hover-bg': '#cae8ff',
|
||||||
|
'border': 'rgba(14, 165, 233, 0.25)',
|
||||||
|
'text': '#06274e',
|
||||||
|
'text-muted': '#4d6993',
|
||||||
|
'accent': '#0ea5e9',
|
||||||
|
'accent-dark': '#0369a1',
|
||||||
|
'accent-glow': 'rgba(14, 165, 233, 0.25)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #0ea5e9, #4753ff)',
|
||||||
|
'header-bg': 'rgba(255, 255, 255, 0.95)',
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
'bg': '#030b12',
|
||||||
|
'bg-elevated': 'rgba(2, 9, 20, 0.85)',
|
||||||
|
'sidebar-bg': '#050c16',
|
||||||
|
'card-bg': 'rgba(3, 13, 26, 0.75)',
|
||||||
|
'input-bg': 'rgba(14, 165, 233, 0.08)',
|
||||||
|
'hover-bg': 'rgba(14, 165, 233, 0.15)',
|
||||||
|
'border': 'rgba(14, 165, 233, 0.4)',
|
||||||
|
'text': '#e6f6ff',
|
||||||
|
'text-muted': '#a1c4e8',
|
||||||
|
'accent': '#38bdf8',
|
||||||
|
'accent-dark': '#0369a1',
|
||||||
|
'accent-glow': 'rgba(14, 165, 233, 0.35)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #38bdf8, #0f172a)',
|
||||||
|
'header-bg': 'rgba(6, 15, 30, 0.85)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
slug: 'orchid',
|
||||||
|
label: 'Orchid',
|
||||||
|
light: {
|
||||||
|
'bg': '#fdf6ff',
|
||||||
|
'bg-elevated': '#ffffff',
|
||||||
|
'sidebar-bg': '#ffffff',
|
||||||
|
'card-bg': '#fdf2ff',
|
||||||
|
'input-bg': '#f5e4ff',
|
||||||
|
'hover-bg': '#e9d4ff',
|
||||||
|
'border': 'rgba(168, 85, 247, 0.25)',
|
||||||
|
'text': '#2c0a3a',
|
||||||
|
'text-muted': '#6a5277',
|
||||||
|
'accent': '#a855f7',
|
||||||
|
'accent-dark': '#6d28d9',
|
||||||
|
'accent-glow': 'rgba(168, 85, 247, 0.25)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #c084fc, #a855f7)',
|
||||||
|
'header-bg': 'rgba(255, 255, 255, 0.97)',
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
'bg': '#0c0215',
|
||||||
|
'bg-elevated': 'rgba(10, 3, 30, 0.85)',
|
||||||
|
'sidebar-bg': '#090118',
|
||||||
|
'card-bg': 'rgba(12, 2, 25, 0.75)',
|
||||||
|
'input-bg': 'rgba(168, 85, 247, 0.08)',
|
||||||
|
'hover-bg': 'rgba(168, 85, 247, 0.16)',
|
||||||
|
'border': 'rgba(168, 85, 247, 0.35)',
|
||||||
|
'text': '#f5e6ff',
|
||||||
|
'text-muted': '#c5a3e8',
|
||||||
|
'accent': '#d946ef',
|
||||||
|
'accent-dark': '#831843',
|
||||||
|
'accent-glow': 'rgba(217, 70, 239, 0.25)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #d946ef, #fb7185)',
|
||||||
|
'header-bg': 'rgba(13, 6, 23, 0.95)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
slug: 'citrus',
|
||||||
|
label: 'Citrus',
|
||||||
|
light: {
|
||||||
|
'bg': '#fffdf5',
|
||||||
|
'bg-elevated': '#ffffff',
|
||||||
|
'sidebar-bg': '#ffffff',
|
||||||
|
'card-bg': '#fffaf0',
|
||||||
|
'input-bg': '#fff4d8',
|
||||||
|
'hover-bg': '#ffeec1',
|
||||||
|
'border': 'rgba(250, 204, 21, 0.25)',
|
||||||
|
'text': '#1f1505',
|
||||||
|
'text-muted': '#5b4a1e',
|
||||||
|
'accent': '#fbbf24',
|
||||||
|
'accent-dark': '#c2410c',
|
||||||
|
'accent-glow': 'rgba(250, 204, 21, 0.3)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #fbbf24, #d97706)',
|
||||||
|
'header-bg': 'rgba(255, 255, 255, 0.98)',
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
'bg': '#1a1203',
|
||||||
|
'bg-elevated': 'rgba(26, 18, 3, 0.9)',
|
||||||
|
'sidebar-bg': '#130e02',
|
||||||
|
'card-bg': 'rgba(26, 18, 3, 0.75)',
|
||||||
|
'input-bg': 'rgba(250, 204, 21, 0.08)',
|
||||||
|
'hover-bg': 'rgba(250, 204, 21, 0.14)',
|
||||||
|
'border': 'rgba(250, 204, 21, 0.35)',
|
||||||
|
'text': '#fff8e7',
|
||||||
|
'text-muted': '#f6dea1',
|
||||||
|
'accent': '#fbbf24',
|
||||||
|
'accent-dark': '#b45309',
|
||||||
|
'accent-glow': 'rgba(250, 204, 21, 0.25)',
|
||||||
|
'accent-gradient': 'linear-gradient(135deg, #fbbf24, #f97316)',
|
||||||
|
'header-bg': 'rgba(15, 9, 2, 0.9)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -7,251 +7,8 @@
|
|||||||
import '../app.css';
|
import '../app.css';
|
||||||
import Sidebar from '$lib/components/Sidebar.svelte';
|
import Sidebar from '$lib/components/Sidebar.svelte';
|
||||||
import SearchBar from '$lib/components/SearchBar.svelte';
|
import SearchBar from '$lib/components/SearchBar.svelte';
|
||||||
|
import { palettes, type ThemeMode, type Palette } from '$lib/palettes';
|
||||||
|
|
||||||
type ThemeMode = 'light' | 'dark';
|
|
||||||
type PaletteVar =
|
|
||||||
| 'bg'
|
|
||||||
| 'bg-elevated'
|
|
||||||
| 'sidebar-bg'
|
|
||||||
| 'card-bg'
|
|
||||||
| 'input-bg'
|
|
||||||
| 'hover-bg'
|
|
||||||
| 'border'
|
|
||||||
| 'text'
|
|
||||||
| 'text-muted'
|
|
||||||
| 'accent'
|
|
||||||
| 'accent-dark'
|
|
||||||
| 'accent-glow'
|
|
||||||
| 'accent-gradient'
|
|
||||||
| 'header-bg';
|
|
||||||
|
|
||||||
type PaletteTheme = Record<PaletteVar, string>;
|
|
||||||
|
|
||||||
type Palette = {
|
|
||||||
slug: string;
|
|
||||||
label: string;
|
|
||||||
light: PaletteTheme;
|
|
||||||
dark: PaletteTheme;
|
|
||||||
};
|
|
||||||
|
|
||||||
const palettes: Palette[] = [
|
|
||||||
{
|
|
||||||
slug: 'classic',
|
|
||||||
label: 'Classic',
|
|
||||||
light: {
|
|
||||||
bg: '#f8fafc',
|
|
||||||
'bg-elevated': '#ffffff',
|
|
||||||
'sidebar-bg': '#ffffff',
|
|
||||||
'card-bg': '#ffffff',
|
|
||||||
'input-bg': 'rgba(15, 23, 42, 0.04)',
|
|
||||||
'hover-bg': 'rgba(15, 23, 42, 0.08)',
|
|
||||||
border: 'rgba(15, 23, 42, 0.12)',
|
|
||||||
text: '#0f172a',
|
|
||||||
'text-muted': '#475569',
|
|
||||||
accent: '#10b981',
|
|
||||||
'accent-dark': '#059669',
|
|
||||||
'accent-glow': 'rgba(16, 185, 129, 0.15)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #10b981, #06b6d4)',
|
|
||||||
'header-bg': 'rgba(255, 255, 255, 0.95)',
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
bg: '#0c0f14',
|
|
||||||
'bg-elevated': '#12161e',
|
|
||||||
'sidebar-bg': '#10141b',
|
|
||||||
'card-bg': 'rgba(18, 22, 30, 0.85)',
|
|
||||||
'input-bg': 'rgba(255, 255, 255, 0.04)',
|
|
||||||
'hover-bg': 'rgba(255, 255, 255, 0.06)',
|
|
||||||
border: 'rgba(255, 255, 255, 0.08)',
|
|
||||||
text: '#e8ecf4',
|
|
||||||
'text-muted': '#7b8498',
|
|
||||||
accent: '#10b981',
|
|
||||||
'accent-dark': '#059669',
|
|
||||||
'accent-glow': 'rgba(16, 185, 129, 0.15)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #10b981, #06b6d4)',
|
|
||||||
'header-bg': 'rgba(12, 15, 20, 0.85)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
slug: 'emerald',
|
|
||||||
label: 'Emerald',
|
|
||||||
light: {
|
|
||||||
'bg': '#f6fbf9',
|
|
||||||
'bg-elevated': '#ffffff',
|
|
||||||
'sidebar-bg': '#ffffff',
|
|
||||||
'card-bg': '#ffffff',
|
|
||||||
'input-bg': '#ecf7f1',
|
|
||||||
'hover-bg': '#d5f0df',
|
|
||||||
'border': 'rgba(4, 120, 87, 0.25)',
|
|
||||||
'text': '#0b2c1f',
|
|
||||||
'text-muted': '#4a6b5c',
|
|
||||||
'accent': '#047857',
|
|
||||||
'accent-dark': '#065f46',
|
|
||||||
'accent-glow': 'rgba(4, 120, 87, 0.2)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #047857, #0ea5e9)',
|
|
||||||
'header-bg': 'rgba(255, 255, 255, 0.95)',
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
'bg': '#0b1313',
|
|
||||||
'bg-elevated': 'rgba(4, 20, 15, 0.85)',
|
|
||||||
'sidebar-bg': '#08110f',
|
|
||||||
'card-bg': 'rgba(6, 19, 13, 0.75)',
|
|
||||||
'input-bg': 'rgba(16, 185, 129, 0.08)',
|
|
||||||
'hover-bg': 'rgba(16, 185, 129, 0.12)',
|
|
||||||
'border': 'rgba(16, 185, 129, 0.35)',
|
|
||||||
'text': '#e9fcea',
|
|
||||||
'text-muted': '#9fdac4',
|
|
||||||
'accent': '#10b981',
|
|
||||||
'accent-dark': '#059669',
|
|
||||||
'accent-glow': 'rgba(16, 185, 129, 0.25)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #10b981, #0ea5e9)',
|
|
||||||
'header-bg': 'rgba(12, 15, 20, 0.85)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
slug: 'sunset',
|
|
||||||
label: 'Sunset',
|
|
||||||
light: {
|
|
||||||
'bg': '#fff8f2',
|
|
||||||
'bg-elevated': '#ffffff',
|
|
||||||
'sidebar-bg': '#ffffff',
|
|
||||||
'card-bg': '#fff4ef',
|
|
||||||
'input-bg': '#ffe3d8',
|
|
||||||
'hover-bg': '#ffd3bf',
|
|
||||||
'border': 'rgba(249, 115, 22, 0.25)',
|
|
||||||
'text': '#3d1b0b',
|
|
||||||
'text-muted': '#7a4a37',
|
|
||||||
'accent': '#f97316',
|
|
||||||
'accent-dark': '#c2410c',
|
|
||||||
'accent-glow': 'rgba(249, 115, 22, 0.25)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #f97316, #ec4899)',
|
|
||||||
'header-bg': 'rgba(255, 255, 255, 0.96)',
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
'bg': '#0f0505',
|
|
||||||
'bg-elevated': 'rgba(15, 5, 5, 0.85)',
|
|
||||||
'sidebar-bg': '#0c0404',
|
|
||||||
'card-bg': 'rgba(19, 6, 6, 0.7)',
|
|
||||||
'input-bg': 'rgba(251, 113, 133, 0.08)',
|
|
||||||
'hover-bg': 'rgba(251, 113, 133, 0.14)',
|
|
||||||
'border': 'rgba(251, 113, 133, 0.35)',
|
|
||||||
'text': '#ffe7e0',
|
|
||||||
'text-muted': '#f9a6aa',
|
|
||||||
'accent': '#fb7185',
|
|
||||||
'accent-dark': '#be123c',
|
|
||||||
'accent-glow': 'rgba(251, 113, 133, 0.25)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #fb7185, #f97316)',
|
|
||||||
'header-bg': 'rgba(12, 8, 6, 0.85)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
slug: 'ocean',
|
|
||||||
label: 'Ocean',
|
|
||||||
light: {
|
|
||||||
'bg': '#f4fbff',
|
|
||||||
'bg-elevated': '#ffffff',
|
|
||||||
'sidebar-bg': '#ffffff',
|
|
||||||
'card-bg': '#f0f7ff',
|
|
||||||
'input-bg': '#dcefff',
|
|
||||||
'hover-bg': '#cae8ff',
|
|
||||||
'border': 'rgba(14, 165, 233, 0.25)',
|
|
||||||
'text': '#06274e',
|
|
||||||
'text-muted': '#4d6993',
|
|
||||||
'accent': '#0ea5e9',
|
|
||||||
'accent-dark': '#0369a1',
|
|
||||||
'accent-glow': 'rgba(14, 165, 233, 0.25)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #0ea5e9, #4753ff)',
|
|
||||||
'header-bg': 'rgba(255, 255, 255, 0.95)',
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
'bg': '#030b12',
|
|
||||||
'bg-elevated': 'rgba(2, 9, 20, 0.85)',
|
|
||||||
'sidebar-bg': '#050c16',
|
|
||||||
'card-bg': 'rgba(3, 13, 26, 0.75)',
|
|
||||||
'input-bg': 'rgba(14, 165, 233, 0.08)',
|
|
||||||
'hover-bg': 'rgba(14, 165, 233, 0.15)',
|
|
||||||
'border': 'rgba(14, 165, 233, 0.4)',
|
|
||||||
'text': '#e6f6ff',
|
|
||||||
'text-muted': '#a1c4e8',
|
|
||||||
'accent': '#38bdf8',
|
|
||||||
'accent-dark': '#0369a1',
|
|
||||||
'accent-glow': 'rgba(14, 165, 233, 0.35)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #38bdf8, #0f172a)',
|
|
||||||
'header-bg': 'rgba(6, 15, 30, 0.85)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
slug: 'orchid',
|
|
||||||
label: 'Orchid',
|
|
||||||
light: {
|
|
||||||
'bg': '#fdf6ff',
|
|
||||||
'bg-elevated': '#ffffff',
|
|
||||||
'sidebar-bg': '#ffffff',
|
|
||||||
'card-bg': '#fdf2ff',
|
|
||||||
'input-bg': '#f5e4ff',
|
|
||||||
'hover-bg': '#e9d4ff',
|
|
||||||
'border': 'rgba(168, 85, 247, 0.25)',
|
|
||||||
'text': '#2c0a3a',
|
|
||||||
'text-muted': '#6a5277',
|
|
||||||
'accent': '#a855f7',
|
|
||||||
'accent-dark': '#6d28d9',
|
|
||||||
'accent-glow': 'rgba(168, 85, 247, 0.25)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #c084fc, #a855f7)',
|
|
||||||
'header-bg': 'rgba(255, 255, 255, 0.97)',
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
'bg': '#0c0215',
|
|
||||||
'bg-elevated': 'rgba(10, 3, 30, 0.85)',
|
|
||||||
'sidebar-bg': '#090118',
|
|
||||||
'card-bg': 'rgba(12, 2, 25, 0.75)',
|
|
||||||
'input-bg': 'rgba(168, 85, 247, 0.08)',
|
|
||||||
'hover-bg': 'rgba(168, 85, 247, 0.16)',
|
|
||||||
'border': 'rgba(168, 85, 247, 0.35)',
|
|
||||||
'text': '#f5e6ff',
|
|
||||||
'text-muted': '#c5a3e8',
|
|
||||||
'accent': '#d946ef',
|
|
||||||
'accent-dark': '#831843',
|
|
||||||
'accent-glow': 'rgba(217, 70, 239, 0.25)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #d946ef, #fb7185)',
|
|
||||||
'header-bg': 'rgba(13, 6, 23, 0.95)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
slug: 'citrus',
|
|
||||||
label: 'Citrus',
|
|
||||||
light: {
|
|
||||||
'bg': '#fffdf5',
|
|
||||||
'bg-elevated': '#ffffff',
|
|
||||||
'sidebar-bg': '#ffffff',
|
|
||||||
'card-bg': '#fffaf0',
|
|
||||||
'input-bg': '#fff4d8',
|
|
||||||
'hover-bg': '#ffeec1',
|
|
||||||
'border': 'rgba(250, 204, 21, 0.25)',
|
|
||||||
'text': '#1f1505',
|
|
||||||
'text-muted': '#5b4a1e',
|
|
||||||
'accent': '#fbbf24',
|
|
||||||
'accent-dark': '#c2410c',
|
|
||||||
'accent-glow': 'rgba(250, 204, 21, 0.3)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #fbbf24, #d97706)',
|
|
||||||
'header-bg': 'rgba(255, 255, 255, 0.98)',
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
'bg': '#1a1203',
|
|
||||||
'bg-elevated': 'rgba(26, 18, 3, 0.9)',
|
|
||||||
'sidebar-bg': '#130e02',
|
|
||||||
'card-bg': 'rgba(26, 18, 3, 0.75)',
|
|
||||||
'input-bg': 'rgba(250, 204, 21, 0.08)',
|
|
||||||
'hover-bg': 'rgba(250, 204, 21, 0.14)',
|
|
||||||
'border': 'rgba(250, 204, 21, 0.35)',
|
|
||||||
'text': '#fff8e7',
|
|
||||||
'text-muted': '#f6dea1',
|
|
||||||
'accent': '#fbbf24',
|
|
||||||
'accent-dark': '#b45309',
|
|
||||||
'accent-glow': 'rgba(250, 204, 21, 0.25)',
|
|
||||||
'accent-gradient': 'linear-gradient(135deg, #fbbf24, #f97316)',
|
|
||||||
'header-bg': 'rgba(15, 9, 2, 0.9)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
const matomoContainerSrc = 'https://matomo.howdoyouconvert.com/js/container_B3r877Kn.js';
|
const matomoContainerSrc = 'https://matomo.howdoyouconvert.com/js/container_B3r877Kn.js';
|
||||||
|
|
||||||
type WindowWithAnalytics = Window & {
|
type WindowWithAnalytics = Window & {
|
||||||
|
|||||||
Reference in New Issue
Block a user