polish(frontend): 修正中文字重发虚,并疏朗首页与数据区

补齐 Noto 600/800 并关闭伪粗;Header 加大加粗导航并加板块入口;去掉灰块底、加大列表行距,站点数据格居中缩小数字。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-16 04:10:14 +08:00
parent 5507552ca5
commit 0e61a14ea3
9 changed files with 69 additions and 28 deletions

View File

@@ -486,8 +486,8 @@ export default function CommentSection({
</form>
) : (
<div
className="mb-8 px-5 py-4 rounded-2xl flex items-center justify-between gap-4 flex-wrap"
style={{ background: "var(--panel-2)" }}
className="mb-8 px-5 py-4 rounded-2xl flex items-center justify-between gap-4 flex-wrap border"
style={{ borderColor: "var(--line)", background: "transparent" }}
>
<span className="text-sm" style={{ color: "var(--ink-2)" }}>
登录后参与讨论

View File

@@ -20,6 +20,7 @@ import {
ChevronDown,
ShieldCheck,
MessageSquare,
LayoutGrid,
} from "lucide-react";
import { apiLogout, apiMe, apiChatUnreadSummary, type User } from "@/lib/api";
import { hasAuthCookieHint } from "@/lib/cookies";
@@ -233,14 +234,21 @@ export default function Header({
</span>
</span>
</Link>
<nav className="hidden lg:flex items-center gap-1 pl-3" style={{ borderLeft: "1px solid var(--line)" }}>
<NavPill href="/" active={pathname === "/"} icon={<Home size={14} />}>
<nav className="hidden lg:flex items-center gap-1.5 pl-3" style={{ borderLeft: "1px solid var(--line)" }}>
<NavPill href="/" active={pathname === "/"} icon={<Home size={15} />}>
首页
</NavPill>
<NavPill
href="/boards"
active={pathname === "/boards" || pathname?.startsWith("/board/") === true}
icon={<LayoutGrid size={15} />}
>
板块
</NavPill>
</nav>
</div>
{/* 中部留白:为后续主导航菜单项预留位置 */}
{/* 中部弹性留白,把搜索与操作区推到右侧 */}
<div className="hidden lg:block flex-1" aria-hidden />
{/* 右侧操作区:搜索靠右停靠 + 桌面/移动共用铃铛(仅挂载一次,避免重复轮询),
@@ -370,6 +378,12 @@ export default function Header({
</form>
<div className="flex flex-col">
<MobileLink href="/" active={pathname === "/"}>首页</MobileLink>
<MobileLink
href="/boards"
active={pathname === "/boards" || pathname?.startsWith("/board/") === true}
>
板块
</MobileLink>
{user && <MobileLink href="/compose">发帖</MobileLink>}
{user && (
<MobileLink href="/chat" active={pathname?.startsWith("/chat") ?? false}>
@@ -431,11 +445,11 @@ function NavPill({
return (
<Link
href={href}
className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-full text-[13.5px] transition-colors"
className="inline-flex items-center gap-1.5 px-3.5 py-2 rounded-full text-[15px] font-semibold transition-colors"
style={
active
? { background: "var(--accent-soft)", color: "var(--accent)" }
: { color: "var(--ink-2)" }
: { color: "var(--ink)" }
}
>
{icon}
@@ -456,7 +470,7 @@ function MobileLink({
return (
<Link
href={href}
className="px-3 py-3 rounded-2xl text-[15px] transition-colors"
className="px-3 py-3 rounded-2xl text-[16px] font-semibold transition-colors"
style={{
color: active ? "var(--accent)" : "var(--ink)",
background: active ? "var(--accent-soft)" : "transparent",

View File

@@ -72,10 +72,10 @@ function QuestionPanel({ postId, state }: { postId: number; state: QuestionState
};
return (
<section className="j13-interact-card">
<section className={`j13-interact-card${state.solved ? " is-solved" : " is-unsolved"}`}>
<div className="flex flex-wrap items-center justify-between gap-3">
<div>
<h2 className="font-semibold text-[15px]" style={{ color: "var(--ink)" }}>
<h2 className="text-[15px] font-medium" style={{ color: "var(--ink)" }}>
问答 · {state.solved ? "已解决" : "未解决"}
</h2>
<p className="meta text-[12.5px] mt-1">

View File

@@ -40,8 +40,8 @@ export default function PostRow({
}`}
style={{
borderColor: "var(--line)",
paddingTop: compact ? 11 : 18,
paddingBottom: compact ? 11 : 18,
paddingTop: compact ? 15 : 22,
paddingBottom: compact ? 15 : 22,
animationDelay: `${Math.min(index, 9) * 35}ms`,
}}
>

View File

@@ -154,7 +154,7 @@ function HotRanking({ posts }: { posts: PostListItem[] }) {
<span className="j13-rank-no">{i + 1}</span>
<span className="min-w-0 flex-1">
<span
className="block truncate text-[13px] font-normal leading-snug transition-colors group-hover:text-[var(--accent)]"
className="block truncate text-[13px] font-medium leading-snug transition-colors group-hover:text-[var(--accent)]"
style={{ color: "var(--ink)" }}
>
{p.title}
@@ -235,7 +235,7 @@ function ActiveUsers({ users }: { users: ActiveUser[] }) {
<Avatar name={name} src={u.avatar} size={30} />
<span className="flex-1 min-w-0">
<span
className="block truncate text-[13px] leading-tight"
className="block truncate text-[13px] font-medium leading-tight"
style={{ color: "var(--ink)" }}
>
{name}