polish(frontend): 修正中文字重发虚,并疏朗首页与数据区
补齐 Noto 600/800 并关闭伪粗;Header 加大加粗导航并加板块入口;去掉灰块底、加大列表行距,站点数据格居中缩小数字。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user