mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-26 13:00:31 +00:00
Compare commits
6 Commits
v1.24.2.25
...
8792a43644
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8792a43644 | ||
|
|
453fc5383d | ||
|
|
4fa1d4ff18 | ||
|
|
efe5e6ecbb | ||
|
|
1c05717011 | ||
|
|
9804a4e5c6 |
9
.github/release.md
vendored
9
.github/release.md
vendored
@@ -2,11 +2,12 @@
|
||||
|
||||
#### 更符合 GitHub 风格
|
||||
|
||||
- 同步 PR 的合并提交头像样式
|
||||
- 同步 PR 中的合并提交按钮颜色
|
||||
- 同步 Issue/PR 的时间线样式
|
||||
|
||||
## 🎈 Perf
|
||||
|
||||
- 优化提交中 Action 状态标签的位置
|
||||
- 优化按钮和菜单下的图标颜色
|
||||
- 优化仓库发布中的分支选择按钮样式
|
||||
- 优化向上弹窗的菜单动画
|
||||
- 优化全局按钮样式
|
||||
|
||||
## 🐞 Fix
|
||||
|
||||
@@ -350,6 +350,9 @@ export function defineGithubTheme(githubColor: GithubColor): Theme {
|
||||
},
|
||||
},
|
||||
control: {
|
||||
bgColor: {
|
||||
rest: githubColor.control.bgColor.rest,
|
||||
},
|
||||
transparent: {
|
||||
bgColor: {
|
||||
hover: githubColor.control.transparent.bgColor.hover,
|
||||
|
||||
@@ -41,6 +41,7 @@ export const github = {
|
||||
success: {
|
||||
/** 成功的背景颜色
|
||||
* @issue `babel` 重新开启图标背景颜色
|
||||
* @issue `prMerge` 合并提交的图标背景色
|
||||
*/
|
||||
emphasis: null,
|
||||
},
|
||||
@@ -157,6 +158,12 @@ export const github = {
|
||||
},
|
||||
},
|
||||
control: {
|
||||
bgColor: {
|
||||
/** 背景色
|
||||
* @issue `timeline` 时间线标签背景色
|
||||
*/
|
||||
rest: null,
|
||||
},
|
||||
transparent: {
|
||||
bgColor: {
|
||||
/** 悬停色
|
||||
|
||||
@@ -16,16 +16,6 @@ export const branchButton = css`
|
||||
}
|
||||
`;
|
||||
|
||||
// 仓库按钮
|
||||
export const repoButton = css`
|
||||
.page-content.repository.file.list {
|
||||
// clone 按钮调整
|
||||
.repo-button-row .repo-button-row-right .ui.primary.button span {
|
||||
margin: 0px 3px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 仓库文件列表
|
||||
export const repoFiles = css`
|
||||
.repository.file.list {
|
||||
@@ -198,7 +188,7 @@ export const repoSidebarBottom = css`
|
||||
.color-icon {
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
margin-right: 6px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.tw-font-semibold {
|
||||
color: ${themeVars.color.text.self};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { css, themeVars } from "src/types/vars";
|
||||
import { css, otherThemeVars, themeVars } from "src/types/vars";
|
||||
import { activeItemAfterStyle } from "styles/public/menu";
|
||||
|
||||
export const button = css`
|
||||
@@ -26,17 +26,14 @@ export const babel = css`
|
||||
// 时间线打开状态标签
|
||||
&.tw-bg-green {
|
||||
background-color: ${themeVars.github.bgColor.success.emphasis} !important;
|
||||
border-color: ${themeVars.github.bgColor.success.emphasis} !important;
|
||||
}
|
||||
// 时间线关闭状态标签
|
||||
&.tw-bg-red {
|
||||
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||
}
|
||||
// 时间线合并状态标签
|
||||
&.tw-bg-purple {
|
||||
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,3 +118,73 @@ export const dropdown = css`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// PR 界面的 PR 操作评论头像
|
||||
export const prMerge = css`
|
||||
.repository.view.issue .comment-list .timeline-item.pull-merge-box {
|
||||
.timeline-avatar {
|
||||
background-color: ${themeVars.github.bgColor.success.emphasis};
|
||||
color: ${themeVars.color.text.self} !important;
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 时间线
|
||||
export const timeline = css`
|
||||
.repository.view.issue {
|
||||
.comment-list {
|
||||
.timeline-item,
|
||||
.timeline-item-group {
|
||||
padding: 16px 0;
|
||||
// 事件
|
||||
&.event {
|
||||
// 修复覆盖后的位置问题
|
||||
padding-left: 15px;
|
||||
.avatar {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.badge {
|
||||
border: 2px solid ${themeVars.color.body};
|
||||
}
|
||||
// 仅匹配只有 badge
|
||||
.badge:not([class*=" "]) {
|
||||
background-color: ${themeVars.github.control.bgColor.rest};
|
||||
svg {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
}
|
||||
}
|
||||
// 提交
|
||||
&.commits-list {
|
||||
// 每个提交之间的间隔
|
||||
.flex-text-block {
|
||||
padding-top: 4px;
|
||||
}
|
||||
.badge svg {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
// 仅覆盖左侧 commit 不覆盖右侧 SHA
|
||||
a.muted {
|
||||
font-size: 12px;
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
text-decoration-line: underline;
|
||||
&:hover {
|
||||
color: ${themeVars.color.primary.self};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -6,10 +6,6 @@ export const repoHeader = css`
|
||||
// 点星/关注/克隆/RSS 按钮
|
||||
.ui.compact.button {
|
||||
padding: 3px 12px;
|
||||
// 文本跟图标间隔, 文本在手机下不显示
|
||||
span {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
// 仓库图标
|
||||
img.ui.avatar {
|
||||
|
||||
@@ -18,14 +18,25 @@ export const baseButton = css`
|
||||
min-height: 30px;
|
||||
font-weight: 500;
|
||||
padding: 9px 16px;
|
||||
&.ui {
|
||||
gap: 8px;
|
||||
}
|
||||
}
|
||||
.ui.button:not(.primary):not(.red) svg {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
.ui.primary.button {
|
||||
${primaryStyle}
|
||||
&:hover {
|
||||
${primaryHoverStyle}
|
||||
// 主色调按钮保持白色
|
||||
.ui.primary.buttons .button svg {
|
||||
color: ${themeVars.color.text.self};
|
||||
}
|
||||
.ui.primary {
|
||||
&.button,
|
||||
// 按钮组, PR 里的压缩合并按钮
|
||||
&.buttons .button {
|
||||
${primaryStyle}
|
||||
&:hover {
|
||||
${primaryHoverStyle}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 主色调基本按钮和普通按钮一样
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { animationDown } from "src/core/theme";
|
||||
import { css, themeVars } from "src/types/vars";
|
||||
|
||||
export const modal = css`
|
||||
.ui.modal {
|
||||
animation: ${animationDown};
|
||||
border: 1.5px solid ${themeVars.color.light.border};
|
||||
|
||||
> .header {
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
textarea,
|
||||
.ui.form input,
|
||||
.menu .item,
|
||||
.ui.modal,
|
||||
.job-step-summary,
|
||||
.job-step-logs,
|
||||
.job-brief-item {
|
||||
|
||||
Reference in New Issue
Block a user