Compare commits

...

4 Commits

Author SHA1 Message Date
lutinglt
89ec60e412 修复仪表板切换用户按钮菜单下无创建组织按钮时的菜单圆角问题 2025-09-21 12:01:30 +08:00
lutinglt
1462ac8724 优化导航栏标识样式 2025-09-21 10:29:21 +08:00
lutinglt
bd568bb621 优化顶部和二级导航栏的样式和颜色 2025-09-21 10:08:19 +08:00
lutinglt
c5e4b50b9b 优化顶部导航栏样式和颜色 2025-09-21 09:02:11 +08:00
10 changed files with 81 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
### 🌈 Style ### 🌈 Style
- 调整顶部导航栏高度 - 优化顶部和二级导航栏的样式和颜色
##### 更符合 GitHub 风格 ##### 更符合 GitHub 风格
@@ -13,3 +13,4 @@
- 修复后台账户管理排序菜单项的宽度问题 - 修复后台账户管理排序菜单项的宽度问题
- 修复合并提交中的主色调按钮组阴影问题 - 修复合并提交中的主色调按钮组阴影问题
- 修复仓库页面下二级导航栏下划线过粗的问题 - 修复仓库页面下二级导航栏下划线过粗的问题
- 修复仪表板切换用户按钮菜单下无创建组织按钮时的菜单圆角问题

View File

