同步软件包页面样式

This commit is contained in:
lutinglt
2025-09-08 15:29:01 +08:00
parent c8634fb14b
commit e387008ee5
7 changed files with 196 additions and 99 deletions

1
.github/release.md vendored
View File

@@ -30,6 +30,7 @@
- 同步仓库已标星的星星颜色 - 同步仓库已标星的星星颜色
- 优化仪表板动态信息间隔 - 优化仪表板动态信息间隔
- 微调仓库相关界面元素间隔 - 微调仓库相关界面元素间隔
- 同步软件包页面样式
### 🐞 Fix ### 🐞 Fix

View File

@@ -1,7 +1,6 @@
{ {
"name": "gitea-github-theme", "name": "gitea-github-theme",
"version": "1.24.6", "version": "1.24.6",
"description": "A sophisticated theme to make Gitea look and feel like GitHub",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite build --mode dev", "dev": "vite build --mode dev",

View File

@@ -13,6 +13,7 @@ import "./milestones";
import "./newrepo"; import "./newrepo";
import "./notification"; import "./notification";
import "./org"; import "./org";
import "./packages";
import "./release"; import "./release";
import "./repo"; import "./repo";
import "./setting"; import "./setting";

View File

@@ -522,6 +522,7 @@ const sidebarPadding = {
// 侧边栏 // 侧边栏
export const issueSidebar = css` export const issueSidebar = css`
.repository.view.issue {
.issue-content { .issue-content {
gap: 24px; gap: 24px;
.issue-content-right { .issue-content-right {
@@ -622,4 +623,5 @@ export const issueSidebar = css`
} }
} }
} }
}
`; `;

View File

@@ -0,0 +1,105 @@
import { css, otherThemeVars, themeVars } from "src/types/vars";
// 组织/仓库的软件包列表(包含用户但未测试)
export const packagesList = css`
.page-content.packages {
// 这里必须要用 >, 否则会影响到软件包详细信息页的样式
> .ui.container > div:not([class]) {
border: 1px solid ${themeVars.color.light.border};
border-radius: ${otherThemeVars.border.radius};
margin-top: 16px;
.flex-list {
border-top: 1px solid ${themeVars.color.light.border};
&:first-child {
border-top: 0;
}
.flex-item {
padding: 16px;
.flex-item-main {
.flex-item-title {
gap: 8px;
> a {
min-height: 25px;
}
// 软件包类型的标签
.ui.label {
gap: 4px;
padding: 3px 6px;
min-height: 24.5px;
background-color: unset;
border: 1px solid ${themeVars.color.light.border};
color: ${themeVars.color.primary.self};
}
}
.flex-item-body {
font-size: 12px;
a {
text-decoration: underline;
text-underline-offset: 3px;
}
}
}
}
}
}
}
`;
// 软件包详细信息页
export const packagesDetail = css`
.page-content.packages {
.issue-title-header > div {
color: ${themeVars.color.text.light.num1};
}
.issue-content {
.issue-content-left {
.ui.top.attached.header {
font-size: 14px;
padding: 16px;
}
.ui.attached.segment {
color: ${themeVars.color.text.light.num1};
padding: 16px;
.ui.table,
.ui.form .field > label {
color: ${themeVars.color.text.light.num1};
}
.ui.form .field > label {
margin-bottom: 8px;
}
.markup {
color: ${themeVars.color.text.self};
pre {
font-size: 12px;
font-weight: 400;
padding: 12px 16px;
}
}
+ .ui.top.attached.header {
margin-top: 24px;
}
}
}
.issue-content-right {
border: 0;
padding: 0px 16px;
> strong {
font-size: 16px;
}
> .divider {
margin: 16px 0px;
}
// 详情
> .ui.relaxed.list {
margin: 16px 0px;
.item {
color: ${themeVars.color.text.light.num1};
svg {
color: ${themeVars.color.text.self};
}
}
}
}
}
}
`;

View File

@@ -120,4 +120,9 @@ export const fixButton = css`
.ui.ui.ui.ui.small.button { .ui.ui.ui.ui.small.button {
z-index: 0; z-index: 0;
} }
// 代码复制按钮
.ui.button.code-copy {
padding: 4px 6px;
min-height: 28px;
}
`; `;

View File

@@ -186,19 +186,3 @@ export const repoLabel = css`
font-size: 14px; font-size: 14px;
} }
`; `;
// 软件包列表
export const packagesLabel = css`
.page-content {
&.packages {
> .ui.container > div > .flex-list {
// 软件包类型的标签
.ui.label {
background-color: unset;
border: 1px solid ${themeVars.color.light.border};
color: ${themeVars.color.primary.self};
}
}
}
}
`;