From c68725b4f6d203674b161c8dbeb9f52826b8378f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?AI=E4=B8=8D=E6=AD=A2=E8=AF=AD?= <12096460+jnMetaCode@users.noreply.github.com> Date: Tue, 18 Aug 2026 19:30:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(site):=20=E5=AF=BC=E8=88=AA=E6=A0=8F?= =?UTF-8?q?=E8=A1=A5=E5=BD=93=E5=89=8D=E9=A1=B5=E9=AB=98=E4=BA=AE=EF=BC=8C?= =?UTF-8?q?=E8=B5=9E=E5=8A=A9=E5=95=86=E5=85=A5=E5=8F=A3=E4=B8=8D=E9=A2=9D?= =?UTF-8?q?=E5=A4=96=E5=8A=A0=E7=B2=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 导航此前没有任何当前页标识。参考站看着「赞助商」更重,是因为停在 该页时的 active 态(其导航项统一 font-medium,active 只把颜色从 muted 提到 foreground,字重不变),并非给赞助位单独加粗。 照此实现:停在 /sponsors 时该项颜色提亮 + aria-current="page", 其余情况与其他导航项完全一致。不给商业位额外字重——导航里单独加粗 一项会被读成「当前页」,点进去发现不是反而困惑。 三语页面同步生效。 --- site/build.mjs | 2 +- site/template/styles.css | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/site/build.mjs b/site/build.mjs index b3ce7cb..e7778a4 100644 --- a/site/build.mjs +++ b/site/build.mjs @@ -652,7 +652,7 @@ ${extraHead} ${t.nav.skills} ${t.nav.tools} ${t.nav.faq} - ${t.nav.sponsors} + ${t.nav.sponsors} ${t.nav.learn} ${t.nav.github} ${langSwitch} diff --git a/site/template/styles.css b/site/template/styles.css index 89c252e..2fe5713 100644 --- a/site/template/styles.css +++ b/site/template/styles.css @@ -69,6 +69,7 @@ body::before { .nav nav > * { flex: 0 0 auto; white-space: nowrap; } .nav nav a { color: var(--text-dim); transition: color .2s; } .nav nav a:hover { color: var(--text); } +.nav nav a.active { color: var(--text); } /* 当前页:只提亮,不加粗 */ main { position: relative; z-index: 1; } section { max-width: var(--maxw); margin: 0 auto; padding: 80px 24px; }