mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-27 13:40:31 +00:00
动画迁移 & 部分 PR 样式 (#7)
* 弹窗动画 * 优化 PR 中的合并提交按钮颜色 * 优化按钮样式 * 同步 PR 的合并提交头像样式 * 同步 Issue/PR 的时间线样式 * Issue/PR 的时间线样式间隔和大小 * 同步 PR 的合并提交操作面板样式 * PR 操作间隔 * green * PR 操作边框色 * 已合并颜色 * 仓库同步派生栏样式同步 * 动画迁移 & 一些圆角修复 * 修复工单下依赖工单选择框 * 评论标题颜色&分支字体&提交栏样式 --------- Co-authored-by: lutinglt <lutinglt@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { animationDown } from "src/core/theme";
|
||||
import { css, otherThemeVars, themeVars } from "src/types/vars";
|
||||
|
||||
// 仓库 Actions 页面
|
||||
@@ -57,6 +58,7 @@ export const actions = css`
|
||||
.run-list-ref {
|
||||
background-color: ${themeVars.github.bgColor.accent.muted};
|
||||
color: ${themeVars.github.fgColor.accent};
|
||||
font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace);
|
||||
font-weight: 400;
|
||||
&:hover {
|
||||
background-color: ${themeVars.github.bgColor.accent.muted};
|
||||
@@ -132,6 +134,7 @@ export const actionViewHeader = css`
|
||||
.ui.label {
|
||||
background-color: ${themeVars.github.bgColor.accent.muted};
|
||||
color: ${themeVars.github.fgColor.accent};
|
||||
font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace);
|
||||
font-weight: 400;
|
||||
> a {
|
||||
opacity: 1;
|
||||
@@ -212,6 +215,7 @@ export const actionViewRight = css`
|
||||
}
|
||||
|
||||
.job-step-container {
|
||||
// 步骤标题
|
||||
.job-step-summary {
|
||||
color: ${themeVars.color.console.fg.subtle};
|
||||
padding: 8px 10px;
|
||||
@@ -238,12 +242,16 @@ export const actionViewRight = css`
|
||||
}
|
||||
}
|
||||
}
|
||||
/* 日志字体颜色白色 */
|
||||
.job-log-line {
|
||||
color: ${themeVars.color.console.fg.self};
|
||||
/* 被 hover 时覆盖 ANSI 颜色 */
|
||||
.log-msg:hover * {
|
||||
color: ${themeVars.color.console.fg.self} !important;
|
||||
// 步骤日志
|
||||
.job-step-logs {
|
||||
animation: ${animationDown};
|
||||
/* 日志字体颜色白色 */
|
||||
.job-log-line {
|
||||
color: ${themeVars.color.console.fg.self};
|
||||
/* 被 hover 时覆盖 ANSI 颜色 */
|
||||
.log-msg:hover * {
|
||||
color: ${themeVars.color.console.fg.self} !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,12 +16,15 @@ export const branchButton = css`
|
||||
}
|
||||
`;
|
||||
|
||||
// 仓库按钮
|
||||
export const repoButton = css`
|
||||
// 仓库同步派生
|
||||
export const syncFork = css`
|
||||
.page-content.repository.file.list {
|
||||
// clone 按钮调整
|
||||
.repo-button-row .repo-button-row-right .ui.primary.button span {
|
||||
margin: 0px 3px;
|
||||
.repo-home-filelist > .ui.message {
|
||||
background: ${themeVars.color.box.header};
|
||||
padding: 8px 8px 8px 16px;
|
||||
.ui.button {
|
||||
min-width: 96px;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -107,6 +110,29 @@ export const repoFilesMobile = css`
|
||||
}
|
||||
`;
|
||||
|
||||
// 仓库打开文件时的视图
|
||||
export const repoFileView = css`
|
||||
.page-content.repository.file.list {
|
||||
.repo-view-container {
|
||||
// 右侧文件视图内容
|
||||
.repo-view-content {
|
||||
// 头部提交信息
|
||||
#repo-file-commit-box {
|
||||
padding: 8px 12px;
|
||||
> .latest-commit {
|
||||
gap: 8px;
|
||||
}
|
||||
// 右侧提交时间
|
||||
> .age {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 仓库代码布局调整, 侧边栏宽度调整
|
||||
export const repoGrid = css`
|
||||
.repo-grid-filelist-sidebar {
|
||||
@@ -198,7 +224,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,8 +67,19 @@ export const prBranch = css`
|
||||
#issue-list .flex-item-body .branches .branch {
|
||||
color: ${themeVars.github.fgColor.accent};
|
||||
background-color: ${themeVars.github.bgColor.accent.muted};
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace);
|
||||
font-size: 12px;
|
||||
padding: 0 5px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.repository.view.issue .pull-desc code {
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
a:hover {
|
||||
text-decoration-line: none;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -94,6 +102,10 @@ export const comment = css`
|
||||
}
|
||||
}
|
||||
.comment-header-right {
|
||||
> .item,
|
||||
> .label {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
.context-dropdown {
|
||||
// 评论菜单的删除按钮
|
||||
.menu .item.delete-comment {
|
||||
@@ -121,3 +133,142 @@ export const dropdown = css`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// PR 界面的 PR 操作评论
|
||||
export const prMerge = css`
|
||||
.repository.view.issue .comment-list .timeline-item.pull-merge-box {
|
||||
// 头像
|
||||
.timeline-avatar {
|
||||
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;
|
||||
}
|
||||
// 可以合并
|
||||
&.green {
|
||||
background-color: ${themeVars.github.bgColor.success.emphasis};
|
||||
// 操作评论边框色
|
||||
+ .content > .ui.attached.segment {
|
||||
border-left-color: ${themeVars.github.bgColor.success.emphasis};
|
||||
border-right-color: ${themeVars.github.bgColor.success.emphasis};
|
||||
&:first-child {
|
||||
border-top-color: ${themeVars.github.bgColor.success.emphasis};
|
||||
}
|
||||
&:last-child {
|
||||
border-bottom-color: ${themeVars.github.bgColor.success.emphasis};
|
||||
}
|
||||
}
|
||||
}
|
||||
// 已合并
|
||||
&.purple {
|
||||
background-color: ${themeVars.github.bgColor.done.emphasis};
|
||||
+ .content > .ui.attached.segment {
|
||||
border-left-color: ${themeVars.github.bgColor.done.emphasis};
|
||||
border-right-color: ${themeVars.github.bgColor.done.emphasis};
|
||||
&:first-child {
|
||||
border-top-color: ${themeVars.github.bgColor.done.emphasis};
|
||||
}
|
||||
&:last-child {
|
||||
border-bottom-color: ${themeVars.github.bgColor.done.emphasis};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 检查状态
|
||||
.commit-status-panel {
|
||||
.commit-status-header {
|
||||
background: ${themeVars.color.body};
|
||||
padding: 16px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
.ui.right {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
// 检查状态列表
|
||||
.commit-status-list {
|
||||
background: ${themeVars.color.menu};
|
||||
.commit-status-item {
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
padding: 2px 8px;
|
||||
margin: 0px 8px;
|
||||
height: 37px;
|
||||
&:first-child {
|
||||
margin-top: 8px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
&:hover {
|
||||
background-color: ${themeVars.color.hover.opaque};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 合并信息和操作
|
||||
.merge-section {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
padding: 16px;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 时间线
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user