mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-27 05:31:04 +00:00
同步 Issue/PR 的时间线样式
This commit is contained in:
1
.github/release.md
vendored
1
.github/release.md
vendored
@@ -4,6 +4,7 @@
|
||||
|
||||
- 同步 PR 的合并提交头像样式
|
||||
- 同步 PR 中的合并提交按钮颜色
|
||||
- 同步 Issue/PR 的时间线样式
|
||||
|
||||
## 🎈 Perf
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -158,6 +158,12 @@ export const github = {
|
||||
},
|
||||
},
|
||||
control: {
|
||||
bgColor: {
|
||||
/** 背景色
|
||||
* @issue `timeline` 时间线标签背景色
|
||||
*/
|
||||
rest: null,
|
||||
},
|
||||
transparent: {
|
||||
bgColor: {
|
||||
/** 悬停色
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,3 +138,37 @@ export const prMerge = css`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 时间线
|
||||
export const timeline = css`
|
||||
.repository.view.issue {
|
||||
.comment-list .timeline-item {
|
||||
// 事件
|
||||
&.event {
|
||||
.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 {
|
||||
.badge svg {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
// 仅覆盖左侧 commit 不覆盖右侧 SHA
|
||||
a.muted {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
&:hover {
|
||||
color: ${themeVars.color.primary.self};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user