fix responsiveness for status page themes

This commit is contained in:
Alex Holliday committed 2026-06-07 15:18:22 -07:00
1 parent 409f9f6dc6
commit c34fcc5cb3
6 files changed
+55 -42

No files matched your search

@@ -130,7 +130,7 @@ export const boldStyles = (
hero: { hero: {
position: "relative", position: "relative",
borderRadius: "22px", borderRadius: "22px",
padding: "36px 36px 32px", padding: { xs: "24px 20px", sm: "36px 36px 32px" },
mb: "28px", mb: "28px",
background: isDark ? heroBgDark : heroBgLight, background: isDark ? heroBgDark : heroBgLight,
border: `1px solid ${tokens.border}`, border: `1px solid ${tokens.border}`,
@@ -149,13 +149,14 @@ export const boldStyles = (
}, },
heroTitle: { heroTitle: {
m: 0, m: 0,
fontSize: 34, fontSize: { xs: 24, sm: 34 },
fontWeight: 800, fontWeight: 800,
letterSpacing: "-0.02em", letterSpacing: "-0.02em",
lineHeight: 1.1, lineHeight: 1.1,
color: tokens.text, color: tokens.text,
display: "flex", display: "flex",
alignItems: "center", alignItems: { xs: "flex-start", sm: "center" },
flexWrap: "wrap",
gap: "10px", gap: "10px",
}, },
heroCheck: (tone) => ({ heroCheck: (tone) => ({
@@ -119,7 +119,7 @@ export const editorialStyles = (
}, },
statusLine: { statusLine: {
fontSize: 22, fontSize: { xs: 18, sm: 22 },
fontWeight: 400, fontWeight: 400,
m: 0, m: 0,
mb: "8px", mb: "8px",
@@ -144,7 +144,7 @@ export const editorialStyles = (
letterSpacing: "0.12em", letterSpacing: "0.12em",
color: tokens.textMuted, color: tokens.textMuted,
m: 0, m: 0,
mb: "56px", mb: { xs: "32px", sm: "56px" },
}, },
chartSwitchWrap: { chartSwitchWrap: {
@@ -11,24 +11,24 @@ export const ModernHero = ({
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<Box sx={styles.hero}> <Box sx={styles.hero}>
<Box sx={styles.pulse(overall.tone)} /> <Box sx={styles.heroRow}>
<Box sx={styles.statusCopy}> <Box sx={styles.pulse(overall.tone)} />
<Box <Box
component="h1" component="h1"
sx={styles.heroTitle} sx={styles.heroTitle}
> >
{overall.message} {overall.message}
</Box> </Box>
<Box <Box sx={styles.heroIcon(overall.tone)}>{overall.icon}</Box>
component="p" </Box>
sx={styles.heroSub} <Box
> component="p"
{t("pages.statusPages.statusBar.monitoringSummary", { sx={styles.heroSub}
count: monitorCount, >
})} {t("pages.statusPages.statusBar.monitoringSummary", {
</Box> count: monitorCount,
})}
</Box> </Box>
<Box sx={styles.heroIcon(overall.tone)}>{overall.icon}</Box>
</Box> </Box>
); );
}; };
@@ -17,7 +17,7 @@ export interface ModernStyles {
logoImg: SxProps<Theme>; logoImg: SxProps<Theme>;
hero: SxProps<Theme>; hero: SxProps<Theme>;
pulse: (tone: OverallTone) => SxProps<Theme>; pulse: (tone: OverallTone) => SxProps<Theme>;
statusCopy: SxProps<Theme>; heroRow: SxProps<Theme>;
heroTitle: SxProps<Theme>; heroTitle: SxProps<Theme>;
heroSub: SxProps<Theme>; heroSub: SxProps<Theme>;
heroIcon: (tone: OverallTone) => SxProps<Theme>; heroIcon: (tone: OverallTone) => SxProps<Theme>;
@@ -148,11 +148,11 @@ export const modernStyles = (
hero: { hero: {
position: "relative", position: "relative",
borderRadius: "20px", borderRadius: "20px",
padding: "28px 32px", padding: { xs: "20px", sm: "28px 32px" },
mb: "24px", mb: "24px",
display: "flex", display: "flex",
alignItems: "center", flexDirection: "column",
gap: "20px", gap: "4px",
background: tokens.surface, background: tokens.surface,
border: `1px solid ${tokens.border}`, border: `1px solid ${tokens.border}`,
boxShadow: cardShadow, boxShadow: cardShadow,
@@ -182,20 +182,26 @@ export const modernStyles = (
}, },
}; };
}, },
statusCopy: { flex: 1, minWidth: 0 }, heroRow: {
display: "flex",
alignItems: "center",
gap: { xs: "14px", sm: "20px" },
},
heroTitle: { heroTitle: {
m: 0, m: 0,
mb: "4px", flex: 1,
fontSize: 22, minWidth: 0,
fontSize: { xs: 18, sm: 22 },
fontWeight: 700, fontWeight: 700,
letterSpacing: "-0.02em", letterSpacing: "-0.02em",
color: tokens.text, color: tokens.text,
}, },
heroSub: { m: 0, color: tokens.textMuted, fontSize: 13 }, heroSub: { m: 0, color: tokens.textMuted, fontSize: 13 },
heroIcon: (tone) => ({ heroIcon: (tone) => ({
display: { xs: "none", sm: "flex" },
color: toneColor(tone, tokens), color: toneColor(tone, tokens),
display: "flex",
alignItems: "center", alignItems: "center",
flexShrink: 0,
}), }),
chartSwitchWrap: { chartSwitchWrap: {
@@ -11,24 +11,24 @@ export const RefinedHero = ({
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<Box sx={styles.hero}> <Box sx={styles.hero}>
<Box sx={styles.statusDot(overall.tone)} /> <Box sx={styles.heroRow}>
<Box sx={styles.statusCopy}> <Box sx={styles.statusDot(overall.tone)} />
<Box <Box
component="h1" component="h1"
sx={styles.heroTitle} sx={styles.heroTitle}
> >
{overall.message} {overall.message}
</Box> </Box>
<Box <Box sx={styles.heroIcon(overall.tone)}>{overall.icon}</Box>
component="p" </Box>
sx={styles.heroSub} <Box
> component="p"
{t("pages.statusPages.statusBar.monitoringSummary", { sx={styles.heroSub}
count: monitorCount, >
})} {t("pages.statusPages.statusBar.monitoringSummary", {
</Box> count: monitorCount,
})}
</Box> </Box>
<Box sx={styles.heroIcon(overall.tone)}>{overall.icon}</Box>
</Box> </Box>
); );
}; };
@@ -17,7 +17,7 @@ export interface RefinedStyles {
company: SxProps<Theme>; company: SxProps<Theme>;
hero: SxProps<Theme>; hero: SxProps<Theme>;
statusDot: (tone: OverallTone) => SxProps<Theme>; statusDot: (tone: OverallTone) => SxProps<Theme>;
statusCopy: SxProps<Theme>; heroRow: SxProps<Theme>;
heroTitle: SxProps<Theme>; heroTitle: SxProps<Theme>;
heroSub: SxProps<Theme>; heroSub: SxProps<Theme>;
heroIcon: (tone: OverallTone) => SxProps<Theme>; heroIcon: (tone: OverallTone) => SxProps<Theme>;
@@ -133,10 +133,10 @@ export const refinedStyles = (
background: tokens.surface, background: tokens.surface,
border: `1px solid ${tokens.border}`, border: `1px solid ${tokens.border}`,
borderRadius: tokens.radius, borderRadius: tokens.radius,
padding: "22px 24px", padding: { xs: "18px 20px", sm: "22px 24px" },
display: "flex", display: "flex",
alignItems: "center", flexDirection: "column",
gap: "16px", gap: "4px",
boxShadow: cardShadow, boxShadow: cardShadow,
mb: "20px", mb: "20px",
}, },
@@ -148,10 +148,15 @@ export const refinedStyles = (
boxShadow: `0 0 0 4px ${toneSoft(tone, tokens)}`, boxShadow: `0 0 0 4px ${toneSoft(tone, tokens)}`,
flexShrink: 0, flexShrink: 0,
}), }),
statusCopy: { flex: 1, minWidth: 0 }, heroRow: {
display: "flex",
alignItems: "center",
gap: { xs: "12px", sm: "16px" },
},
heroTitle: { heroTitle: {
m: 0, m: 0,
mb: "2px", flex: 1,
minWidth: 0,
fontSize: 17, fontSize: 17,
fontWeight: 600, fontWeight: 600,
letterSpacing: "-0.01em", letterSpacing: "-0.01em",
@@ -159,9 +164,10 @@ export const refinedStyles = (
}, },
heroSub: { m: 0, color: tokens.textMuted, fontSize: 13 }, heroSub: { m: 0, color: tokens.textMuted, fontSize: 13 },
heroIcon: (tone) => ({ heroIcon: (tone) => ({
display: { xs: "none", sm: "flex" },
color: toneColor(tone, tokens), color: toneColor(tone, tokens),
display: "flex",
alignItems: "center", alignItems: "center",
flexShrink: 0,
}), }),
chartSwitchWrap: { chartSwitchWrap: {