Updated default font and some small styling changes

This commit is contained in:
Daniel Cojocea committed 2024-08-01 20:12:30 -04:00
1 parent 5be6d1653e
commit 30b7856c44
15 files changed
+63 -39

No files matched your search

+2 -1
View File
@@ -35,7 +35,8 @@ const Avatar = ({ src, small, sx }) => {
src ? src : user?.avatarImage ? image : "/static/images/avatar/2.jpg" src ? src : user?.avatarImage ? image : "/static/images/avatar/2.jpg"
} }
sx={{ sx={{
fontSize: small ? "13px" : "20px", fontSize: small ? "13px" : "22px",
fontWeight: 400,
display: "inline-flex", display: "inline-flex",
"&::before": { "&::before": {
content: `""`, content: `""`,
+6 -2
View File
@@ -85,7 +85,11 @@
.MuiPaper-root + .MuiPagination-root ul { .MuiPaper-root + .MuiPagination-root ul {
justify-content: center; justify-content: center;
} }
.MuiPaper-root + .MuiPagination-root ul li button { .MuiPaper-root
+ .MuiPagination-root
ul
li:not(:first-child):not(:last-child)
button {
font-size: var(--env-var-font-size-medium); font-size: var(--env-var-font-size-medium);
color: var(--env-var-color-5); color: var(--env-var-color-5);
font-weight: 500; font-weight: 500;
@@ -123,6 +127,6 @@
.MuiPaper-root + .MuiPagination-root .MuiPaginationItem-root.Mui-selected { .MuiPaper-root + .MuiPagination-root .MuiPaginationItem-root.Mui-selected {
background-color: var(--env-var-color-15); background-color: var(--env-var-color-15);
} }
.MuiPaper-root + .MuiPagination-root div.MuiPaginationItem-root{ .MuiPaper-root + .MuiPagination-root div.MuiPaginationItem-root {
user-select: none; user-select: none;
} }
+2 -1
View File
@@ -72,7 +72,8 @@ const Button = ({
onClick={onClick} onClick={onClick}
disableRipple disableRipple
sx={{ sx={{
lineHeight: 1, lineHeight: 1.5,
fontWeight: 400,
boxShadow: "none", boxShadow: "none",
textTransform: "none", textTransform: "none",
"&:focus": { "&:focus": {
@@ -1,7 +1,6 @@
import React from "react"; import React from "react";
import "./serverStatus.css"; import "./serverStatus.css";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { useTheme } from "@mui/material";
/** /**
* @component * @component
@@ -12,16 +11,8 @@ import { useTheme } from "@mui/material";
* @returns {JSX.Element} - Renders the server status component * @returns {JSX.Element} - Renders the server status component
*/ */
const ServerStatus = ({ title, value, state }) => { const ServerStatus = ({ title, value, state }) => {
const theme = useTheme();
const fontLookup = {
default: theme.font.default.font,
};
const fontFamily = fontLookup["default"];
return ( return (
<div className="server-status-tile" style={{ fontFamily: fontFamily }}> <div className="server-status-tile">
<div className="server-status-tile-title">{title}</div> <div className="server-status-tile-title">{title}</div>
<div className={`server-status-tile-value ` + " " + state}>{value}</div> <div className={`server-status-tile-value ` + " " + state}>{value}</div>
</div> </div>
@@ -24,6 +24,7 @@
.field h3.MuiTypography-root span.field-optional { .field h3.MuiTypography-root span.field-optional {
opacity: 0.6; opacity: 0.6;
margin-left: 4px; margin-left: 4px;
font-weight: 400;
} }
.field h5.MuiTypography-root { .field h5.MuiTypography-root {
position: relative; position: relative;
@@ -15,6 +15,9 @@
font-size: var(--env-var-font-size-medium); font-size: var(--env-var-font-size-medium);
color: var(--env-var-color-5); color: var(--env-var-color-5);
} }
.select-wrapper h3.MuiTypography-root{
font-weight: 500;
}
.MuiInputBase-root:has(> .MuiSelect-select) fieldset { .MuiInputBase-root:has(> .MuiSelect-select) fieldset {
border-color: var(--env-var-color-29); border-color: var(--env-var-color-29);
} }
+1 -2
View File
@@ -31,7 +31,7 @@
.account .MuiButtonGroup-root button { .account .MuiButtonGroup-root button {
border-color: var(--env-var-color-16); border-color: var(--env-var-color-16);
} }
.account button{ .account button:not(.MuiIconButton-root) {
height: 34px; height: 34px;
} }
.account [class$="-form"] { .account [class$="-form"] {
@@ -70,7 +70,6 @@
align-items: center; align-items: center;
} }
/* for testing, will remove later */ /* for testing, will remove later */
@media only screen and (max-width: 1600px) { @media only screen and (max-width: 1600px) {
.edit-profile-form__wrapper .MuiStack-root:not(.row-stack), .edit-profile-form__wrapper .MuiStack-root:not(.row-stack),
+3 -6
View File
@@ -51,15 +51,12 @@ const Account = ({ open = "profile" }) => {
minWidth: "fit-content", minWidth: "fit-content",
minHeight: 0, minHeight: 0,
paddingLeft: "0", paddingLeft: "0",
paddingY: "10px", paddingY: theme.gap.small,
marginRight: "20px", fontWeight: 400,
marginRight: theme.gap.ml,
"&:focus": { "&:focus": {
outline: "none", outline: "none",
}, },
"& .MuiTouchRipple-root": {
pointerEvents: "none",
display: "none",
},
}} }}
/> />
))} ))}
+4 -4
View File
@@ -158,9 +158,9 @@ const Login = () => {
} }
label="Remember me" label="Remember me"
/> />
<span onClick={() => navigate("/forgot-password")}> <Typography component="span" onClick={() => navigate("/forgot-password")}>
Forgot password Forgot password
</span> </Typography>
</Stack> </Stack>
</Stack> </Stack>
<Stack gap={theme.gap.ml} mt={theme.gap.large}> <Stack gap={theme.gap.ml} mt={theme.gap.large}>
@@ -179,13 +179,13 @@ const Login = () => {
<Typography component="p" sx={{ alignSelf: "center" }}> <Typography component="p" sx={{ alignSelf: "center" }}>
Don't have an account? Don't have an account?
</Typography> </Typography>
<span <Typography component="span"
onClick={() => { onClick={() => {
navigate("/register"); navigate("/register");
}} }}
> >
Sign up Sign up
</span> </Typography>
</Stack> </Stack>
</Stack> </Stack>
</form> </form>
+1 -1
View File
@@ -103,7 +103,7 @@
/* ///// */ /* ///// */
.login-page .login-page
.MuiStack-root:not(:has(> .MuiButtonBase-root)) .MuiStack-root:not(:has(> .MuiButtonBase-root))
span:not(.MuiTypography-root):not(.field-required) { > span:not(.field-required):not(.input-error) {
color: var(--env-var-color-3); color: var(--env-var-color-3);
cursor: pointer; cursor: pointer;
font-weight: 600; font-weight: 600;
+10 -2
View File
@@ -22,7 +22,9 @@ import "./index.css";
const StatBox = ({ title, value }) => { const StatBox = ({ title, value }) => {
return ( return (
<Box className="stat-box"> <Box className="stat-box">
<Typography variant="h6">{title}</Typography> <Typography variant="h6" sx={{ fontWeight: 400 }}>
{title}
</Typography>
<Typography variant="h4">{value}</Typography> <Typography variant="h4">{value}</Typography>
</Box> </Box>
); );
@@ -64,7 +66,13 @@ const DetailsPage = () => {
data: [ data: [
{ {
id: idx, id: idx,
data: <StatusLabel status={status} text={status} />, data: (
<StatusLabel
status={status}
text={status}
customStyles={{ textTransform: "capitalize" }}
/>
),
}, },
{ id: idx + 1, data: new Date(check.createdAt).toLocaleString() }, { id: idx + 1, data: new Date(check.createdAt).toLocaleString() },
{ id: idx + 2, data: check.statusCode }, { id: idx + 2, data: check.statusCode },
+4
View File
@@ -31,3 +31,7 @@
font-size: var(--env-var-font-size-small); font-size: var(--env-var-font-size-small);
border-color: var(--env-var-color-29); border-color: var(--env-var-color-29);
} }
.page-speed button {
height: 34px;
align-self: flex-end;
}
+20 -4
View File
@@ -8,6 +8,8 @@ import { getPageSpeedByUserId } from "../../Features/PageSpeedMonitor/pageSpeedM
import PageSpeedIcon from "../../assets/icons/page-speed.svg?react"; import PageSpeedIcon from "../../assets/icons/page-speed.svg?react";
import Fallback from "../../Components/Fallback"; import Fallback from "../../Components/Fallback";
import "./index.css"; import "./index.css";
import Button from "../../Components/Button";
import { useNavigate } from "react-router";
const Card = ({ data }) => { const Card = ({ data }) => {
const theme = useTheme(); const theme = useTheme();
@@ -63,6 +65,7 @@ const Card = ({ data }) => {
const PageSpeed = () => { const PageSpeed = () => {
const theme = useTheme(); const theme = useTheme();
const dispatch = useDispatch(); const dispatch = useDispatch();
const navigate = useNavigate();
const { authToken } = useSelector((state) => state.auth); const { authToken } = useSelector((state) => state.auth);
const { monitors } = useSelector((state) => state.pageSpeedMonitors); const { monitors } = useSelector((state) => state.pageSpeedMonitors);
@@ -74,10 +77,23 @@ const PageSpeed = () => {
<Box className="page-speed"> <Box className="page-speed">
{monitors ? ( {monitors ? (
<Stack gap={theme.gap.xs}> <Stack gap={theme.gap.xs}>
<Typography component="h1">All page speed monitors</Typography> <Stack
<Typography mb={theme.gap.large}> direction="row"
Click on one of the monitors to get more site speed information. justifyContent="space-between"
</Typography> mb={theme.gap.large}
>
<Box>
<Typography component="h1">All page speed monitors</Typography>
<Typography mt={theme.gap.xs}>
Click on one of the monitors to get more site speed information.
</Typography>
</Box>
<Button
level="primary"
label="Create new"
onClick={() => navigate("/page-speed/create")}
/>
</Stack>
<Grid container spacing={theme.gap.large}> <Grid container spacing={theme.gap.large}>
{monitors?.map((monitor) => ( {monitors?.map((monitor) => (
<Card data={monitor} key={`monitor-${monitor._id}`} /> <Card data={monitor} key={`monitor-${monitor._id}`} />
+3 -6
View File
@@ -33,9 +33,11 @@ const shadow =
"0px 4px 24px -4px rgba(16, 24, 40, 0.08), 0px 3px 3px -3px rgba(16, 24, 40, 0.03)"; "0px 4px 24px -4px rgba(16, 24, 40, 0.08), 0px 3px 3px -3px rgba(16, 24, 40, 0.03)";
// Global Font Family // Global Font Family
const fontFamilyDefault = '"Roboto", "Helvetica", "Arial", sans-serif'; const fontFamilyDefault =
'"Inter","system-ui", "Avenir", "Helvetica", "Arial", sans-serif';
const theme = createTheme({ const theme = createTheme({
typography: { fontFamily: fontFamilyDefault, fontSize: 13 },
palette: { palette: {
primary: { primary: {
main: primaryMain, main: primaryMain,
@@ -78,11 +80,6 @@ const theme = createTheme({
fillGray: otherColorsFillGray, fillGray: otherColorsFillGray,
}, },
}, },
font: {
default: {
font: fontFamilyDefault,
},
},
shape: { shape: {
borderRadius: 4, borderRadius: 4,
borderThick: 2, borderThick: 2,
+2
View File
@@ -1,3 +1,5 @@
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
:root { :root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
font-weight: 400; font-weight: 400;