@@ -7,8 +7,8 @@ const themeColors = {
77 hard : '#ff2d55' ,
88 } ,
99 light : {
10- secondary : colors . zinc [ '900' ] ,
11- tertiary : colors . zinc [ '50' ] ,
10+ secondary : colors . gray [ '900' ] ,
11+ tertiary : colors . gray [ '50' ] ,
1212 } ,
1313 dark : {
1414 secondary : colors . zinc [ '100' ] ,
@@ -25,6 +25,15 @@ const darkTheme = ({ primary, secondary, tertiary }) => {
2525 'link-hover' : colors . pink [ '500' ] ,
2626 }
2727
28+ const textDifficultyColors = {
29+ easy : baseColors [ 'text-inverted' ] ,
30+ medium : baseColors [ 'text-inverted' ] ,
31+ hard : baseColors [ 'text-inverted' ] ,
32+ 'easy-hover' : themeColors . leetcode . easy ,
33+ 'medium-hover' : themeColors . leetcode . medium ,
34+ 'hard-hover' : themeColors . leetcode . hard ,
35+ }
36+
2837 return {
2938 textColor : {
3039 style : {
@@ -36,7 +45,10 @@ const darkTheme = ({ primary, secondary, tertiary }) => {
3645 'title' : baseColors . text ,
3746 'header-text' : baseColors . text ,
3847 'header-text-hover' : baseColors . fill ,
39- }
48+ } ,
49+ difficulty : {
50+ ...textDifficultyColors ,
51+ } ,
4052 } ,
4153 backgroundColor : {
4254 style : {
@@ -48,6 +60,14 @@ const darkTheme = ({ primary, secondary, tertiary }) => {
4860 'bg' : '#1a1a1a' ,
4961 'header-bg' : '#282828' ,
5062 } ,
63+ difficulty : {
64+ easy : themeColors . leetcode . easy ,
65+ 'easy-hover' : baseColors . text ,
66+ medium : themeColors . leetcode . medium ,
67+ 'medium-hover' : baseColors . text ,
68+ hard : themeColors . leetcode . hard ,
69+ 'hard-hover' : baseColors . text ,
70+ } ,
5171 } ,
5272 borderColor : {
5373 style : {
@@ -57,7 +77,13 @@ const darkTheme = ({ primary, secondary, tertiary }) => {
5777 } ,
5878 site : {
5979 'header-border' : colors . zinc [ '600' ] ,
60- }
80+ } ,
81+ difficulty : {
82+ ...themeColors . leetcode ,
83+ 'easy-hover' : themeColors . leetcode . easy ,
84+ 'medium-hover' : themeColors . leetcode . medium ,
85+ 'hard-hover' : themeColors . leetcode . hard ,
86+ } ,
6187 } ,
6288 }
6389}
@@ -71,6 +97,15 @@ const lightTheme = ({ primary, secondary, tertiary }) => {
7197 'link-hover' : colors . pink [ '500' ] ,
7298 }
7399
100+ const textDifficultyColors = {
101+ easy : baseColors . text ,
102+ medium : baseColors . text ,
103+ hard : baseColors . text ,
104+ 'easy-hover' : themeColors . leetcode . easy ,
105+ 'medium-hover' : themeColors . leetcode . medium ,
106+ 'hard-hover' : themeColors . leetcode . hard ,
107+ }
108+
74109 return {
75110 textColor : {
76111 style : {
@@ -82,7 +117,10 @@ const lightTheme = ({ primary, secondary, tertiary }) => {
82117 'title' : baseColors [ 'text-inverted' ] ,
83118 'header-text' : baseColors [ 'text-inverted' ] ,
84119 'header-text-hover' : colors . gray [ '300' ] ,
85- }
120+ } ,
121+ difficulty : {
122+ ...textDifficultyColors ,
123+ } ,
86124 } ,
87125 backgroundColor : {
88126 style : {
@@ -94,6 +132,14 @@ const lightTheme = ({ primary, secondary, tertiary }) => {
94132 'bg' : colors . white ,
95133 'header-bg' : primary ,
96134 } ,
135+ difficulty : {
136+ easy : themeColors . leetcode . easy ,
137+ 'easy-hover' : baseColors . text ,
138+ medium : themeColors . leetcode . medium ,
139+ 'medium-hover' : baseColors . text ,
140+ hard : themeColors . leetcode . hard ,
141+ 'hard-hover' : baseColors . text ,
142+ } ,
97143 } ,
98144 borderColor : {
99145 style : {
@@ -105,13 +151,19 @@ const lightTheme = ({ primary, secondary, tertiary }) => {
105151 'header-border' : primary ,
106152 }
107153 } ,
154+ difficulty : {
155+ ...themeColors . leetcode ,
156+ 'easy-hover' : themeColors . leetcode . easy ,
157+ 'medium-hover' : themeColors . leetcode . medium ,
158+ 'hard-hover' : themeColors . leetcode . hard ,
159+ } ,
108160 }
109161}
110162
111163const siteTheme = ( { primary, secondary, tertiary } , isDark = true ) =>
112164 isDark
113165 ? darkTheme ( { primary, secondary, tertiary } )
114- : lightTheme ( darkTheme ( { primary, secondary, tertiary } ) )
166+ : lightTheme ( { primary, secondary, tertiary } )
115167
116168module . exports = {
117169 defaultTheme : {
@@ -129,6 +181,6 @@ module.exports = {
129181 secondary : themeColors . light [ 'secondary' ] ,
130182 tertiary : themeColors . light [ 'tertiary' ] ,
131183 } , false )
132- }
184+ } ,
133185 ]
134186}
0 commit comments