mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-27 05:31:04 +00:00
dashboard 和 label 迁移
This commit is contained in:
@@ -1,118 +0,0 @@
|
||||
// Made by Luting ^-^
|
||||
|
||||
span,
|
||||
.org-visibility div {
|
||||
&.ui.basic.label {
|
||||
border-radius: 25px;
|
||||
background-color: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.ui.ui.ui {
|
||||
&.primary.label {
|
||||
color: var(--color-blue);
|
||||
background-color: #388bfd33;
|
||||
border: 1px solid var(--color-blue);
|
||||
}
|
||||
|
||||
&.basic.primary.label {
|
||||
color: var(--color-blue);
|
||||
background-color: #388bfd33 !important;
|
||||
border-color: #1f6feb !important;
|
||||
}
|
||||
|
||||
// 发布&Runner 状态标签
|
||||
&.green.label:not(.issue-state-label) {
|
||||
background: unset;
|
||||
border-color: #238636;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 25px;
|
||||
color: #3fb950;
|
||||
}
|
||||
|
||||
&.orange.label:not(.issue-state-label) {
|
||||
background: unset;
|
||||
border-color: #9e6a03;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 25px;
|
||||
color: #d29922;
|
||||
}
|
||||
}
|
||||
|
||||
a.ui.ui.ui {
|
||||
&.primary.label:hover {
|
||||
color: #fff;
|
||||
background: #1f6feb;
|
||||
border-color: #1f6feb;
|
||||
}
|
||||
|
||||
&.basic.primary.label:hover {
|
||||
color: #79c0ff;
|
||||
background-color: #3a83fd5c !important;
|
||||
}
|
||||
}
|
||||
|
||||
// Runner&软件包&提交 标签
|
||||
.ui.label {
|
||||
&.sha {
|
||||
color: #919894;
|
||||
background-color: var(--color-box-header);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--color-hover);
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.basic, .sha, .commit-id-short, .commit-sign-badge) {
|
||||
color: var(--color-blue);
|
||||
background: #121d2f;
|
||||
border-radius: 25px;
|
||||
}
|
||||
|
||||
&.task-status-success {
|
||||
color: var(--color-success-text);
|
||||
border: 1px solid var(--color-success-border);
|
||||
background: var(--color-success-bg);
|
||||
}
|
||||
|
||||
&.task-status-failure {
|
||||
color: var(--color-error-text);
|
||||
border: 1px solid var(--color-error-border);
|
||||
background: var(--color-error-bg);
|
||||
}
|
||||
|
||||
&.task-status-running,
|
||||
&.task-status-skipped {
|
||||
color: var(--color-info-text);
|
||||
border: 1px solid var(--color-info-border);
|
||||
background: var(--color-info-bg);
|
||||
}
|
||||
|
||||
&.task-status-cancelled,
|
||||
&.task-status-blocked {
|
||||
color: var(--color-warning-text);
|
||||
border: 1px solid var(--color-warning-border);
|
||||
background: var(--color-warning-bg);
|
||||
}
|
||||
|
||||
> a {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
a.ui.label:not(.basic, .sha, .commit-id-short, .commit-sign-badge):hover {
|
||||
color: #fff;
|
||||
background: #1f6feb;
|
||||
border-radius: 25px;
|
||||
}
|
||||
.sha .ui.label.sha {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.repository #commits-table .commit-list .sha .ui.label {
|
||||
line-height: 18px;
|
||||
margin-top: 0.375rem;
|
||||
margin-bottom: 0.375rem;
|
||||
margin-left: -2px;
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
import { css, themeVars } from "src/types/vars";
|
||||
|
||||
export const label = css`
|
||||
/* 所有标签, 但不包括 a 标签 */
|
||||
/* a 标签比如仓库点星等按钮旁边的数字标签按钮,提交图中的 tag 标签 */
|
||||
div,
|
||||
span {
|
||||
&.ui.ui.ui {
|
||||
&.label {
|
||||
border-radius: 25px;
|
||||
/* 主色调标签 */
|
||||
&.primary {
|
||||
background-color: unset;
|
||||
border: 1px solid ${themeVars.color.primary.self};
|
||||
color: ${themeVars.color.primary.self};
|
||||
}
|
||||
/* 红色标签 */
|
||||
&.red {
|
||||
background-color: unset;
|
||||
border: 1px solid ${themeVars.github.borderColor.done.emphasis};
|
||||
color: ${themeVars.color.purple.self};
|
||||
}
|
||||
/* 橙色标签 */
|
||||
&.orange {
|
||||
background-color: unset;
|
||||
border: 1px solid ${themeVars.github.borderColor.attention.emphasis};
|
||||
color: ${themeVars.color.yellow.self};
|
||||
}
|
||||
/* 黄色标签 */
|
||||
&.yellow {
|
||||
background-color: unset;
|
||||
border: 1px solid ${themeVars.github.borderColor.attention.emphasis};
|
||||
color: ${themeVars.color.orange.self};
|
||||
}
|
||||
/* 黄绿色标签 */
|
||||
&.olive {
|
||||
background-color: unset;
|
||||
border: 1px solid ${themeVars.color.olive.self};
|
||||
color: ${themeVars.color.olive.self};
|
||||
}
|
||||
/* 绿色标签 */
|
||||
&.green {
|
||||
background-color: unset;
|
||||
border: 1px solid ${themeVars.github.borderColor.success.emphasis};
|
||||
color: ${themeVars.color.green.self};
|
||||
}
|
||||
/* 紫色标签 */
|
||||
&.purple {
|
||||
background-color: unset;
|
||||
border: 1px solid ${themeVars.github.borderColor.done.emphasis};
|
||||
color: ${themeVars.color.purple.self};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 提交中的 SHA 标签
|
||||
export const shaLabel = css`
|
||||
a.ui.label.sha,
|
||||
a.ui.label.commit-id-short {
|
||||
border: unset;
|
||||
background-color: unset;
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
&:hover {
|
||||
background-color: ${themeVars.color.label.hoverBg};
|
||||
}
|
||||
// 验证提交 SHA 标签
|
||||
&.commit-is-signed {
|
||||
border: unset !important;
|
||||
background-color: unset !important;
|
||||
&:hover {
|
||||
background-color: ${themeVars.color.label.hoverBg} !important;
|
||||
}
|
||||
span.ui.label.commit-is-signed {
|
||||
padding: 3px 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 验证提交附带的图标
|
||||
span.ui.label.commit-is-signed {
|
||||
// 验证信任
|
||||
&.sign-trusted {
|
||||
border: 1.5px solid ${themeVars.color.green.badge.self} !important;
|
||||
color: ${themeVars.color.green.badge.self} !important;
|
||||
&:hover {
|
||||
background-color: ${themeVars.color.green.badge.hover.bg} !important;
|
||||
}
|
||||
}
|
||||
// 验证未信任
|
||||
&.sign-untrusted {
|
||||
border: 1.5px solid ${themeVars.color.yellow.badge.self} !important;
|
||||
color: ${themeVars.color.yellow.badge.self} !important;
|
||||
&:hover {
|
||||
background-color: ${themeVars.color.yellow.badge.hover.bg} !important;
|
||||
}
|
||||
}
|
||||
// 验证未匹配
|
||||
&.sign-unmatched {
|
||||
border: 1.5px solid ${themeVars.color.orange.badge.self} !important;
|
||||
color: ${themeVars.color.orange.badge.self} !important;
|
||||
&:hover {
|
||||
background-color: ${themeVars.color.orange.badge.hover.bg} !important;
|
||||
}
|
||||
}
|
||||
// 验证警告
|
||||
&.sign-warning {
|
||||
border: 1.5px solid ${themeVars.color.red.badge.self} !important;
|
||||
color: ${themeVars.color.red.badge.self} !important;
|
||||
&:hover {
|
||||
background-color: ${themeVars.color.red.badge.hover.bg} !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 任务状态标签, 目前仅在管理员页面 Runner 状态中看到
|
||||
export const taskStatusLabel = css`
|
||||
.ui.label.task-status- {
|
||||
&success {
|
||||
color: ${themeVars.color.success.text};
|
||||
border: 1px solid ${themeVars.color.success.border};
|
||||
background: ${themeVars.color.success.bg};
|
||||
}
|
||||
|
||||
&failure {
|
||||
color: ${themeVars.color.error.text};
|
||||
border: 1px solid ${themeVars.color.error.border};
|
||||
background: ${themeVars.color.error.bg.self};
|
||||
}
|
||||
|
||||
&running,
|
||||
&skipped {
|
||||
color: ${themeVars.color.info.text};
|
||||
border: 1px solid ${themeVars.color.info.border};
|
||||
background: ${themeVars.color.info.bg};
|
||||
}
|
||||
|
||||
&cancelled,
|
||||
&blocked {
|
||||
color: ${themeVars.color.warning.text};
|
||||
border: 1px solid ${themeVars.color.warning.border};
|
||||
background: ${themeVars.color.warning.bg};
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 仓库标签 (私有/公开/内部)
|
||||
export const repoLabel = css`
|
||||
span,
|
||||
.org-visibility div {
|
||||
&.ui.basic.label {
|
||||
background-color: unset;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 软件包列表
|
||||
export const packagesLabel = css`
|
||||
.page-content {
|
||||
&.packages {
|
||||
> .ui.container > div > .flex-list {
|
||||
// 软件包类型的标签
|
||||
.ui.label {
|
||||
border: 1px solid ${themeVars.color.light.border};
|
||||
color: ${themeVars.color.primary.self};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -266,3 +266,17 @@ export const onlyChild = css`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
// 修复一些情况下圆角边框线被覆盖的问题
|
||||
export const fixRadius = css`
|
||||
// 评论列表标题
|
||||
.repository.view.issue .comment-list .comment > .content > div:first-child {
|
||||
border-top-left-radius: ${otherThemeVars.border.radius};
|
||||
border-top-right-radius: ${otherThemeVars.border.radius};
|
||||
}
|
||||
// 评论列表内容
|
||||
.repository.view.issue .comment-list .comment > .content > div:last-child {
|
||||
border-bottom-left-radius: ${otherThemeVars.border.radius};
|
||||
border-bottom-right-radius: ${otherThemeVars.border.radius};
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user