From 012c21532d594784306555e5f64c936c67c3dd7f Mon Sep 17 00:00:00 2001 From: xfy Date: Thu, 9 Jul 2026 13:50:46 +0800 Subject: [PATCH] =?UTF-8?q?refactor(write):=20=E7=A7=BB=E9=99=A4=E3=80=8C?= =?UTF-8?q?=E6=92=B0=E5=86=99=E6=96=B0=E6=96=87=E7=AB=A0/=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E7=BC=96=E8=BE=91=E5=99=A8=E3=80=8D=E9=A1=B5=E5=A4=B4?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 页头条占用了顶部垂直空间且与左侧栏的标题输入框语义重复, 直接移除,让写作区从顶部开始,编辑器获得更多高度。 --- src/pages/admin/write.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/pages/admin/write.rs b/src/pages/admin/write.rs index 7eeca01..864bce3 100644 --- a/src/pages/admin/write.rs +++ b/src/pages/admin/write.rs @@ -419,15 +419,6 @@ fn write_editor(post_id: Option) -> Element { div { class: "absolute inset-0 z-10 bg-paper-theme", WriteSkeleton {} } } - // 页头条:整宽,提到两栏之上,与内容区水平对齐(px-10 pt-10)。 - // flex-shrink-0 保证它不参与垂直伸缩。 - div { class: "flex-shrink-0 px-10 pt-10 pb-6 border-b border-[var(--color-paper-border)]", - h1 { class: "text-4xl font-extrabold tracking-tight text-[var(--color-paper-primary)]", - if is_edit { "编辑文章" } else { "撰写新文章" } - } - p { class: "text-base text-[var(--color-paper-secondary)] mt-2", "内容编辑器" } - } - // 两栏容器:flex-1 分配空间,自身不滚动(min-h-0),滚动职责下放给左右两栏。 div { class: "flex-1 min-h-0 flex", // 左栏(主写作区):flex-1 撑满宽度,min-w-0 防止长标题/代码块撑破 flex,