2.5-Preview开工:字体替换与部分布局调整

This commit is contained in:
2026-08-03 21:15:22 +08:00
parent 1473083548
commit 4ffac6803e
3 changed files with 25 additions and 27 deletions
+25 -27
View File
@@ -1,30 +1,27 @@
/* ===== style-1.css - 全局基础 ===== */
/* ---------- 字体定义 ---------- */
/* 自托管 HarmonyOS Sans 字体 */
/* 中文/英文:HarmonyOS Sans SC Regular */
@font-face {
font-family: 'HarmonyOS Sans SC';
src: local('HarmonyOS Sans SC'),
local('PingFang SC'),
local('Microsoft YaHei'),
local('Helvetica Neue');
src: url('/static/fonts/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
font-weight: 400;
font-display: swap;
}
@font-face {
font-family: 'HarmonyOS Sans SC';
src: local('HarmonyOS Sans SC Medium'),
local('PingFang SC Medium');
font-weight: 500;
font-display: swap;
}
@font-face {
font-family: 'HarmonyOS Sans SC';
src: local('HarmonyOS Sans SC Bold'),
local('PingFang SC Semibold');
font-weight: 700;
font-style: normal;
font-display: swap;
}
/* 数字专用:HarmonyOS Sans Light */
@font-face {
font-family: 'HarmonyOS Sans';
src: url('/static/fonts/HarmonyOS_Sans_Light.ttf') format('truetype');
font-weight: 300;
font-style: normal;
font-display: swap;
}
/* 后备:如果自托管字体加载失败,使用系统字体 */
/* ---------- 重置 ---------- */
* {
margin: 0;
@@ -33,14 +30,14 @@
}
body {
font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
font-family: 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
background: #0a0a0f;
height: 100vh;
overflow: hidden;
color: #e0e0e0;
}
/* ---------- 数字专用字体(加粗 ---------- */
/* ---------- 数字专用字体(使用 HarmonyOS Sans Light ---------- */
.digit,
.big-number,
.remote-port,
@@ -51,22 +48,23 @@ body {
.login-btn,
.save-btn,
.btn-confirm {
font-weight: 600 !important;
font-weight: 300 !important; /* Light 字重 */
letter-spacing: 0.02em;
font-family: 'HarmonyOS Sans', 'JetBrains Mono', monospace;
}
/* 数字特别加粗(适用于大数字展示) */
/* 数字特别加粗(适用于大数字展示)——但 Light 本身就细,这里加大字重覆盖 */
.big-number {
font-weight: 700 !important;
font-weight: 600 !important;
letter-spacing: -0.01em;
}
/* 代码/端口类数字使用等宽字体,但保持加粗 */
/* 代码/端口类数字使用等宽字体,但保持 Light 风格 */
.digit,
.remote-port,
.proxy-addr {
font-family: 'HarmonyOS Sans SC', 'JetBrains Mono', monospace;
font-weight: 600 !important;
font-family: 'HarmonyOS Sans', 'JetBrains Mono', monospace;
font-weight: 300 !important;
}
/* ---------- 全局颜色变量 ---------- */
@@ -175,7 +173,7 @@ body {
height: 100%;
display: flex;
flex-direction: column;
padding: 20px 28px; /* ← 补上内边距 */
padding: 20px 28px;
opacity: 0;
transition: opacity 0.3s ease;
}