You've already forked gitea-banana-theme
195 lines
6.1 KiB
TypeScript
195 lines
6.1 KiB
TypeScript
import { css, themeVars } from "src/types/vars";
|
|
|
|
export const dashboard = css`
|
|
// 首页仪表板, 避免选中管理员后台的维护管理面板
|
|
.page-content.dashboard.feeds {
|
|
// 仓库列表的仓库/组织切换按钮
|
|
.ui.two.item.menu {
|
|
background: ${themeVars.color.hover.self};
|
|
border: 0;
|
|
border-radius: 12px;
|
|
margin-bottom: 16px; // 增加底部间距
|
|
padding: 4px; // 增加内边距
|
|
> .item {
|
|
background: unset;
|
|
border-radius: 12px;
|
|
padding: 8px 16px !important; // 增加内边距
|
|
font-weight: 500; // 增加字体粗细
|
|
transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果
|
|
&.active {
|
|
background: ${themeVars.color.menu};
|
|
box-shadow: ${themeVars.github.shadow.floating.small};
|
|
font-weight: 600;
|
|
// 移除 transform 以避免创建新的层叠上下文
|
|
// transform: translateY(-1px); // 轻微上移效果
|
|
}
|
|
&::before {
|
|
display: none;
|
|
}
|
|
&:not(.active) {
|
|
border-radius: 8px; // 增加圆角
|
|
margin: 4px !important; // 调整边距
|
|
width: calc(50% - 8px); // 调整宽度
|
|
&:hover {
|
|
background: ${themeVars.github.control.transparent.bgColor.hover};
|
|
position: relative;
|
|
top: -1px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 仓库/组织列表标题
|
|
.ui.top.attached.header {
|
|
border: 0;
|
|
font-size: 20px;
|
|
font-weight: 600; // 增加字体粗细
|
|
background-color: unset !important;
|
|
margin-bottom: 0.25rem;
|
|
padding: 16px 20px; // 增加内边距
|
|
}
|
|
// 仓库/组织列表
|
|
.ui.attached.segment {
|
|
background-color: ${themeVars.color.menu};
|
|
border: unset !important;
|
|
box-shadow: ${themeVars.github.shadow.floating.small};
|
|
margin-bottom: 16px; // 增加底部间距
|
|
&.repos-search {
|
|
border-top-left-radius: 12px;
|
|
border-top-right-radius: 12px;
|
|
padding: 16px; // 增加内边距
|
|
}
|
|
&.table {
|
|
&:last-child {
|
|
border-bottom-left-radius: 12px !important;
|
|
border-bottom-right-radius: 12px !important;
|
|
}
|
|
ul {
|
|
padding: 8px;
|
|
li {
|
|
border-radius: 8px; // 增加圆角
|
|
padding: 12px 16px !important; // 增加内边距
|
|
margin: 4px 0; // 增加垂直间距
|
|
transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果
|
|
&:not(:last-child) {
|
|
border-bottom: 0;
|
|
}
|
|
&:hover {
|
|
background: ${themeVars.github.control.transparent.bgColor.hover};
|
|
position: relative;
|
|
left: 2px;
|
|
}
|
|
a.muted:hover {
|
|
color: inherit;
|
|
text-decoration-line: none;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 组织列表
|
|
.ui.tab.dashboard-orgs .ui.attached.segment.table {
|
|
border-top-left-radius: 12px;
|
|
border-top-right-radius: 12px;
|
|
}
|
|
}
|
|
`;
|
|
|
|
// 导航栏的工单/PR/里程碑仪表板
|
|
export const dashboardIssues = css`
|
|
.page-content.dashboard.issues {
|
|
.list-header {
|
|
background-color: ${themeVars.color.box.header};
|
|
border: 1px solid ${themeVars.color.light.border};
|
|
border-bottom: 0;
|
|
border-top-left-radius: 12px; // 增加圆角
|
|
border-top-right-radius: 12px; // 增加圆角
|
|
height: 54px;
|
|
padding: 16px 16px; // 增加内边距
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); // 添加阴影
|
|
.list-header-toggle {
|
|
align-items: center;
|
|
border: 0;
|
|
> .item {
|
|
background: unset !important;
|
|
border-radius: 8px; // 增加圆角
|
|
color: ${themeVars.color.text.light.num1};
|
|
padding: 0px 16px; // 增加内边距
|
|
height: 36px; // 增加高度
|
|
font-weight: 500; // 增加字体粗细
|
|
transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果
|
|
&:before {
|
|
display: none;
|
|
}
|
|
&:hover {
|
|
background: ${themeVars.github.control.transparent.bgColor.hover} !important;
|
|
position: relative;
|
|
top: -1px;
|
|
}
|
|
&.active {
|
|
color: ${themeVars.color.text.self};
|
|
font-weight: 700;
|
|
background: ${themeVars.color.active} !important; // 添加背景色
|
|
}
|
|
}
|
|
}
|
|
.list-header-filters {
|
|
> .item {
|
|
border-radius: 8px; // 增加圆角
|
|
color: ${themeVars.color.text.light.num1};
|
|
padding: 0px 16px; // 增加内边距
|
|
height: 36px; // 增加高度
|
|
font-weight: 500; // 增加字体粗细
|
|
transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果
|
|
&:hover {
|
|
background: ${themeVars.github.control.transparent.bgColor.hover};
|
|
position: relative;
|
|
top: -1px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
// 避免手机/平板下菜单错位
|
|
export const issueListMobile = css`
|
|
@media (max-width: 767.98px) {
|
|
.page-content.dashboard.issues .list-header {
|
|
height: auto;
|
|
padding: 12px; // 调整内边距
|
|
}
|
|
|
|
// 移动端优化
|
|
.list-header-toggle,
|
|
.list-header-filters {
|
|
flex-wrap: wrap; // 允许换行
|
|
gap: 8px; // 增加间距
|
|
}
|
|
|
|
.list-header-toggle > .item,
|
|
.list-header-filters > .item {
|
|
flex: 1 1 auto; // 自适应宽度
|
|
min-width: calc(50% - 4px); // 最小宽度
|
|
text-align: center; // 文本居中
|
|
}
|
|
}
|
|
`;
|
|
|
|
// 修复仪表板下二级面板选择菜单组织的标签间隔
|
|
export const fixOrgLabel = css`
|
|
.dashboard .secondary-nav .org-visibility .label {
|
|
margin-right: 0;
|
|
}
|
|
|
|
// 增强组织可见性标签样式
|
|
.dashboard .secondary-nav .org-visibility .label {
|
|
padding: 4px 12px; // 增加内边距
|
|
border-radius: 25px; // 增加圆角
|
|
font-weight: 500; // 增加字体粗细
|
|
transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果
|
|
&:hover {
|
|
position: relative;
|
|
top: -1px;
|
|
}
|
|
}
|
|
`; |