Skip to content

Commit cb08439

Browse files
committed
feat(theme): update theme colors
1 parent bcf6339 commit cb08439

File tree

2 files changed

+61
-5
lines changed

2 files changed

+61
-5
lines changed

tailwind.config.cjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ const typography = require('@tailwindcss/typography')
66
module.exports = {
77
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
88
theme: {
9-
extend: {},
9+
extend: {
10+
colors: {
11+
transparent: 'transparent',
12+
}
13+
},
1014
},
1115
plugins: [
1216
tailwindCssTheme(themeConfig),

theme.config.cjs

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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,6 +151,12 @@ 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

@@ -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

Comments
 (0)