@@ -200,11 +200,11 @@ export function github2ThemeColor(githubColor: GithubColor): ThemeColor {
bg: githubColor.bgColor.emphasis, bg: githubColor.bgColor.emphasis,
}, },
nav: { nav: {
bg: githubColor.bgColor.inset, bg: githubColor.bgColor.muted,
hoverBg: githubColor.control.transparent.bgColor.hover, hoverBg: githubColor.control.transparent.bgColor.hover,
text: themeVars.color.text.self, text: themeVars.color.text.self,
}, },
secondaryNavBg: themeVars.color.nav.bg, secondaryNavBg: themeVars.color.body,
label: { label: {
text: themeVars.color.text.self, text: themeVars.color.text.self,
bg: githubColor.bgColor.neutral.muted, bg: githubColor.bgColor.neutral.muted,

View File

@@ -180,6 +180,7 @@ export const github = {
* @dropdown `dropdown` 下拉框子项的悬停背景颜色 * @dropdown `dropdown` 下拉框子项的悬停背景颜色
* @menu `verticalMenu` 垂直菜单项的悬停背景颜色 * @menu `verticalMenu` 垂直菜单项的悬停背景颜色
* @menu `menu` 菜单项的悬停背景颜色 * @menu `menu` 菜单项的悬停背景颜色
* @menu `secondaryMenu` 二级菜单按钮的悬停背景颜色
* @repo `repoHeader` 仓库标题的悬停背景颜色 * @repo `repoHeader` 仓库标题的悬停背景颜色
* @commit `commit` 提交信息的 Action 按钮的悬停背景颜色 * @commit `commit` 提交信息的 Action 按钮的悬停背景颜色
* @filelist `repoFiles` README 栏的按钮的悬停背景颜色 * @filelist `repoFiles` README 栏的按钮的悬停背景颜色

View File

@@ -27,7 +27,7 @@ export const actions = css`
margin-bottom: 24px; margin-bottom: 24px;
margin-left: 2px; margin-left: 2px;
} }
// 工作流列表标题栏菜单
.ui.secondary.menu { .ui.secondary.menu {
background-color: ${themeVars.color.box.header}; background-color: ${themeVars.color.box.header};
border: 1px solid ${themeVars.color.light.border}; border: 1px solid ${themeVars.color.light.border};
@@ -36,6 +36,9 @@ export const actions = css`
border-top-right-radius: ${otherThemeVars.border.radius}; border-top-right-radius: ${otherThemeVars.border.radius};
padding: 16px; padding: 16px;
margin-bottom: 0; margin-bottom: 0;
> .item {
color: ${themeVars.color.text.light.num1};
}
} }
.ui.info.message { .ui.info.message {

View File

@@ -135,3 +135,10 @@ export const issueListMobile = css`
} }
} }
`; `;
// 修复仪表板下二级面板选择菜单组织的标签间隔
export const fixOrgLabel = css`
.dashboard .secondary-nav .org-visibility .label {
margin-right: 0;
}
`;

View File

@@ -48,6 +48,9 @@ export const issueList = css`
} }
.issue-list-toolbar-right > .ui.menu { .issue-list-toolbar-right > .ui.menu {
align-items: center; align-items: center;
> .item {
color: ${themeVars.color.text.light.num1};
}
> .ui.button { > .ui.button {
padding: 0 12px; padding: 0 12px;
height: 32px; height: 32px;

View File

@@ -3,11 +3,28 @@ import { css, customThemeVars, otherThemeVars, themeVars } from "src/types/vars"
export const navbarRight = css` export const navbarRight = css`
#navbar { #navbar {
border-bottom: 0;
padding: 0px 16px;
min-height: 64px; min-height: 64px;
.navbar-left { .navbar-left {
#navbar-logo img { gap: 8px;
height: 32px; > .item {
width: 32px; padding: 4px 8px;
min-height: 20px;
&.active {
font-weight: 600;
}
&#navbar-logo {
// 与下方的用户切换头像对齐
padding-left: 6px;
&:hover {
background: unset;
}
img {
height: 32px;
width: 32px;
}
}
} }
} }
// 进入用户页面后, 避免注册, 登录和首页等意外覆盖 // 进入用户页面后, 避免注册, 登录和首页等意外覆盖
@@ -77,12 +94,13 @@ export const navbarRight = css`
.navbar-profile-admin { .navbar-profile-admin {
background-color: ${themeVars.github.bgColor.accent.emphasis}; background-color: ${themeVars.github.bgColor.accent.emphasis};
border-radius: 25px; border-radius: 25px;
border: 2px solid ${themeVars.color.nav.bg};
color: ${themeVars.color.white}; color: ${themeVars.color.white};
font-size: 8px; font-size: 9px;
font-weight: 600; font-weight: 600;
padding: 2px 5px; padding: 2px 5px;
top: -3px; top: -7px;
left: 22px; left: 21px;
} }
} }
// 通知和计时器的圆点 // 通知和计时器的圆点
@@ -92,10 +110,10 @@ export const navbarRight = css`
background-color: ${themeVars.github.bgColor.accent.emphasis}; background-color: ${themeVars.github.bgColor.accent.emphasis};
border-radius: 25px; border-radius: 25px;
color: ${themeVars.color.white}; color: ${themeVars.color.white};
font-size: 8px; font-size: 9px;
font-weight: 600; font-weight: 600;
top: -14px; top: -15px;
left: 12px; left: 11px;
} }
} }
} }
@@ -133,5 +151,23 @@ export const navbarRight = css`
export const secondaryNav = css` export const secondaryNav = css`
.page-content > :first-child.secondary-nav { .page-content > :first-child.secondary-nav {
margin-bottom: 16px; margin-bottom: 16px;
// 仪表板界面的二级导航栏用户菜单
> .ui.secondary.stackable.menu {
gap: 0px;
min-height: 48px;
> .item {
> .ui.dropdown > .text {
display: inline-flex;
align-items: center;
gap: 4px;
svg {
margin-right: 4px;
}
}
}
> .right.menu {
gap: 4px;
}
}
} }
`; `;

View File

@@ -144,6 +144,9 @@ export const notification = css`
&:last-child { &:last-child {
border-bottom-left-radius: ${otherThemeVars.border.radius}; border-bottom-left-radius: ${otherThemeVars.border.radius};
border-bottom-right-radius: ${otherThemeVars.border.radius}; border-bottom-right-radius: ${otherThemeVars.border.radius};
&:hover {
border-bottom-left-radius: 0;
}
} }
&:hover { &:hover {
background: ${themeVars.github.bgColor.accent.muted}; background: ${themeVars.github.bgColor.accent.muted};

View File

@@ -102,8 +102,16 @@ export const dropdown = css`
border-radius: 12px !important; border-radius: 12px !important;
} }
// 修复嵌套菜单的圆角问题, wiki 页面和组织页面的用户下拉菜单 // 修复嵌套菜单的圆角问题, wiki 页面和组织页面的用户下拉菜单
.ui.dropdown .menu .scrolling.menu { .ui.dropdown .menu {
border-radius: 0 0 12px 12px !important; .scrolling.menu {
border-radius: 0 0 12px 12px !important;
}
// 修复仪表板切换用户按钮菜单下无创建组织按钮时的菜单圆角
&.context-user-switch {
.scrolling.menu:last-child {
border-radius: 0 0 12px 12px !important;
}
}
} }
// 修复下拉菜单元素溢出问题 // 修复下拉菜单元素溢出问题
// 用户菜单 // 用户菜单

View File

@@ -148,13 +148,15 @@ export const secondaryMenu = css`
padding: 0px 12px; padding: 0px 12px;
height: 32px; height: 32px;
font-weight: 500; font-weight: 500;
color: ${themeVars.color.text.light.num1}; }
a.item:hover {
background: ${themeVars.github.control.transparent.bgColor.hover};
} }
} }
// 二级导航栏, 比如仓库的导航栏, 仓库列表的导航栏, 探索的类型导航栏 // 二级导航栏, 比如仓库的导航栏, 仓库列表的导航栏, 探索的类型导航栏
.ui.secondary.pointing.menu { .ui.secondary.pointing.menu {
.overflow-menu-items { .overflow-menu-items {
gap: 0.5rem; gap: 4px;
.item { .item {
padding: 5px 8px !important; padding: 5px 8px !important;
margin-block-start: 0.5rem; margin-block-start: 0.5rem;