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 项全通过
This commit is contained in:
tamakyi
2026-10-13 19:56:46 +08:00
parent d88ba56156
commit 5b417c84f4
20 changed files with 464 additions and 429 deletions
+25
View File
@@ -48,8 +48,33 @@ async function main() {
bodyView: document.body.dataset.view,
count: document.querySelectorAll(sel).length,
activeBtn: document.querySelector('.view-btn.active')?.textContent ?? '',
// 页面与表格都不应出现横向溢出(历史上立绘避让的 padding 曾导致桌面端需要横向拖动)
overflowPage: document.documentElement.scrollWidth - document.documentElement.clientWidth,
overflowTable: (() => {
const w = document.querySelector('.table-wrap');
return w ? Math.round(w.scrollWidth - w.clientWidth) : 0;
})(),
}), SELECTOR[view]);
check(`${view} 视图渲染 ${shown} 个条目`, info.count === shown, `count=${info.count}, 切换器=${info.activeBtn}`);
check(`${view} 视图无横向溢出(无需拖动)`, info.overflowPage <= 0 && info.overflowTable <= 0, `页面溢出 ${info.overflowPage}px,表格溢出 ${info.overflowTable}px`);
// 立绘若存在:要么不与内容重叠,要么确实位于不透明面板之下(立绘 z-index 低于内容,不应影响阅读)
const artOverlap = await page.evaluate(() => {
const art = document.querySelector('.artwork');
if (!art || getComputedStyle(art).display === 'none') return null;
const a = art.getBoundingClientRect();
const opaque = (bg) => {
const m = bg.match(/rgba?\(([^)]+)\)/);
if (!m) return false;
const parts = m[1].split(',').map(Number);
return parts.length < 4 || parts[3] === 1;
};
const hits = [...document.querySelectorAll('table.monitor-table tbody tr, .card')]
.map((el) => ({ r: el.getBoundingClientRect(), el }))
.filter(({ r }) => r.right > a.left + 8 && r.bottom > a.top && r.top < a.bottom)
.map(({ el }) => opaque(getComputedStyle(el).backgroundColor) || opaque(getComputedStyle(el.closest('.table-wrap, .grid') ?? el).backgroundColor));
return { count: hits.length, allOpaque: hits.every(Boolean) };
});
if (artOverlap) check(`${view} 视图立绘不影响阅读(不重叠或位于面板之下)`, artOverlap.count === 0 || artOverlap.allOpaque, `重叠 ${artOverlap.count} 个,均在面板之下=${artOverlap.allOpaque}`);
await page.screenshot({ path: path.join(__dirname, '..', 'docs', `screenshot-view-${view}.png`), fullPage: true });
}