From c610b88f81ec908d94165a898b5115367be234e0 Mon Sep 17 00:00:00 2001 From: Loongphy Date: Sun, 29 Sep 2024 10:35:36 +0800 Subject: [PATCH] style: Optimize styles for specific width --- components/ServerCard.tsx | 24 ++++++++---------------- tailwind.config.ts | 3 +++ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/components/ServerCard.tsx b/components/ServerCard.tsx index 4886a02..b96843a 100644 --- a/components/ServerCard.tsx +++ b/components/ServerCard.tsx @@ -59,51 +59,43 @@ export default function ServerCard({ -
-
- {" "} - {/* 设置固定宽度 */} +
+

{t("CPU")}

{cpu.toFixed(2)}%
-
- {" "} - {/* 设置固定宽度 */} +

{t("Mem")}

{mem.toFixed(2)}%
-
- {" "} - {/* 设置固定宽度 */} +

{t("STG")}

{stg.toFixed(2)}%
-
- {" "} - {/* 设置固定宽度 */} +

{t("Upload")}

{formattedUpSpeed.value} {formattedUpSpeed.unit}
+
-
- {" "} - {/* 设置固定宽度 */} +

{t("Download")}

{formattedDownSpeed.value} {formattedDownSpeed.unit}
+
diff --git a/tailwind.config.ts b/tailwind.config.ts index 0628323..7d9c4b1 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -19,6 +19,9 @@ const config = { }, }, extend: { + screens: { + 'md-820': '820px', + }, fontFamily: { sans: ["var(--font-sans)", ...fontFamily.sans], },