From c5e4b50b9ba485929f3f5b7a4ef59c56d3ea84f4 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sun, 21 Sep 2025 09:02:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B6=E9=83=A8=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F=E6=A0=B7=E5=BC=8F=E5=92=8C=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 +- src/core/github.ts | 4 ++-- styles/components/navbar.ts | 23 ++++++++++++++++++++--- styles/components/notification.ts | 3 +++ 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a76898..a34029e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ### 🌈 Style -- 调整顶部导航栏高度 +- 优化顶部导航栏样式和颜色 ##### 更符合 GitHub 风格 diff --git a/src/core/github.ts b/src/core/github.ts index 5ab7b43..a144b15 100644 --- a/src/core/github.ts +++ b/src/core/github.ts @@ -200,11 +200,11 @@ export function github2ThemeColor(githubColor: GithubColor): ThemeColor { bg: githubColor.bgColor.emphasis, }, nav: { - bg: githubColor.bgColor.inset, + bg: githubColor.bgColor.muted, hoverBg: githubColor.control.transparent.bgColor.hover, text: themeVars.color.text.self, }, - secondaryNavBg: themeVars.color.nav.bg, + secondaryNavBg: themeVars.color.body, label: { text: themeVars.color.text.self, bg: githubColor.bgColor.neutral.muted, diff --git a/styles/components/navbar.ts b/styles/components/navbar.ts index cac1700..8d02bc4 100644 --- a/styles/components/navbar.ts +++ b/styles/components/navbar.ts @@ -3,11 +3,28 @@ import { css, customThemeVars, otherThemeVars, themeVars } from "src/types/vars" export const navbarRight = css` #navbar { + border-bottom: 0; + padding: 0px 16px; min-height: 64px; .navbar-left { - #navbar-logo img { - height: 32px; - width: 32px; + gap: 4px; + > .item { + padding: 6px 10px; + min-height: 20px; + &.active { + font-weight: 600; + } + &#navbar-logo { + // 与下方的用户切换头像对齐 + padding-left: 6px; + &:hover { + background: unset; + } + img { + height: 32px; + width: 32px; + } + } } } // 进入用户页面后, 避免注册, 登录和首页等意外覆盖 diff --git a/styles/components/notification.ts b/styles/components/notification.ts index 70abdbf..918be74 100644 --- a/styles/components/notification.ts +++ b/styles/components/notification.ts @@ -144,6 +144,9 @@ export const notification = css` &:last-child { border-bottom-left-radius: ${otherThemeVars.border.radius}; border-bottom-right-radius: ${otherThemeVars.border.radius}; + &:hover { + border-bottom-left-radius: 0; + } } &:hover { background: ${themeVars.github.bgColor.accent.muted};