Skip to content

Commit

Permalink
Add purple theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ky28059 committed Dec 15, 2022
1 parent 36c37dd commit f00d770
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
19 changes: 17 additions & 2 deletions client/src/components/layout/ThemeHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {hexToRgb} from '../../util/progressBarColor';


type Colors = { theme: string, accent: string, shadow: string };
export type ColorTheme = { id: 'default' | 'goldenrod', dark: Colors, light: Colors }
export type ColorTheme = { id: 'default' | 'goldenrod' | 'electric-violet', dark: Colors, light: Colors }

export default function ThemeHandler() {
const {colors} = useContext(UserDataContext);
Expand Down Expand Up @@ -39,7 +39,7 @@ export const defaultTheme: ColorTheme = {
}
}

export const goldenRod: ColorTheme = {
export const goldenrod: ColorTheme = {
id: 'goldenrod',
dark: {
theme: '#f59e0b',
Expand All @@ -52,3 +52,18 @@ export const goldenRod: ColorTheme = {
shadow: '#c2410c'
}
}

export const electricViolet: ColorTheme = {
id: 'electric-violet',
dark: {
theme: '#e879f9',
accent: '#9024f5',
shadow: '#6b21a8'
},
// TODO: play around with these and make better
light: {
theme: '#913399',
accent: '#5d30a6',
shadow: '#7e22ce'
}
}
7 changes: 5 additions & 2 deletions client/src/pages/settings/Appearance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import CurrentTimeContext from '../../contexts/CurrentTimeContext';
// Firestore
import {useAuth, useFirestore} from 'reactfire';
import { updateUserData } from '../../util/firestore';
import {ColorTheme, defaultTheme, goldenRod} from '../../components/layout/ThemeHandler';
import {ColorTheme, defaultTheme, goldenrod, electricViolet} from '../../components/layout/ThemeHandler';


export default function Appearance() {
Expand Down Expand Up @@ -47,9 +47,12 @@ export default function Appearance() {
<ColorCard label="Default (red)" value={defaultTheme}>
WATT's classic, red look.
</ColorCard>
<ColorCard label="Goldenrod" value={goldenRod}>
<ColorCard label="Goldenrod" value={goldenrod}>
A golden theme for golden students.
</ColorCard>
<ColorCard label="Electric violet" value={electricViolet}>
High-amp action!
</ColorCard>
</RadioCards>

<RadioCards label="Time Format" value={currTimePref} onChange={changeTime}>
Expand Down

0 comments on commit f00d770

Please sign in to comment.