Refactor code style for consistency and readability

- Updated import statements to use double quotes instead of single quotes across multiple files.
- Reformatted JSX return statements for better alignment and readability.
- Added missing newlines at the end of files where necessary.
- Adjusted component structure for improved clarity in the Landing, Blog, BestPractices, and Projects pages.
- Enhanced error boundary component for better error handling.
- Updated theme overrides for Material-UI components to maintain consistent styling.
This commit is contained in:
Dan Dobos
2025-10-17 17:13:54 +02:00
parent 00324b9667
commit 4aa5040ef5
64 changed files with 20206 additions and 22302 deletions
+75 -78
View File
@@ -1,88 +1,85 @@
import { createTheme, responsiveFontSizes } from '@mui/material/styles';
import { createTheme, responsiveFontSizes } from "@mui/material/styles";
import overrides from './overrides';
import overrides from "./overrides";
import {
AcidGreen,
SeaGreenCrayola,
UARed,
VioletColorWheel,
DavysGray,
Chamoisee,
White,
} from './Colors';
AcidGreen,
SeaGreenCrayola,
UARed,
VioletColorWheel,
DavysGray,
Chamoisee,
White,
} from "./Colors";
// Main layout
export const MainTheme = (mode) => ({
palette: {
mode,
...(mode === 'light'
? {
// palette values for light mode
primary: {
main: Chamoisee,
contrastText: White,
},
secondary: {
main: UARed,
contrastText: White,
},
divider: Chamoisee,
background: {
default: Chamoisee,
paper: Chamoisee,
},
text: {
primary: White,
secondary: White,
},
}
: {
// palette values for dark mode
primary: {
main: DavysGray,
contrastText: AcidGreen,
},
secondary: {
main: UARed,
contrastText: AcidGreen,
},
divider: AcidGreen,
background: {
default: DavysGray,
paper: DavysGray,
},
text: {
primary: AcidGreen,
secondary: AcidGreen,
},
palette: {
mode,
...(mode === "light"
? {
// palette values for light mode
}),
lightAccent: { main: VioletColorWheel },
darkAccent: { main: SeaGreenCrayola },
contrastThreshold: 3,
tonalOffset: 0.2,
},
components: {
...overrides,
},
primary: {
main: Chamoisee,
contrastText: White,
},
secondary: {
main: UARed,
contrastText: White,
},
divider: Chamoisee,
background: {
default: Chamoisee,
paper: Chamoisee,
},
text: {
primary: White,
secondary: White,
},
}
: {
// palette values for dark mode
primary: {
main: DavysGray,
contrastText: AcidGreen,
},
secondary: {
main: UARed,
contrastText: AcidGreen,
},
divider: AcidGreen,
background: {
default: DavysGray,
paper: DavysGray,
},
text: {
primary: AcidGreen,
secondary: AcidGreen,
},
}),
lightAccent: { main: VioletColorWheel },
darkAccent: { main: SeaGreenCrayola },
contrastThreshold: 3,
tonalOffset: 0.2,
},
components: {
...overrides,
},
});
// Landing page
export const LandingWhite = (theme) =>
responsiveFontSizes(
createTheme({
typography: {
fontFamily: 'Yeon Sung',
transform: 'matrix(1, 0, 0, 1, 0, 0)',
},
palette: {
mode: theme.palette.mode,
},
components: {
...overrides,
},
})
);
responsiveFontSizes(
createTheme({
typography: {
fontFamily: "Yeon Sung",
transform: "matrix(1, 0, 0, 1, 0, 0)",
},
palette: {
mode: theme.palette.mode,
},
components: {
...overrides,
},
}),
);