fix aug page

This commit is contained in:
Olivier Gagnon
2021-09-21 13:08:05 -04:00
parent ffa9600302
commit 7aa2d00460
7 changed files with 262 additions and 266 deletions
+212 -206
View File
@@ -25,7 +25,7 @@ declare module "@mui/material/styles" {
};
}
}
export const colors = {
export let colors = {
primarylight: "#0f0",
primary: "#0c0",
primarydark: "#090",
@@ -60,235 +60,241 @@ export const colors = {
rep: "#faffdf",
};
export const theme = createTheme({
colors: {
hp: "#dd3434",
money: "#ffd700",
hack: "#adff2f",
combat: "#faffdf",
cha: "#a671d1",
int: "#6495ed",
rep: "#faffdf",
},
palette: {
primary: {
light: colors.primarylight,
main: colors.primary,
dark: colors.primarydark,
export let theme: Theme;
export function refreshTheme() {
theme = createTheme({
colors: {
hp: "#dd3434",
money: "#ffd700",
hack: "#adff2f",
combat: "#faffdf",
cha: "#a671d1",
int: "#6495ed",
rep: "#faffdf",
},
secondary: {
light: colors.secondarylight,
main: colors.secondary,
dark: colors.secondarydark,
palette: {
primary: {
light: colors.primarylight,
main: colors.primary,
dark: colors.primarydark,
},
secondary: {
light: colors.secondarylight,
main: colors.secondary,
dark: colors.secondarydark,
},
error: {
light: colors.errorlight,
main: colors.error,
dark: colors.errordark,
},
info: {
light: colors.infolight,
main: colors.info,
dark: colors.infodark,
},
warning: {
light: colors.warninglight,
main: colors.warning,
dark: colors.warningdark,
},
background: {
default: colors.black,
paper: colors.well,
},
},
error: {
light: colors.errorlight,
main: colors.error,
dark: colors.errordark,
typography: {
fontFamily: "monospace",
button: {
textTransform: "none",
},
},
info: {
light: colors.infolight,
main: colors.info,
dark: colors.infodark,
},
warning: {
light: colors.warninglight,
main: colors.warning,
dark: colors.warningdark,
},
background: {
default: colors.black,
paper: colors.well,
},
},
typography: {
fontFamily: "monospace",
button: {
textTransform: "none",
},
},
components: {
MuiInputBase: {
styleOverrides: {
root: {
backgroundColor: colors.well,
color: colors.primary,
components: {
MuiInputBase: {
styleOverrides: {
root: {
backgroundColor: colors.well,
color: colors.primary,
},
input: {
"&::placeholder": {
userSelect: "none",
color: colors.primarydark,
},
},
},
input: {
"&::placeholder": {
},
MuiInput: {
styleOverrides: {
root: {
backgroundColor: colors.well,
borderBottomColor: "#fff",
},
underline: {
"&:hover": {
borderBottomColor: colors.primarydark,
},
"&:before": {
borderBottomColor: colors.primary,
},
"&:after": {
borderBottomColor: colors.primarylight,
},
},
},
},
MuiInputLabel: {
styleOverrides: {
root: {
color: colors.primarydark, // why is this switched?
userSelect: "none",
color: colors.primarydark,
"&:before": {
color: colors.primarylight,
},
},
},
},
},
MuiButton: {
styleOverrides: {
root: {
backgroundColor: "#333",
border: "1px solid " + colors.well,
// color: colors.primary,
margin: "5px",
padding: "3px 5px",
"&:hover": {
backgroundColor: colors.black,
},
MuiInput: {
styleOverrides: {
root: {
backgroundColor: colors.well,
borderBottomColor: "#fff",
},
underline: {
"&:hover": {
borderBottomColor: colors.primarydark,
},
"&:before": {
borderBottomColor: colors.primary,
},
"&:after": {
borderBottomColor: colors.primarylight,
borderRadius: 0,
},
},
},
},
MuiInputLabel: {
styleOverrides: {
root: {
color: colors.primarydark, // why is this switched?
userSelect: "none",
"&:before": {
color: colors.primarylight,
MuiSelect: {
styleOverrides: {
icon: {
color: colors.primary,
},
},
},
},
MuiButton: {
styleOverrides: {
root: {
backgroundColor: "#333",
border: "1px solid " + colors.well,
// color: colors.primary,
margin: "5px",
padding: "3px 5px",
"&:hover": {
MuiMenu: {
styleOverrides: {
list: {
backgroundColor: colors.well,
},
},
},
MuiMenuItem: {
styleOverrides: {
root: {
color: colors.primary,
},
},
},
MuiAccordionSummary: {
styleOverrides: {
root: {
backgroundColor: "#111",
},
},
},
MuiAccordionDetails: {
styleOverrides: {
root: {
backgroundColor: colors.black,
},
borderRadius: 0,
},
},
},
MuiSelect: {
styleOverrides: {
icon: {
color: colors.primary,
},
},
},
MuiMenu: {
styleOverrides: {
list: {
backgroundColor: colors.well,
},
},
},
MuiMenuItem: {
styleOverrides: {
root: {
color: colors.primary,
},
},
},
MuiAccordionSummary: {
styleOverrides: {
root: {
backgroundColor: "#111",
},
},
},
MuiAccordionDetails: {
styleOverrides: {
root: {
backgroundColor: colors.black,
},
},
},
MuiIconButton: {
styleOverrides: {
root: {
color: colors.primary,
},
},
},
MuiTooltip: {
styleOverrides: {
tooltip: {
fontSize: "1em",
color: colors.primary,
backgroundColor: colors.well,
borderRadius: 0,
border: "2px solid white",
maxWidth: "100vh",
},
},
},
MuiSlider: {
styleOverrides: {
valueLabel: {
color: colors.primary,
backgroundColor: colors.well,
},
},
},
MuiDrawer: {
styleOverrides: {
paper: {
"&::-webkit-scrollbar": {
// webkit
display: "none",
MuiIconButton: {
styleOverrides: {
root: {
color: colors.primary,
},
scrollbarWidth: "none", // firefox
backgroundColor: colors.black,
},
paperAnchorDockedLeft: {
borderRight: "1px solid " + colors.welllight,
},
MuiTooltip: {
styleOverrides: {
tooltip: {
fontSize: "1em",
color: colors.primary,
backgroundColor: colors.well,
borderRadius: 0,
border: "2px solid white",
maxWidth: "100vh",
},
},
},
MuiSlider: {
styleOverrides: {
valueLabel: {
color: colors.primary,
backgroundColor: colors.well,
},
},
},
MuiDrawer: {
styleOverrides: {
paper: {
"&::-webkit-scrollbar": {
// webkit
display: "none",
},
scrollbarWidth: "none", // firefox
backgroundColor: colors.black,
},
paperAnchorDockedLeft: {
borderRight: "1px solid " + colors.welllight,
},
},
},
MuiDivider: {
styleOverrides: {
root: {
backgroundColor: colors.welllight,
},
},
},
MuiFormControlLabel: {
styleOverrides: {
root: {
color: colors.primary,
},
},
},
MuiSwitch: {
styleOverrides: {
switchBase: {
color: colors.primarydark,
},
track: {
backgroundColor: colors.welllight,
},
},
},
MuiPaper: {
styleOverrides: {
root: {
borderRadius: 0,
backgroundColor: colors.black,
border: "1px solid " + colors.welllight,
},
},
},
MuiTablePagination: {
styleOverrides: {
select: {
color: colors.primary,
},
},
},
},
MuiDivider: {
styleOverrides: {
root: {
backgroundColor: colors.welllight,
},
},
},
MuiFormControlLabel: {
styleOverrides: {
root: {
color: colors.primary,
},
},
},
MuiSwitch: {
styleOverrides: {
switchBase: {
color: colors.primarydark,
},
track: {
backgroundColor: colors.welllight,
},
},
},
MuiPaper: {
styleOverrides: {
root: {
borderRadius: 0,
backgroundColor: colors.black,
border: "1px solid " + colors.welllight,
},
},
},
MuiTablePagination: {
styleOverrides: {
select: {
color: colors.primary,
},
},
},
},
});
});
console.log("refreshed");
}
refreshTheme();
interface IProps {
children: JSX.Element[] | JSX.Element;