File size: 1,753 Bytes
1e179ea
2ee65f4
1e179ea
2ee65f4
c1b5f7a
2ee65f4
3b8892c
1e179ea
 
2ee65f4
1e179ea
 
 
 
 
 
3b8892c
1e179ea
 
 
 
 
 
 
 
 
 
3b8892c
c1b5f7a
1e179ea
2ee65f4
3b8892c
2ee65f4
 
 
1e179ea
3b8892c
 
 
 
 
2ee65f4
 
 
 
 
 
 
 
c1b5f7a
2ee65f4
 
 
 
 
1e179ea
 
 
 
3b8892c
 
 
1e179ea
 
 
3b8892c
1e179ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
 * Theme System
 *
 * Supports three templates: neobrutalism, galeryn, and noisy.
 * User-facing labels are Neo-Brutal, Galeryn, and Distortion.
 * Layout-specific styling is handled by the template config in data/templates/.
 * This file exists for backward compatibility with components that reference ThemeName.
 */

export type ThemeName = 'neobrutalism' | 'galeryn' | 'noisy';

export interface ThemeStyle {
  background: string;
  textColor: string;
  accentColor?: string;
  secondaryAccent?: string;
  overlay?: string;
}

export interface Theme {
  name: ThemeName;
  displayName: string;
  default: ThemeStyle;
}

export const themes: Theme[] = [
  {
    name: 'neobrutalism',
    displayName: 'Neo-Brutal',
    default: {
      background: 'bg-[#F5F5F0]',
      textColor: 'text-black',
      accentColor: 'bg-[#D9FF00]',
      secondaryAccent: 'bg-[#00FFFF]',
      overlay: 'radial-gradient(circle, #000 1px, transparent 1px) 0 0 / 24px 24px',
    },
  },
  {
    name: 'galeryn',
    displayName: 'Galeryn',
    default: {
      background: 'bg-[#fbf9f4]',
      textColor: 'text-[#021d30]',
      accentColor: 'bg-[#021d30]',
      secondaryAccent: 'bg-[#d4e8d4]',
    },
  },
  {
    name: 'noisy',
    displayName: 'Distortion',
    default: {
      background: 'bg-[#547BEE]',
      textColor: 'text-white',
      accentColor: 'bg-[#FF7A59]',
      secondaryAccent: 'bg-[#F2725C]',
    },
  },
];

export function getThemeStyle(themeName: ThemeName): ThemeStyle {
  const theme = themes.find((t) => t.name === themeName);
  return theme?.default ?? themes[0].default;
}

export function getAllThemes(): Array<{ name: ThemeName; displayName: string }> {
  return themes.map((t) => ({ name: t.name, displayName: t.displayName }));
}