Files
DCU_DesktopController/css/base.css
T
cbb d2c86c425a init: DCU ESP32 调试控制台前端与本地页面服务
纯前端上位机界面 + esp32_server.py 静态服务/桌面窗口外壳, 不含固件、
不直接访问硬件; 业务 API 由 ESP32_COMM 固件 80 端口跨域提供。

- tabs.html 单窗口多标签外壳, iframe 承载各功能页
- index.html OTA 中继(ESP32 WiFi / GD32 relay / BLE), js/ota + js/ble
- can.html / can_monitor.html CAN 通信与接收监控, js/can
- motor.html 电机 CAN FD 控制台, js/motor
- continuity_test.html LAN9252 通断测试, spi_test.html SPI 测速(临时, 自包含)
- 三入口: esp32_app.vbs 桌面窗口 / esp32_web.vbs 浏览器 / serve.bat 控制台调试
- 补 README(页面与目录约定、?v= 缓存版本等改动须知)、.gitignore、
  .gitattributes(* -text 保持 Windows 换行原样)
2026-09-03 21:30:32 +08:00

136 lines
4.6 KiB
CSS

/* ============================================================
base.css — DCU Mission Control · 设计令牌与全局基底
风格:深色测控台(deep blue-slate),多色子系统语义配色
子系统色:ESP32=青绿 · GD32=琥珀 · BLE=蓝 · CAN=绿 · 内存/调试=紫
============================================================ */
:root {
/* ---- 底色层次:深蓝灰,层层抬升,拒绝纯黑 ---- */
--bg-root: #0a0f1a;
--bg-panel: #0e1624;
--bg-card: #131d2e;
--bg-elevated: #1a2740;
--bg-input: #0b1220;
--bg-hover: #20304c;
/* ---- 边框 ---- */
--border: #21304a;
--border-strong: #2e4262;
--border-subtle: #1a2740;
/* ---- 文字 ---- */
--text: #e9f0fa;
--text-dim: #93a8c4;
--text-label: #617a99;
/* ---- 子系统语义色 ---- */
--esp32: #2fd8c1; /* 青绿:ESP32 / 主操作 / WiFi OTA */
--esp32-hi: #6ff2e0;
--esp32-dim: rgba(47,216,193,.14);
--gd32: #fcbf3f; /* 琥珀:GD32 / 中继 OTA */
--gd32-hi: #ffd97a;
--gd32-dim: rgba(252,191,63,.14);
--ble: #5fa8ff; /* 蓝:BLE 蓝牙通道 */
--ble-hi: #93c6ff;
--ble-dim: rgba(95,168,255,.14);
--can: #43d97b; /* 绿:CAN 总线 / 健康 */
--can-hi: #7deda6;
--can-dim: rgba(67,217,123,.14);
--motor: #22d3ee; /* 青:电机控制台 */
--motor-hi: #67e8f9;
--motor-dim: rgba(34,211,238,.14);
--mem: #a88bfa; /* 紫:内存 / 调试 / 日志 */
--mem-hi: #c7b3ff;
--mem-dim: rgba(168,139,250,.14);
/* ---- 状态语义色 ---- */
--green: #3ddc8e;
--amber: #fcbf3f;
--red: #ff6b6b;
--red-dim: rgba(255,107,107,.14);
/* ---- 兼容旧令牌(大量旧样式引用,勿删)---- */
--accent: var(--esp32);
--accent-dim: var(--esp32-dim);
--border-focus: var(--esp32);
/* ---- 圆角 ---- */
--radius-sm: 8px;
--radius: 12px;
--radius-lg: 16px;
/* ---- 字体 ----
沿用原始系统字体方案:中文优先苹方/雅黑,西文 Segoe UI;
mono 用于 SHA / HEX / 日志 / 数值(SF Mono → Fira Code → Cascadia → Consolas)。
--font-display 保留变量名以兼容既有引用,指向同一系统栈。 */
--font-display: "PingFang SC","Microsoft YaHei","Segoe UI",system-ui,sans-serif;
--font: "PingFang SC","Microsoft YaHei","Segoe UI",system-ui,sans-serif;
--font-mono: "SF Mono","Fira Code","Cascadia Code","Consolas",monospace;
/* ---- 间距 / 阴影 ---- */
--gap: 18px;
--shadow-card: 0 10px 30px rgba(3,7,16,.45), 0 1px 0 rgba(255,255,255,.03) inset;
--shadow-pop: 0 18px 48px rgba(3,7,16,.6);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
height: 100%;
background: var(--bg-root);
color: var(--text);
font-family: var(--font);
font-size: 14px;
line-height: 1.55;
-webkit-font-smoothing: antialiased;
overflow-x: hidden;
}
/* ---- 环境光背景:细网格 + 双色氛围辉光 + 顶部扫光 ----
网格提供"工程图纸"质感;左上青绿、右下琥珀的两团极淡辉光
暗示 ESP32 / GD32 双核子系统,随视口固定,营造纵深。 */
body::before {
content: "";
position: fixed; inset: 0; z-index: 0; pointer-events: none;
background-image:
linear-gradient(rgba(148,180,226,.035) 1px, transparent 1px),
linear-gradient(90deg, rgba(148,180,226,.035) 1px, transparent 1px);
background-size: 44px 44px;
mask-image: radial-gradient(ellipse 120% 90% at 50% -8%, black 30%, transparent 78%);
}
body::after {
content: "";
position: fixed; inset: 0; z-index: 0; pointer-events: none;
background:
radial-gradient(900px 520px at 8% -10%, rgba(47,216,193,.10), transparent 60%),
radial-gradient(820px 560px at 100% 112%, rgba(252,191,63,.07), transparent 62%),
radial-gradient(700px 480px at 88% -6%, rgba(95,168,255,.06), transparent 60%);
}
.container {
position: relative; z-index: 1;
max-width: 1480px; margin: 0 auto; padding: 26px 32px 44px;
}
/* ---- 全局滚动条 ---- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
background: var(--border-strong); border-radius: 99px;
border: 2px solid var(--bg-root);
}
::-webkit-scrollbar-thumb:hover { background: #3a5378; }
/* ---- 选区 ---- */
::selection { background: rgba(47,216,193,.28); color: #eafffb; }
/* ---- 通用等宽数字(让指标/百分比对齐、不跳动)---- */
.tabular { font-variant-numeric: tabular-nums; }
/* ---- focus 可见性(键盘可达性)---- */
:focus-visible {
outline: 2px solid var(--esp32);
outline-offset: 2px;
border-radius: 4px;
}