mirror of
https://github.com/jnMetaCode/superpowers-zh.git
synced 2026-09-02 22:54:06 +08:00
feat(site): 导航栏补当前页高亮,赞助商入口不额外加粗
导航此前没有任何当前页标识。参考站看着「赞助商」更重,是因为停在 该页时的 active 态(其导航项统一 font-medium,active 只把颜色从 muted 提到 foreground,字重不变),并非给赞助位单独加粗。 照此实现:停在 /sponsors 时该项颜色提亮 + aria-current="page", 其余情况与其他导航项完全一致。不给商业位额外字重——导航里单独加粗 一项会被读成「当前页」,点进去发现不是反而困惑。 三语页面同步生效。
This commit is contained in:
@@ -652,7 +652,7 @@ ${extraHead}</head>
|
||||
<a href="${base}index.html#skills">${t.nav.skills}</a>
|
||||
<a href="${base}index.html#tools">${t.nav.tools}</a>
|
||||
<a href="${base}index.html#faq">${t.nav.faq}</a>
|
||||
<a href="${base}sponsors.html">${t.nav.sponsors}</a>
|
||||
<a href="${base}sponsors.html"${pageClean === 'sponsors' ? ' class="active" aria-current="page"' : ''}>${t.nav.sponsors}</a>
|
||||
<a href="https://aiolaola.com/?utm_source=sp1" target="_blank" rel="noopener">${t.nav.learn}</a>
|
||||
<a href="https://github.com/jnMetaCode/superpowers-zh" target="_blank" rel="noopener">${t.nav.github}</a>
|
||||
${langSwitch}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user