Feature/website overhaul (#49)
* Reorganize repo * Overhaul website design and rewrite in NextJS and Typescript * Delete website-publish.yml
This commit is contained in:
committed by
GitHub
parent
3674ee5bd8
commit
421ecf17e6
72
website/src/styles/theme.ts
Normal file
72
website/src/styles/theme.ts
Normal file
@ -0,0 +1,72 @@
|
||||
import darkScrollbar from '@mui/material/darkScrollbar';
|
||||
import { createTheme } from '@mui/material/styles';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
import type { PaletteMode, ThemeOptions } from '@mui/material';
|
||||
|
||||
const commonThemeProps: ThemeOptions = {};
|
||||
|
||||
const useCreateTheme = (mode: PaletteMode) => {
|
||||
return useMemo(
|
||||
() =>
|
||||
mode === 'light'
|
||||
? createTheme({
|
||||
...commonThemeProps,
|
||||
palette: {
|
||||
mode,
|
||||
primary: {
|
||||
main: '#3764be',
|
||||
},
|
||||
secondary: {
|
||||
main: '#3764be',
|
||||
},
|
||||
background: {
|
||||
default: '#f9f9f9',
|
||||
paper: '#f9f9f9',
|
||||
},
|
||||
},
|
||||
typography: {
|
||||
fontFamily:
|
||||
"'Roboto', -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif",
|
||||
h1: {
|
||||
fontSize: '42px',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
},
|
||||
})
|
||||
: createTheme({
|
||||
...commonThemeProps,
|
||||
components: {
|
||||
MuiCssBaseline: {
|
||||
styleOverrides: {
|
||||
body: darkScrollbar(),
|
||||
},
|
||||
},
|
||||
},
|
||||
palette: {
|
||||
mode,
|
||||
primary: {
|
||||
main: '#3A69C7',
|
||||
},
|
||||
secondary: {
|
||||
main: '#5ecffb',
|
||||
},
|
||||
background: {
|
||||
default: '#2e3034',
|
||||
paper: '#2e3034',
|
||||
},
|
||||
},
|
||||
typography: {
|
||||
fontFamily:
|
||||
"'Roboto', -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif",
|
||||
h1: {
|
||||
fontSize: '42px',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
},
|
||||
}),
|
||||
[mode],
|
||||
);
|
||||
};
|
||||
|
||||
export default useCreateTheme;
|
Reference in New Issue
Block a user