From 2a344ae53497087ecf696e1f3c12de29490aeab9 Mon Sep 17 00:00:00 2001 From: CNWei Date: Sat, 31 Oct 2026 16:57:29 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=8A=A0=E9=AB=98=E9=A1=B6=E9=83=A8?= =?UTF-8?q?=E7=95=99=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - TOP_OFFSET 88 -> 104,搜索框与卡片间距 28 -> 44 - contentOffset 与 page-scroll margin/height 共用常量 - 验证 content/sider top=164 --- docs/ADMIN-PLAN.md | 6 ++++++ stash-web/src/AppNext.tsx | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/ADMIN-PLAN.md b/docs/ADMIN-PLAN.md index b0c4142..ccb8723 100644 --- a/docs/ADMIN-PLAN.md +++ b/docs/ADMIN-PLAN.md @@ -147,6 +147,12 @@ DELETE /api/items/:id ## 11. 实施记录 +### P26(2026-10-31,顶部留白加高) + +- 首页顶部偏移 `TOP_OFFSET` 从 88 调到 104,搜索框与内容卡片之间的空白从 28px 增加到 44px; +- Layout `contentOffset` 与 `#page-scroll` 的 `margin-top`/`height` 使用同一个常量,左右两栏仍从 164 对齐开始; +- 验证:content/sider top=164,search top=76 / bottom=120。 + ### P25(2026-10-31,去掉顶部块的接缝) - 删除 `.top-dock` 整块:不再有 60–148 的半透明填充与底边,避免出现一条横向分割线; diff --git a/stash-web/src/AppNext.tsx b/stash-web/src/AppNext.tsx index 288bbcb..bd177d6 100644 --- a/stash-web/src/AppNext.tsx +++ b/stash-web/src/AppNext.tsx @@ -161,6 +161,8 @@ function matches(entry: Record, keyword: string): boolean { return text.includes(keyword) } +const TOP_OFFSET = 104 + export default function AppNext() { const { status, projects, error, live, refreshing, refresh } = useProjects() const { route, navigate } = useRoute() @@ -208,8 +210,8 @@ export default function AppNext() { body.id = 'page-scroll' body.style.overflowY = 'auto' body.style.overflowX = 'hidden' - body.style.marginTop = '88px' - body.style.height = 'calc(100% - 88px)' + body.style.marginTop = `${TOP_OFFSET}px` + body.style.height = `calc(100% - ${TOP_OFFSET}px)` content.style.overflow = 'visible' content.style.marginTop = '0' main.style.height = 'auto' @@ -603,7 +605,7 @@ export default function AppNext() { headerVariant="solid" siderBordered={false} contentPadding="none" - contentOffset={88} + contentOffset={TOP_OFFSET} height="screen" scrollable hideScrollbar