Added basic default font variants

This commit is contained in:
Daniel Cojocea committed 2024-09-14 12:36:20 -04:00
1 parent 63075a2390
commit d8664d3ed7
26 files changed
+90 -227

No files matched your search

+2 -12
View File
@@ -1,18 +1,8 @@
.configure-pagespeed h1.MuiTypography-root {
font-size: var(--env-var-font-size-large-plus);
}
.configure-pagespeed span.MuiTypography-root {
font-size: var(--env-var-font-size-small-plus);
}
.configure-pagespeed h1.MuiTypography-root,
.configure-pagespeed h3.MuiTypography-root,
.configure-pagespeed h2.MuiTypography-root {
font-weight: 600;
}
.configure-pagespeed p.MuiTypography-root,
.configure-pagespeed h3.MuiTypography-root,
.configure-pagespeed h3.MuiTypography-root > span.MuiTypography-root {
font-size: var(--env-var-font-size-medium);
.configure-pagespeed h3.MuiTypography-root {
font-weight: 500;
}
.configure-pagespeed .MuiBox-root > .field + p.MuiTypography-root {
font-size: var(--env-var-font-size-small-plus);
@@ -151,12 +151,7 @@ const PageSpeedConfigure = () => {
<Stack direction="row" gap={theme.spacing(2)}>
<PulseDot color={statusColor[determineState(monitor)]} />
<Box>
<Typography
component="h1"
mb={theme.spacing(2)}
sx={{ lineHeight: 1 }}
color={theme.palette.text.primary}
>
<Typography component="h1" variant="h1" mb={theme.spacing(2)}>
{monitor?.url}
</Typography>
<Typography
@@ -351,13 +346,13 @@ const PageSpeedConfigure = () => {
<Typography
id="modal-delete-pagespeed-monitor"
component="h2"
color={theme.palette.text.secondary}
variant="h2"
>
Do you really want to delete this monitor?
</Typography>
<Typography
id="delete-pagespeed-monitor-confirmation"
color={theme.palette.text.tertiary}
variant="body1"
>
Once deleted, this monitor cannot be retrieved.
</Typography>
@@ -1,43 +0,0 @@
.create-page-speed h1.MuiTypography-root,
.create-page-speed h3.MuiTypography-root {
font-weight: 600;
}
.create-page-speed p.MuiTypography-root,
.create-page-speed h3.MuiTypography-root,
.create-page-speed h3.MuiTypography-root > span.MuiTypography-root {
font-size: var(--env-var-font-size-medium);
}
.create-page-speed .MuiBox-root > .field + p.MuiTypography-root {
font-size: var(--env-var-font-size-small-plus);
}
.create-page-speed .MuiBox-root > .field + p.MuiTypography-root,
.create-page-speed h3.MuiTypography-root > span.MuiTypography-root {
opacity: 0.6;
}
.create-page-speed .checkbox-wrapper {
margin-bottom: 1px;
}
/* to be removed */
.create-page-speed .section-disabled {
opacity: 0.4;
padding: 10px;
margin-right: -5px;
border-radius: 8px;
user-select: none;
pointer-events: none;
}
.create-page-speed button {
height: var(--env-var-height-2);
}
.create-page-speed h3.MuiTypography-root {
flex: 0.7;
}
.create-page-speed .field,
.create-page-speed .section-disabled,
.create-page-speed .select-wrapper {
flex: 1;
}
@@ -164,16 +164,17 @@ const CreatePageSpeed = () => {
gap={theme.spacing(12)}
mt={theme.spacing(6)}
>
<Typography component="h1">
<Typography component="h1" variant="h1">
<Typography component="span" fontSize="inherit">
Create your{" "}
</Typography>
<Typography
component="span"
fontSize="inherit"
fontWeight="inherit"
color={theme.palette.text.secondary}
>
Create your{" "}
</Typography>
<Typography component="span" fontSize="inherit" fontWeight="inherit">
Pagespeed monitor
pagespeed monitor
</Typography>
</Typography>
<ConfigBox>
@@ -47,7 +47,6 @@ const config = {
const CustomToolTip = ({ active, payload, label, config }) => {
const theme = useTheme();
console.log(payload);
if (active && payload && payload.length) {
return (
<Box
+8 -26
View File
@@ -99,12 +99,7 @@ const PageSpeedDetails = () => {
/>
<Stack direction="row" gap={theme.spacing(2)}>
<Box>
<Typography
component="h1"
fontSize={22}
fontWeight={500}
color={theme.palette.text.primary}
>
<Typography component="h1" variant="h1">
{monitor.name}
</Typography>
<Stack
@@ -143,19 +138,14 @@ const PageSpeedDetails = () => {
/>
</Box>
</Tooltip>
<Typography
component="h2"
fontSize={14.5}
color={theme.palette.text.secondary}
>
<Typography component="h2" variant="h2">
{monitor?.url}
</Typography>
<Typography
position="relative"
variant="body2"
mt={theme.spacing(1)}
ml={theme.spacing(6)}
fontSize={12}
position="relative"
color={theme.palette.text.tertiary}
sx={{
"&:before": {
position: "absolute",
@@ -212,11 +202,7 @@ const PageSpeedDetails = () => {
</StatBox>
</Stack>
<Box>
<Typography
fontSize={12}
color={theme.palette.text.tertiary}
my={theme.spacing(8)}
>
<Typography variant="body2" my={theme.spacing(8)}>
Showing statistics for past 24 hours.
</Typography>
<ChartBox sx={{ gridTemplateColumns: "75% 25%" }}>
@@ -308,7 +294,7 @@ const PageSpeedDetails = () => {
pb={theme.spacing(12)}
>
<PieChart audits={audits} />
<Typography fontSize={13} mt="auto">
<Typography variant="body1" mt="auto">
Values are estimated and may vary.{" "}
<Typography
component="span"
@@ -393,14 +379,10 @@ const PageSpeedDetails = () => {
component="span"
fontSize={14}
fontWeight={500}
color={theme.palette.text.primary}
>
{value}
<Typography
component="span"
fontSize={12}
color={theme.palette.text.tertiary}
ml={2}
>
<Typography component="span" variant="body2" ml={2}>
{unit}
</Typography>
</Typography>
+12 -2
View File
@@ -3,6 +3,8 @@ import { StatusLabel } from "../../Components/Label";
import { Box, Grid, Stack, Typography } from "@mui/material";
import { useNavigate } from "react-router";
import { useTheme } from "@emotion/react";
import { formatDate, formatDurationRounded } from "../../Utils/timeUtils";
import { getLastChecked } from "../../Utils/monitorUtils";
import useUtils from "../Monitors/utils";
import PropTypes from "prop-types";
@@ -44,6 +46,7 @@ const Card = ({ monitor }) => {
<Typography
component="h2"
mb={theme.spacing(2)}
fontSize={16}
color={theme.palette.primary.main}
>
{monitor.name}
@@ -54,8 +57,15 @@ const Card = ({ monitor }) => {
customStyles={{ textTransform: "capitalize" }}
/>
</Stack>
<Typography fontSize={13}>
{monitor.url.replace(/^https?:\/\//, "")}
<Typography>{monitor.url.replace(/^https?:\/\//, "")}</Typography>
<Typography mt={theme.spacing(12)}>
<Typography component="span" variant="body2" fontWeight={600}>
Last checked:{" "}
</Typography>
{formatDate(getLastChecked(monitor.checks, false))}{" "}
<Typography component="span" variant="body2" fontStyle="italic">
({formatDurationRounded(getLastChecked(monitor.checks))} ago)
</Typography>
</Typography>
</Box>
</Stack>
-11
View File
@@ -1,17 +1,6 @@
.page-speed h2.MuiTypography-root {
line-height: 1.1;
}
.page-speed:not(:has([class*="fallback__"])) h1.MuiTypography-root {
font-size: var(--env-var-font-size-large-plus);
}
.page-speed h2.MuiTypography-root {
font-size: var(--env-var-font-size-large);
font-weight: 600;
}
.page-speed p:has(> span.MuiTypography-root),
.page-speed p.MuiTypography-root > span.MuiTypography-root {
font-size: var(--env-var-font-size-small-plus);
}
.page-speed .label {
padding: 7px;
height: 22px;