Files
shiroko-monitor/public/assets/theme-shiroko.css
T
tamakyi 5b417c84f4 fix(theme): 修横向拖动 + 立绘遮光环,形象换成简约风插画
问题与修复:
1. 桌面端表格/列表需要横向拖动 —— 上一版为避让立绘给 .grid/.footer 加了
   240px 右内边距,而 .grid 是 max-width:1200px,内边距吃在 1200 内部,
   1200px 以上的屏幕也必然溢出。改为立绘收窄 + 置于内容之下(z-index 低于面板)
2. 立绘遮挡光环水印 —— 光环水印移到页脚下方空带,与左下公路车、右下立绘形成
   一条互不遮挡的装饰带
3. 形象换成简约风插画(AI 生成后抠底):右下角全身立绘 + 同款半身像做 logo/favicon;
   官方立绘/头像(SchaleDB 素材)已从仓库移除

验证:
- 1280/1440/1920 三种宽度下页面与表格均 0 溢出
- verify-views 新增 4 条断言(两视图无横向溢出、立绘不影响阅读),15/15 通过
- 四套脚本合计 74 项全通过
2026-10-13 19:56:46 +08:00

228 lines
8.5 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ============================================================
砂狼白子主题(shiroko)
真实素材(头像 / 立绘)来自社区数据库 SchaleDB,版权归 NEXON Games · Yostar;
其余装饰为自绘几何图形,均按其公开设定还原:
· 光环:倾斜的椭圆环 + 四方位带圆头的短杆(全息瞄准镜准星意象)
· 发饰:青色倒十字(旋转 45°)
· 围巾:天蓝色飘带(星野的信物)
· 座驾:公路车
仅在 body[data-theme="shiroko"] 下生效,不影响默认主题。
============================================================ */
body[data-theme="shiroko"] {
--bg: #eef7fd;
--surface: #ffffff;
--border: #d3e6f5;
--text: #17253d;
--text-2: #5d7b9a;
--up: #12b0a2;
--up-bg: #e4faf6;
--down: #e0524e;
--down-bg: #fdecec;
--pending: #d99413;
--pending-bg: #fff7e6;
--accent: #1e9fd4;
--uptime-ok: #12b0a2;
--uptime-warn: #e5a52c;
--uptime-bad: #e0524e;
--uptime-none: #dbe8f3;
--shadow: 0 1px 2px rgb(23 60 100 / 0.05), 0 10px 26px -20px rgb(23 60 100 / 0.35);
--sh-sky: #8fe0ff;
--sh-sky-deep: #2ea8dc;
--sh-navy: #1c2f4d;
}
@media (prefers-color-scheme: dark) {
body[data-theme="shiroko"] {
--bg: #0a1622;
--surface: #101d2c;
--border: #1d3247;
--text: #e4eef7;
--text-2: #8ba6bf;
--up: #2fd4c2;
--up-bg: #0d2a2a;
--down: #f4736c;
--down-bg: #2c1518;
--pending: #e8b344;
--pending-bg: #2a2113;
--accent: #55c2ef;
--uptime-ok: #2fd4c2;
--uptime-none: #1a2b3d;
--shadow: none;
}
}
/* ---------- 背景:天蓝渐变 + 淡斜纹 ---------- */
body[data-theme="shiroko"] {
background-color: var(--bg);
background-image:
repeating-linear-gradient(135deg, rgb(46 168 220 / 4%) 0 1px, transparent 1px 9px),
radial-gradient(120% 60% at 50% -20%, rgb(143 224 255 / 26%), transparent 70%),
linear-gradient(180deg, rgb(255 255 255 / 70%), transparent 320px);
background-attachment: fixed;
}
/* 页脚下方空带:按官方造型还原的光环水印(倾斜椭圆环 + 四方位圆头短杆),
与左下角公路车、右下角立绘形成一条装饰带,互不遮挡 */
body[data-theme="shiroko"]::after {
content: "";
position: fixed;
left: 44%;
bottom: 0;
width: 330px;
height: 180px;
pointer-events: none;
z-index: 0;
opacity: 0.5;
background-repeat: no-repeat;
background-size: contain;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 130'><g stroke='%232ea8dc' stroke-opacity='0.11' fill='none' stroke-linecap='round'><ellipse cx='120' cy='64' rx='86' ry='38' stroke-width='11'/><ellipse cx='120' cy='70' rx='48' ry='21' stroke-width='6'/><g stroke-width='7'><line x1='22' y1='64' x2='6' y2='64'/><line x1='218' y1='64' x2='234' y2='64'/><line x1='120' y1='18' x2='120' y2='2'/><line x1='120' y1='110' x2='120' y2='126'/></g></g><g fill='%232ea8dc' fill-opacity='0.11'><circle cx='6' cy='64' r='4.6'/><circle cx='234' cy='64' r='4.6'/><circle cx='120' cy='2' r='4.6'/><circle cx='120' cy='126' r='4.6'/></g></svg>");
}
/* 左下角:公路车(自绘) */
body[data-theme="shiroko"]::before {
content: "";
position: fixed;
left: 14px;
bottom: 10px;
width: 156px;
height: 90px;
pointer-events: none;
z-index: 0;
opacity: 0.5;
background: url("deco-bicycle.svg") no-repeat center / contain;
}
/* ---------- 顶栏:天蓝到白 + 底部围巾飘带 ---------- */
body[data-theme="shiroko"] .topbar {
background: linear-gradient(180deg, #ffffff 0%, #f6fcff 100%);
border-bottom: 0;
box-shadow: var(--shadow);
overflow: hidden;
}
body[data-theme="shiroko"] .topbar::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 12px;
background: url("deco-scarf.svg") repeat-x bottom left / 300px 12px;
pointer-events: none;
}
/* ---------- 品牌:真实头像 + 光环环 ---------- */
body[data-theme="shiroko"] .logo {
width: 34px;
height: 34px;
border-radius: 50%;
background: #eaf7ff url("shiroko-icon.webp") center / cover no-repeat;
box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sh-sky-deep), 0 0 12px rgb(46 168 220 / 55%);
animation: avatar-halo 3.4s ease-out infinite;
}
@keyframes avatar-halo {
0% { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sh-sky-deep), 0 0 12px rgb(46 168 220 / 55%); }
65% { box-shadow: 0 0 0 2px #fff, 0 0 0 8px rgb(46 168 220 / 0%), 0 0 16px rgb(46 168 220 / 30%); }
100% { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sh-sky-deep), 0 0 12px rgb(46 168 220 / 55%); }
}
body[data-theme="shiroko"] .brand-text h1 {
color: var(--sh-navy);
letter-spacing: 0.04em;
}
/* 分组标题前的青色倒十字发饰(旋转 45°) */
body[data-theme="shiroko"] .group-title::before,
body[data-theme="shiroko"] .group-row td::before {
content: "";
display: inline-block;
width: 11px;
height: 11px;
margin-right: 7px;
vertical-align: middle;
background-repeat: no-repeat;
background-size: contain;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><g transform='rotate(45 10 10)' fill='%232ea8dc'><rect x='8.5' y='0.5' width='3' height='19' rx='1.4'/><rect x='0.5' y='8.5' width='19' height='3' rx='1.4'/></g><circle cx='10' cy='10' r='2.6' fill='%23bfeaff'/></svg>");
}
/* ---------- 状态点 → 迷你光环 ---------- */
body[data-theme="shiroko"] [data-status="up"] { --sh-state: var(--up); }
body[data-theme="shiroko"] [data-status="down"] { --sh-state: var(--down); }
body[data-theme="shiroko"] [data-status="pending"] { --sh-state: var(--pending); }
body[data-theme="shiroko"] .dot {
width: 12px;
height: 12px;
background: transparent;
border: 2px solid var(--sh-state, var(--pending));
border-radius: 50%;
position: relative;
box-shadow: 0 0 7px -1px var(--sh-state, var(--pending));
}
body[data-theme="shiroko"] .dot::after {
content: "";
position: absolute;
inset: 2.5px;
border-radius: 50%;
background: var(--sh-state, var(--pending));
}
body[data-theme="shiroko"] .card[data-status="up"] .dot { animation: halo-pulse 2.6s ease-out infinite; }
@keyframes halo-pulse {
0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 45%, transparent); }
70% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--up) 0%, transparent); }
100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 0%, transparent); }
}
/* ---------- 卡片 / 表格 / 交互 ---------- */
body[data-theme="shiroko"] .card {
border-left-width: 3px;
background: linear-gradient(180deg, #ffffff, #fbfdff);
}
body[data-theme="shiroko"] .tab.active,
body[data-theme="shiroko"] .view-btn.active {
background: linear-gradient(135deg, var(--sh-sky-deep), #1b7fb4);
box-shadow: 0 3px 10px -4px rgb(46 168 220 / 70%);
}
body[data-theme="shiroko"] #refresh-btn:hover { border-color: var(--accent); color: var(--accent); }
body[data-theme="shiroko"] .monitor-table th {
background: linear-gradient(180deg, #f7fcff, #eef7fd);
color: var(--sh-navy);
border-bottom: 1px solid var(--border);
}
body[data-theme="shiroko"] .monitor-table tbody tr:hover { background: rgb(46 168 220 / 6%); }
body[data-theme="shiroko"] .group-row td {
background: linear-gradient(90deg, #eaf6fd, #f7fcff);
border-left: 3px solid var(--sh-sky-deep);
color: var(--sh-navy);
}
body[data-theme="shiroko"] .table-wrap { box-shadow: var(--shadow); }
body[data-theme="shiroko"] .uptime-cell.lv-none {
background-image: repeating-linear-gradient(135deg, rgb(46 168 220 / 16%) 0 1px, transparent 1px 3px);
background-color: var(--uptime-none);
}
/* ---------- 刷新按钮的公路车轮加载态 ---------- */
body[data-theme="shiroko"] #refresh-btn .wheel { animation: wheel-spin 0.9s linear infinite; }
@keyframes wheel-spin { to { transform: rotate(360deg); } }
/* ---------- 简约风立绘(settings.artwork,默认指向内置形象) ---------- */
body[data-theme="shiroko"] .artwork {
position: fixed;
right: 10px;
bottom: 0;
width: auto;
height: min(44vh, 380px);
z-index: 0;
pointer-events: none;
user-select: none;
filter: drop-shadow(0 6px 18px rgb(23 60 100 / 15%));
}
@media (max-width: 1100px) {
body[data-theme="shiroko"] .artwork { display: none; }
}
/* 卡片视图行数多、卡片更靠右下,立绘再收一档,尽量让它落在卡片之外的角落 */
body[data-theme="shiroko"][data-view="cards"] .artwork { height: min(34vh, 300px); }
/* 内容层置于装饰之上 */
body[data-theme="shiroko"] .grid,
body[data-theme="shiroko"] .footer,
body[data-theme="shiroko"] .group-tabs { position: relative; z-index: 1; }