@@ -44,6 +44,50 @@ const colorManager = {
4444 }
4545 } ,
4646
47+ // Nord theme - Arctic, north-bluish color palette
48+ nord : {
49+ light : {
50+ name : 'Nord Light' ,
51+ bg : '#eceff4' ,
52+ fg : '#4c566a' ,
53+ accent : '#5e81ac' ,
54+ border : '#d8dee9' ,
55+ subtle : '#81a1c1' ,
56+ shadow : 'rgba(216, 222, 233, 0.5)'
57+ } ,
58+ dark : {
59+ name : 'Nord Dark' ,
60+ bg : '#2e3440' ,
61+ fg : '#d8dee9' ,
62+ accent : '#88c0d0' ,
63+ border : '#4c566a' ,
64+ subtle : '#81a1c1' ,
65+ shadow : 'rgba(46, 52, 64, 0.5)'
66+ }
67+ } ,
68+
69+ // Solarized - Precision colors for readability
70+ solarized : {
71+ light : {
72+ name : 'Solarized Light' ,
73+ bg : '#fdf6e3' ,
74+ fg : '#657b83' ,
75+ accent : '#268bd2' ,
76+ border : '#93a1a1' ,
77+ subtle : '#586e75' ,
78+ shadow : 'rgba(147, 161, 161, 0.5)'
79+ } ,
80+ dark : {
81+ name : 'Solarized Dark' ,
82+ bg : '#002b36' ,
83+ fg : '#839496' ,
84+ accent : '#2aa198' ,
85+ border : '#073642' ,
86+ subtle : '#586e75' ,
87+ shadow : 'rgba(7, 54, 66, 0.5)'
88+ }
89+ } ,
90+
4791 // Initialize color system
4892 init ( ) {
4993 const savedTheme = localStorage . getItem ( 'notekeeper-theme' ) || 'default' ;
@@ -54,7 +98,7 @@ const colorManager = {
5498 applyTheme ( themeName ) {
5599 let theme ;
56100 let isDarkMode = false ;
57-
101+
58102 // Handle theme selection
59103 if ( themeName === 'default' ) {
60104 // Use original light/dark toggle behavior
@@ -66,18 +110,36 @@ const colorManager = {
66110 const currentVariant = localStorage . getItem ( 'catppuccin-variant' ) || 'latte' ;
67111 theme = this . catppuccin [ currentVariant ] ;
68112 isDarkMode = currentVariant === 'frappe' ;
113+ } else if ( themeName === 'nord' ) {
114+ // Use Nord behavior
115+ const currentVariant = localStorage . getItem ( 'nord-variant' ) || 'light' ;
116+ theme = this . nord [ currentVariant ] ;
117+ isDarkMode = currentVariant === 'dark' ;
118+ } else if ( themeName === 'solarized' ) {
119+ // Use Solarized behavior
120+ const currentVariant = localStorage . getItem ( 'solarized-variant' ) || 'light' ;
121+ theme = this . solarized [ currentVariant ] ;
122+ isDarkMode = currentVariant === 'dark' ;
69123 } else {
70124 // Direct theme selection
71125 if ( themeName . startsWith ( 'catppuccin-' ) ) {
72126 const catppuccinVariant = themeName . replace ( 'catppuccin-' , '' ) ;
73127 theme = this . catppuccin [ catppuccinVariant ] ;
74128 isDarkMode = catppuccinVariant === 'frappe' ;
129+ } else if ( themeName . startsWith ( 'nord-' ) ) {
130+ const nordVariant = themeName . replace ( 'nord-' , '' ) ;
131+ theme = this . nord [ nordVariant ] ;
132+ isDarkMode = nordVariant === 'dark' ;
133+ } else if ( themeName . startsWith ( 'solarized-' ) ) {
134+ const solarizedVariant = themeName . replace ( 'solarized-' , '' ) ;
135+ theme = this . solarized [ solarizedVariant ] ;
136+ isDarkMode = solarizedVariant === 'dark' ;
75137 } else {
76138 theme = this . defaults [ themeName ] ;
77139 isDarkMode = themeName === 'dark' ;
78140 }
79141 }
80-
142+
81143 if ( ! theme ) return ;
82144
83145 // Apply colors to CSS custom properties
@@ -89,10 +151,10 @@ const colorManager = {
89151
90152 // Update theme attribute for existing CSS
91153 document . documentElement . setAttribute ( 'data-theme' , isDarkMode ? 'dark' : 'light' ) ;
92-
154+
93155 // Save preference
94156 localStorage . setItem ( 'notekeeper-theme' , themeName ) ;
95-
157+
96158 // Update theme toggle aria-label
97159 const themeToggle = document . getElementById ( 'theme-toggle' ) ;
98160 if ( themeToggle ) {
@@ -118,6 +180,18 @@ const colorManager = {
118180 const nextVariant = currentVariant === 'latte' ? 'frappe' : 'latte' ;
119181 localStorage . setItem ( 'catppuccin-variant' , nextVariant ) ;
120182 this . applyTheme ( 'catppuccin' ) ;
183+ } else if ( currentTheme === 'nord' ) {
184+ // Toggle light/dark in nord mode
185+ const currentVariant = localStorage . getItem ( 'nord-variant' ) || 'light' ;
186+ const nextVariant = currentVariant === 'light' ? 'dark' : 'light' ;
187+ localStorage . setItem ( 'nord-variant' , nextVariant ) ;
188+ this . applyTheme ( 'nord' ) ;
189+ } else if ( currentTheme === 'solarized' ) {
190+ // Toggle light/dark in solarized mode
191+ const currentVariant = localStorage . getItem ( 'solarized-variant' ) || 'light' ;
192+ const nextVariant = currentVariant === 'light' ? 'dark' : 'light' ;
193+ localStorage . setItem ( 'solarized-variant' , nextVariant ) ;
194+ this . applyTheme ( 'solarized' ) ;
121195 } else {
122196 // Direct theme selection - toggle between default themes
123197 const nextTheme = currentTheme === 'light' ? 'dark' : 'light' ;
@@ -135,6 +209,12 @@ const colorManager = {
135209 } else if ( currentTheme === 'catppuccin' ) {
136210 const currentVariant = localStorage . getItem ( 'catppuccin-variant' ) || 'latte' ;
137211 return currentVariant === 'latte' ? 'frappe' : 'latte' ;
212+ } else if ( currentTheme === 'nord' ) {
213+ const currentVariant = localStorage . getItem ( 'nord-variant' ) || 'light' ;
214+ return currentVariant === 'light' ? 'dark' : 'light' ;
215+ } else if ( currentTheme === 'solarized' ) {
216+ const currentVariant = localStorage . getItem ( 'solarized-variant' ) || 'light' ;
217+ return currentVariant === 'light' ? 'dark' : 'light' ;
138218 }
139219 return currentTheme === 'light' ? 'dark' : 'light' ;
140220 } ,
0 commit comments