fix status page styling
This commit is contained in:
1 parent
9a85389b8c
commit
409f9f6dc6
5 files changed
+163
-89
No files matched your search
@@ -99,9 +99,9 @@ export const boldStyles = (
|
|||||||
},
|
},
|
||||||
|
|
||||||
top: {
|
top: {
|
||||||
display: "flex",
|
alignItems: { xs: "flex-start", sm: "center" },
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
|
gap: "12px",
|
||||||
mb: "36px",
|
mb: "36px",
|
||||||
},
|
},
|
||||||
brand: {
|
brand: {
|
||||||
@@ -171,9 +171,15 @@ export const boldStyles = (
|
|||||||
}),
|
}),
|
||||||
heroSub: { mt: "10px", mb: 0, color: tokens.textMuted, fontSize: 14 },
|
heroSub: { mt: "10px", mb: 0, color: tokens.textMuted, fontSize: 14 },
|
||||||
|
|
||||||
chartSwitchWrap: { display: "flex", justifyContent: "flex-end", mb: "16px" },
|
chartSwitchWrap: {
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: { xs: "center", sm: "flex-end" },
|
||||||
|
mb: "16px",
|
||||||
|
},
|
||||||
chartSwitch: {
|
chartSwitch: {
|
||||||
display: "inline-flex",
|
display: "inline-flex",
|
||||||
|
width: { xs: "100%", sm: "auto" },
|
||||||
|
maxWidth: "100%",
|
||||||
border: `1px solid ${tokens.border}`,
|
border: `1px solid ${tokens.border}`,
|
||||||
borderRadius: "999px",
|
borderRadius: "999px",
|
||||||
background: tokens.surface,
|
background: tokens.surface,
|
||||||
@@ -181,16 +187,20 @@ export const boldStyles = (
|
|||||||
gap: "2px",
|
gap: "2px",
|
||||||
},
|
},
|
||||||
chartSwitchButton: (active) => ({
|
chartSwitchButton: (active) => ({
|
||||||
|
flex: 1,
|
||||||
|
minWidth: 0,
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textAlign: "center",
|
||||||
border: 0,
|
border: 0,
|
||||||
background: active ? tokens.upSoft : "transparent",
|
background: active ? tokens.upSoft : "transparent",
|
||||||
fontFamily: "inherit",
|
fontFamily: "inherit",
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
padding: "8px 18px",
|
padding: { xs: "8px 6px", sm: "8px 18px" },
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
color: active ? tokens.up : tokens.textMuted,
|
color: active ? tokens.up : tokens.textMuted,
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
letterSpacing: "0.12em",
|
letterSpacing: { xs: "0.04em", sm: "0.12em" },
|
||||||
transition: "background 0.2s, color 0.2s",
|
transition: "background 0.2s, color 0.2s",
|
||||||
borderRadius: "999px",
|
borderRadius: "999px",
|
||||||
"&:hover": { color: active ? tokens.up : tokens.text },
|
"&:hover": { color: active ? tokens.up : tokens.text },
|
||||||
@@ -217,13 +227,21 @@ export const boldStyles = (
|
|||||||
},
|
},
|
||||||
cardRow: {
|
cardRow: {
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: "1fr auto",
|
alignItems: { xs: "start", sm: "center" },
|
||||||
alignItems: "center",
|
gridTemplateColumns: { xs: "minmax(0, 1fr)", sm: "1fr auto" },
|
||||||
gap: "24px",
|
gridTemplateAreas: {
|
||||||
|
xs: `"name" "status" "meta"`,
|
||||||
|
sm: `"name name" "meta status"`,
|
||||||
|
},
|
||||||
|
columnGap: { sm: "24px" },
|
||||||
|
rowGap: { xs: "10px", sm: "6px" },
|
||||||
p: "22px 28px",
|
p: "22px 28px",
|
||||||
},
|
},
|
||||||
cardLeft: { minWidth: 0 },
|
cardLeft: { minWidth: 0, flex: 1, width: { xs: "100%", sm: "auto" } },
|
||||||
monitorName: {
|
monitorName: {
|
||||||
|
gridArea: "name",
|
||||||
|
minWidth: 0,
|
||||||
|
width: { xs: "100%", sm: "auto" },
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
letterSpacing: "-0.01em",
|
letterSpacing: "-0.01em",
|
||||||
@@ -233,10 +251,9 @@ export const boldStyles = (
|
|||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
},
|
},
|
||||||
monitorMeta: {
|
monitorMeta: {
|
||||||
display: "flex",
|
gridArea: "meta",
|
||||||
gap: "10px",
|
gap: "10px",
|
||||||
alignItems: "center",
|
alignItems: { xs: "flex-start", sm: "center" },
|
||||||
mt: "6px",
|
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
},
|
},
|
||||||
pill: {
|
pill: {
|
||||||
@@ -273,6 +290,8 @@ export const boldStyles = (
|
|||||||
},
|
},
|
||||||
|
|
||||||
badge: (tone) => ({
|
badge: (tone) => ({
|
||||||
|
gridArea: "status",
|
||||||
|
justifySelf: "start",
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 800,
|
fontWeight: 800,
|
||||||
padding: "6px 14px",
|
padding: "6px 14px",
|
||||||
@@ -296,10 +315,10 @@ export const boldStyles = (
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
heatmap: {
|
heatmap: {
|
||||||
padding: "0 28px 22px",
|
padding: { xs: "0 12px 18px", sm: "0 28px 22px" },
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
||||||
gap: "3px",
|
gap: { xs: "1px", sm: "3px" },
|
||||||
height: 48,
|
height: 48,
|
||||||
},
|
},
|
||||||
heatmapCell: (kind) => ({
|
heatmapCell: (kind) => ({
|
||||||
@@ -312,10 +331,10 @@ export const boldStyles = (
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
histogram: {
|
histogram: {
|
||||||
padding: "0 28px",
|
padding: { xs: "0 12px", sm: "0 28px" },
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
||||||
gap: "3px",
|
gap: { xs: "1px", sm: "3px" },
|
||||||
alignItems: "flex-end",
|
alignItems: "flex-end",
|
||||||
height: 48,
|
height: 48,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -90,9 +90,9 @@ export const editorialStyles = (
|
|||||||
},
|
},
|
||||||
|
|
||||||
top: {
|
top: {
|
||||||
display: "flex",
|
alignItems: { xs: "flex-start", sm: "flex-end" },
|
||||||
alignItems: "flex-end",
|
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
|
gap: "12px",
|
||||||
mb: "48px",
|
mb: "48px",
|
||||||
borderBottom: `2px solid ${tokens.text}`,
|
borderBottom: `2px solid ${tokens.text}`,
|
||||||
pb: "18px",
|
pb: "18px",
|
||||||
@@ -149,21 +149,27 @@ export const editorialStyles = (
|
|||||||
|
|
||||||
chartSwitchWrap: {
|
chartSwitchWrap: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "flex-end",
|
justifyContent: { xs: "center", sm: "flex-end" },
|
||||||
mb: "20px",
|
mb: "20px",
|
||||||
fontFamily: EDITORIAL_SECONDARY_SANS_STACK,
|
fontFamily: EDITORIAL_SECONDARY_SANS_STACK,
|
||||||
},
|
},
|
||||||
chartSwitch: {
|
chartSwitch: {
|
||||||
display: "inline-flex",
|
display: "inline-flex",
|
||||||
|
width: { xs: "100%", sm: "auto" },
|
||||||
|
maxWidth: "100%",
|
||||||
border: `1px solid ${tokens.text}`,
|
border: `1px solid ${tokens.text}`,
|
||||||
"& > button + button": { borderLeft: `1px solid ${tokens.text}` },
|
"& > button + button": { borderLeft: `1px solid ${tokens.text}` },
|
||||||
},
|
},
|
||||||
chartSwitchButton: (active) => ({
|
chartSwitchButton: (active) => ({
|
||||||
|
flex: 1,
|
||||||
|
minWidth: 0,
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textAlign: "center",
|
||||||
fontFamily: "inherit",
|
fontFamily: "inherit",
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
letterSpacing: "0.2em",
|
letterSpacing: { xs: "0.05em", sm: "0.2em" },
|
||||||
padding: "6px 14px",
|
padding: { xs: "6px 6px", sm: "6px 14px" },
|
||||||
border: 0,
|
border: 0,
|
||||||
background: active ? tokens.text : "transparent",
|
background: active ? tokens.text : "transparent",
|
||||||
color: active ? tokens.bg : tokens.text,
|
color: active ? tokens.bg : tokens.text,
|
||||||
@@ -188,12 +194,20 @@ export const editorialStyles = (
|
|||||||
},
|
},
|
||||||
cardRow: {
|
cardRow: {
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: "1fr auto",
|
alignItems: { xs: "start", sm: "baseline" },
|
||||||
alignItems: "baseline",
|
gridTemplateColumns: { xs: "minmax(0, 1fr)", sm: "1fr auto" },
|
||||||
gap: "20px",
|
gridTemplateAreas: {
|
||||||
|
xs: `"name" "status" "meta"`,
|
||||||
|
sm: `"name name" "meta status"`,
|
||||||
|
},
|
||||||
|
columnGap: { sm: "20px" },
|
||||||
|
rowGap: { xs: "10px", sm: "6px" },
|
||||||
},
|
},
|
||||||
cardLeft: { minWidth: 0 },
|
cardLeft: { minWidth: 0, flex: 1, width: { xs: "100%", sm: "auto" } },
|
||||||
monitorName: {
|
monitorName: {
|
||||||
|
gridArea: "name",
|
||||||
|
minWidth: 0,
|
||||||
|
width: { xs: "100%", sm: "auto" },
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
letterSpacing: "-0.015em",
|
letterSpacing: "-0.015em",
|
||||||
@@ -203,14 +217,13 @@ export const editorialStyles = (
|
|||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
},
|
},
|
||||||
monitorMeta: {
|
monitorMeta: {
|
||||||
|
gridArea: "meta",
|
||||||
fontFamily: EDITORIAL_SECONDARY_SANS_STACK,
|
fontFamily: EDITORIAL_SECONDARY_SANS_STACK,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: tokens.textMuted,
|
color: tokens.textMuted,
|
||||||
mt: "6px",
|
|
||||||
display: "flex",
|
|
||||||
gap: "12px",
|
gap: "12px",
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
alignItems: "center",
|
alignItems: { xs: "flex-start", sm: "center" },
|
||||||
},
|
},
|
||||||
pill: {
|
pill: {
|
||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
@@ -234,6 +247,8 @@ export const editorialStyles = (
|
|||||||
},
|
},
|
||||||
|
|
||||||
badge: (tone) => ({
|
badge: (tone) => ({
|
||||||
|
gridArea: "status",
|
||||||
|
justifySelf: "start",
|
||||||
fontFamily: EDITORIAL_SECONDARY_SANS_STACK,
|
fontFamily: EDITORIAL_SECONDARY_SANS_STACK,
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
@@ -250,7 +265,7 @@ export const editorialStyles = (
|
|||||||
mt: "16px",
|
mt: "16px",
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
||||||
gap: "2px",
|
gap: { xs: "1px", sm: "2px" },
|
||||||
height: 40,
|
height: 40,
|
||||||
},
|
},
|
||||||
heatmapCell: (kind) => ({
|
heatmapCell: (kind) => ({
|
||||||
@@ -262,7 +277,7 @@ export const editorialStyles = (
|
|||||||
mt: "16px",
|
mt: "16px",
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
||||||
gap: "2px",
|
gap: { xs: "1px", sm: "2px" },
|
||||||
alignItems: "flex-end",
|
alignItems: "flex-end",
|
||||||
height: 40,
|
height: 40,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -117,9 +117,9 @@ export const modernStyles = (
|
|||||||
},
|
},
|
||||||
|
|
||||||
top: {
|
top: {
|
||||||
display: "flex",
|
alignItems: { xs: "flex-start", sm: "center" },
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
|
gap: "12px",
|
||||||
mb: "32px",
|
mb: "32px",
|
||||||
},
|
},
|
||||||
brand: {
|
brand: {
|
||||||
@@ -198,9 +198,15 @@ export const modernStyles = (
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}),
|
}),
|
||||||
|
|
||||||
chartSwitchWrap: { display: "flex", justifyContent: "flex-end", mb: "14px" },
|
chartSwitchWrap: {
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: { xs: "center", sm: "flex-end" },
|
||||||
|
mb: "14px",
|
||||||
|
},
|
||||||
chartSwitch: {
|
chartSwitch: {
|
||||||
display: "inline-flex",
|
display: "inline-flex",
|
||||||
|
width: { xs: "100%", sm: "auto" },
|
||||||
|
maxWidth: "100%",
|
||||||
border: `1px solid ${tokens.border}`,
|
border: `1px solid ${tokens.border}`,
|
||||||
borderRadius: "999px",
|
borderRadius: "999px",
|
||||||
background: tokens.surface,
|
background: tokens.surface,
|
||||||
@@ -208,16 +214,20 @@ export const modernStyles = (
|
|||||||
gap: "2px",
|
gap: "2px",
|
||||||
},
|
},
|
||||||
chartSwitchButton: (active) => ({
|
chartSwitchButton: (active) => ({
|
||||||
|
flex: 1,
|
||||||
|
minWidth: 0,
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textAlign: "center",
|
||||||
border: 0,
|
border: 0,
|
||||||
background: active ? tokens.upSoft : "transparent",
|
background: active ? tokens.upSoft : "transparent",
|
||||||
fontFamily: "inherit",
|
fontFamily: "inherit",
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
padding: "6px 16px",
|
padding: { xs: "6px 6px", sm: "6px 16px" },
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
color: active ? tokens.up : tokens.textMuted,
|
color: active ? tokens.up : tokens.textMuted,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
textTransform: "uppercase",
|
textTransform: "uppercase",
|
||||||
letterSpacing: "0.08em",
|
letterSpacing: { xs: "0.04em", sm: "0.08em" },
|
||||||
transition: "background 0.2s, color 0.2s",
|
transition: "background 0.2s, color 0.2s",
|
||||||
borderRadius: "999px",
|
borderRadius: "999px",
|
||||||
"&:hover": { color: active ? tokens.up : tokens.text },
|
"&:hover": { color: active ? tokens.up : tokens.text },
|
||||||
@@ -256,13 +266,21 @@ export const modernStyles = (
|
|||||||
},
|
},
|
||||||
cardRow: {
|
cardRow: {
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: "1fr auto",
|
alignItems: { xs: "start", sm: "center" },
|
||||||
alignItems: "center",
|
gridTemplateColumns: { xs: "minmax(0, 1fr)", sm: "1fr auto" },
|
||||||
gap: "20px",
|
gridTemplateAreas: {
|
||||||
|
xs: `"name" "status" "meta"`,
|
||||||
|
sm: `"name name" "meta status"`,
|
||||||
|
},
|
||||||
|
columnGap: { sm: "20px" },
|
||||||
|
rowGap: { xs: "10px", sm: "6px" },
|
||||||
p: "18px 24px",
|
p: "18px 24px",
|
||||||
},
|
},
|
||||||
cardLeft: { minWidth: 0 },
|
cardLeft: { minWidth: 0, flex: 1, width: { xs: "100%", sm: "auto" } },
|
||||||
monitorName: {
|
monitorName: {
|
||||||
|
gridArea: "name",
|
||||||
|
minWidth: 0,
|
||||||
|
width: { xs: "100%", sm: "auto" },
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
letterSpacing: "-0.005em",
|
letterSpacing: "-0.005em",
|
||||||
@@ -272,10 +290,9 @@ export const modernStyles = (
|
|||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
},
|
},
|
||||||
monitorMeta: {
|
monitorMeta: {
|
||||||
display: "flex",
|
gridArea: "meta",
|
||||||
gap: "10px",
|
gap: "10px",
|
||||||
alignItems: "center",
|
alignItems: { xs: "flex-start", sm: "center" },
|
||||||
mt: "6px",
|
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
},
|
},
|
||||||
pill: {
|
pill: {
|
||||||
@@ -299,6 +316,8 @@ export const modernStyles = (
|
|||||||
},
|
},
|
||||||
|
|
||||||
badge: (tone) => ({
|
badge: (tone) => ({
|
||||||
|
gridArea: "status",
|
||||||
|
justifySelf: "start",
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 700,
|
fontWeight: 700,
|
||||||
padding: "5px 12px",
|
padding: "5px 12px",
|
||||||
@@ -319,10 +338,10 @@ export const modernStyles = (
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
heatmap: {
|
heatmap: {
|
||||||
padding: "0 24px 20px",
|
padding: { xs: "0 12px 16px", sm: "0 24px 20px" },
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
||||||
gap: "3px",
|
gap: { xs: "1px", sm: "3px" },
|
||||||
height: 46,
|
height: 46,
|
||||||
},
|
},
|
||||||
heatmapCell: (kind) => ({
|
heatmapCell: (kind) => ({
|
||||||
@@ -334,10 +353,10 @@ export const modernStyles = (
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
histogram: {
|
histogram: {
|
||||||
padding: "0 24px",
|
padding: { xs: "0 12px", sm: "0 24px" },
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
||||||
gap: "3px",
|
gap: { xs: "1px", sm: "3px" },
|
||||||
alignItems: "flex-end",
|
alignItems: "flex-end",
|
||||||
height: 46,
|
height: 46,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -102,9 +102,9 @@ export const refinedStyles = (
|
|||||||
},
|
},
|
||||||
|
|
||||||
top: {
|
top: {
|
||||||
display: "flex",
|
alignItems: { xs: "flex-start", sm: "center" },
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
|
gap: "12px",
|
||||||
mb: "28px",
|
mb: "28px",
|
||||||
},
|
},
|
||||||
brand: {
|
brand: {
|
||||||
@@ -164,9 +164,15 @@ export const refinedStyles = (
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}),
|
}),
|
||||||
|
|
||||||
chartSwitchWrap: { display: "flex", justifyContent: "flex-end", mb: "12px" },
|
chartSwitchWrap: {
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: { xs: "center", sm: "flex-end" },
|
||||||
|
mb: "12px",
|
||||||
|
},
|
||||||
chartSwitch: {
|
chartSwitch: {
|
||||||
display: "inline-flex",
|
display: "inline-flex",
|
||||||
|
width: { xs: "100%", sm: "auto" },
|
||||||
|
maxWidth: "100%",
|
||||||
border: `1px solid ${tokens.border}`,
|
border: `1px solid ${tokens.border}`,
|
||||||
borderRadius: "8px",
|
borderRadius: "8px",
|
||||||
background: tokens.surface,
|
background: tokens.surface,
|
||||||
@@ -174,11 +180,15 @@ export const refinedStyles = (
|
|||||||
gap: "2px",
|
gap: "2px",
|
||||||
},
|
},
|
||||||
chartSwitchButton: (active) => ({
|
chartSwitchButton: (active) => ({
|
||||||
|
flex: 1,
|
||||||
|
minWidth: 0,
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
textAlign: "center",
|
||||||
border: 0,
|
border: 0,
|
||||||
background: active ? tokens.upSoft : "transparent",
|
background: active ? tokens.upSoft : "transparent",
|
||||||
fontFamily: "inherit",
|
fontFamily: "inherit",
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
padding: "5px 14px",
|
padding: { xs: "5px 6px", sm: "5px 14px" },
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
color: active ? tokens.up : tokens.textMuted,
|
color: active ? tokens.up : tokens.textMuted,
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
@@ -207,13 +217,21 @@ export const refinedStyles = (
|
|||||||
},
|
},
|
||||||
cardRow: {
|
cardRow: {
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: "1fr auto",
|
alignItems: { xs: "start", sm: "center" },
|
||||||
alignItems: "center",
|
gridTemplateColumns: { xs: "minmax(0, 1fr)", sm: "1fr auto" },
|
||||||
gap: "16px",
|
gridTemplateAreas: {
|
||||||
|
xs: `"name" "status" "meta"`,
|
||||||
|
sm: `"name name" "meta status"`,
|
||||||
|
},
|
||||||
|
columnGap: { sm: "16px" },
|
||||||
|
rowGap: { xs: "10px", sm: "4px" },
|
||||||
p: "16px 20px",
|
p: "16px 20px",
|
||||||
},
|
},
|
||||||
cardLeft: { minWidth: 0 },
|
cardLeft: { minWidth: 0, flex: 1, width: { xs: "100%", sm: "auto" } },
|
||||||
monitorName: {
|
monitorName: {
|
||||||
|
gridArea: "name",
|
||||||
|
minWidth: 0,
|
||||||
|
width: { xs: "100%", sm: "auto" },
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
letterSpacing: "-0.005em",
|
letterSpacing: "-0.005em",
|
||||||
@@ -223,10 +241,9 @@ export const refinedStyles = (
|
|||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
},
|
},
|
||||||
monitorMeta: {
|
monitorMeta: {
|
||||||
display: "flex",
|
gridArea: "meta",
|
||||||
gap: "10px",
|
gap: "10px",
|
||||||
alignItems: "center",
|
alignItems: { xs: "flex-start", sm: "center" },
|
||||||
mt: "4px",
|
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
},
|
},
|
||||||
pill: {
|
pill: {
|
||||||
@@ -251,6 +268,8 @@ export const refinedStyles = (
|
|||||||
},
|
},
|
||||||
|
|
||||||
badge: (tone) => ({
|
badge: (tone) => ({
|
||||||
|
gridArea: "status",
|
||||||
|
justifySelf: "start",
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
padding: "4px 10px",
|
padding: "4px 10px",
|
||||||
@@ -261,10 +280,10 @@ export const refinedStyles = (
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
heatmap: {
|
heatmap: {
|
||||||
padding: "0 20px 16px",
|
padding: { xs: "0 10px 14px", sm: "0 20px 16px" },
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
||||||
gap: "3px",
|
gap: { xs: "1px", sm: "3px" },
|
||||||
height: 42,
|
height: 42,
|
||||||
},
|
},
|
||||||
heatmapCell: (kind) => ({
|
heatmapCell: (kind) => ({
|
||||||
@@ -276,10 +295,10 @@ export const refinedStyles = (
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
histogram: {
|
histogram: {
|
||||||
padding: "0 20px",
|
padding: { xs: "0 10px", sm: "0 20px" },
|
||||||
display: "grid",
|
display: "grid",
|
||||||
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
gridTemplateColumns: `repeat(${MAX_RECENT_CHECKS}, 1fr)`,
|
||||||
gap: "3px",
|
gap: { xs: "1px", sm: "3px" },
|
||||||
alignItems: "flex-end",
|
alignItems: "flex-end",
|
||||||
height: 42,
|
height: 42,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -102,8 +102,9 @@ export const BaseStatusPage = ({ statusPage, monitors, config }: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={styles.page}>
|
<Box sx={styles.page}>
|
||||||
<Box
|
<Stack
|
||||||
component="header"
|
component="header"
|
||||||
|
direction={{ xs: "column", sm: "row" }}
|
||||||
sx={styles.top}
|
sx={styles.top}
|
||||||
>
|
>
|
||||||
<HeaderSlot
|
<HeaderSlot
|
||||||
@@ -113,7 +114,7 @@ export const BaseStatusPage = ({ statusPage, monitors, config }: Props) => {
|
|||||||
monitorCount={monitors.length}
|
monitorCount={monitors.length}
|
||||||
styles={styles}
|
styles={styles}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Stack>
|
||||||
|
|
||||||
<HeroSlot
|
<HeroSlot
|
||||||
statusPage={statusPage}
|
statusPage={statusPage}
|
||||||
@@ -171,38 +172,39 @@ export const BaseStatusPage = ({ statusPage, monitors, config }: Props) => {
|
|||||||
sx={styles.card}
|
sx={styles.card}
|
||||||
>
|
>
|
||||||
<Box sx={styles.cardRow}>
|
<Box sx={styles.cardRow}>
|
||||||
<Box sx={styles.cardLeft}>
|
<Box sx={styles.monitorName}>{monitor.name}</Box>
|
||||||
<Box sx={styles.monitorName}>{monitor.name}</Box>
|
|
||||||
<Box sx={styles.monitorMeta}>
|
|
||||||
<Box
|
|
||||||
component="span"
|
|
||||||
sx={isHardware ? styles.pillHardware : styles.pill}
|
|
||||||
>
|
|
||||||
{getMonitorTypeLabel(monitor.type, t)}
|
|
||||||
</Box>
|
|
||||||
<Box
|
|
||||||
component="span"
|
|
||||||
sx={styles.pill}
|
|
||||||
>
|
|
||||||
{uptimePercentage}
|
|
||||||
</Box>
|
|
||||||
{monitor.url && (
|
|
||||||
<Box
|
|
||||||
component="span"
|
|
||||||
sx={styles.monitorUrl}
|
|
||||||
title={monitor.url}
|
|
||||||
>
|
|
||||||
{monitor.url}
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
<Box
|
<Box
|
||||||
component="span"
|
component="span"
|
||||||
sx={styles.badge(badgeTone)}
|
sx={styles.badge(badgeTone)}
|
||||||
>
|
>
|
||||||
{t(statusBadgeKey[monitor.status])}
|
{t(statusBadgeKey[monitor.status])}
|
||||||
</Box>
|
</Box>
|
||||||
|
<Stack
|
||||||
|
direction={{ xs: "column", sm: "row" }}
|
||||||
|
sx={styles.monitorMeta}
|
||||||
|
>
|
||||||
|
<Box
|
||||||
|
component="span"
|
||||||
|
sx={isHardware ? styles.pillHardware : styles.pill}
|
||||||
|
>
|
||||||
|
{getMonitorTypeLabel(monitor.type, t)}
|
||||||
|
</Box>
|
||||||
|
<Box
|
||||||
|
component="span"
|
||||||
|
sx={{ ...styles.pill }}
|
||||||
|
>
|
||||||
|
{uptimePercentage}
|
||||||
|
</Box>
|
||||||
|
{monitor.url && (
|
||||||
|
<Box
|
||||||
|
component="span"
|
||||||
|
sx={styles.monitorUrl}
|
||||||
|
title={monitor.url}
|
||||||
|
>
|
||||||
|
{monitor.url}
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{showInfra && (
|
{showInfra && (
|
||||||
|
|||||||
Reference in new issue
Block a user