mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-28 07:00:32 +00:00
部分 dropdown 迁移和其他细节修复
This commit is contained in:
92
styles/components/clone.tsx
Normal file
92
styles/components/clone.tsx
Normal file
@@ -0,0 +1,92 @@
|
||||
import { css, otherThemeVars, themeVars } from "src/types/vars";
|
||||
|
||||
// 克隆按钮的弹窗
|
||||
export const clone = css`
|
||||
.tippy-box {
|
||||
.clone-panel-popup {
|
||||
//标题
|
||||
.clone-panel-field:first-of-type {
|
||||
font-weight: bold;
|
||||
margin-top: 16px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
// 按钮组
|
||||
.clone-panel-tab {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-left: 12px;
|
||||
// 按钮
|
||||
.item {
|
||||
color: ${themeVars.color.text.self};
|
||||
font-weight: 600;
|
||||
padding: 6px 8px;
|
||||
margin: 8px 0;
|
||||
&:hover {
|
||||
background: ${themeVars.github.control.transparent.bgColor.hover};
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
}
|
||||
&.active:after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: #f78166;
|
||||
}
|
||||
}
|
||||
.item.active {
|
||||
border-bottom: 0;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
// 克隆地址
|
||||
.ui.input.action {
|
||||
> input,
|
||||
> input:hover {
|
||||
border: 1px solid ${themeVars.color.light.border};
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
}
|
||||
> input:focus,
|
||||
> input:focus-visible {
|
||||
border-color: ${themeVars.github.borderColor.accent.emphasis};
|
||||
}
|
||||
.ui.ui.ui.button {
|
||||
background-color: unset;
|
||||
border: unset;
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
padding: 5px 10px;
|
||||
margin-left: 5px;
|
||||
&:hover {
|
||||
background-color: ${themeVars.github.control.transparent.bgColor.hover};
|
||||
}
|
||||
}
|
||||
}
|
||||
// 面板操作列表之间的分割线
|
||||
.divider {
|
||||
margin: 0;
|
||||
}
|
||||
// 面板操作列表
|
||||
.clone-panel-list {
|
||||
margin: 8px;
|
||||
.item {
|
||||
border-radius: ${otherThemeVars.border.radius};
|
||||
padding: 6px 8px;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
svg {
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
}
|
||||
> .item:hover {
|
||||
color: ${themeVars.color.text.self};
|
||||
text-decoration: none;
|
||||
background: ${themeVars.github.control.transparent.bgColor.hover};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -1,4 +1,5 @@
|
||||
import "./actions";
|
||||
import "./clone";
|
||||
import "./dashboard";
|
||||
import "./diff";
|
||||
import "./issue";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { css, themeVars } from "src/types/vars";
|
||||
|
||||
// 提交列表
|
||||
export const commit = css`
|
||||
.page-content.repository {
|
||||
// 提交列表 (选择器保证同等优先级覆盖了 gitea 原生的样式)
|
||||
@@ -21,6 +22,15 @@ export const commit = css`
|
||||
margin-left: -8px;
|
||||
}
|
||||
}
|
||||
// 提交信息
|
||||
.message {
|
||||
// tag 标签
|
||||
a.ui.basic.primary.label {
|
||||
border-radius: 25px;
|
||||
border-width: 1.5px;
|
||||
padding: 5px 8px !important;
|
||||
}
|
||||
}
|
||||
// 提交信息右侧
|
||||
.tw-text-right {
|
||||
// 时间标签
|
||||
|
||||
@@ -16,84 +16,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// clone 下拉菜单
|
||||
.tippy-box {
|
||||
margin-top: -3px;
|
||||
background: var(--color-box-header);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
box-shadow:
|
||||
0px 0px 0px 0.5px #30363d,
|
||||
0px 6px 12px -3px rgba(1, 4, 9, 0.4),
|
||||
0px 6px 18px 0px rgba(1, 4, 9, 0.4);
|
||||
animation: 200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running overlay-appear;
|
||||
|
||||
.clone-panel-field {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.flex-text-block.clone-panel-field {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.clone-panel-tab {
|
||||
margin-left: 16px;
|
||||
|
||||
button {
|
||||
color: #f0f6fc !important;
|
||||
font-weight: 600;
|
||||
padding: 6px 8px;
|
||||
margin: 8px 0;
|
||||
|
||||
&:hover {
|
||||
background: var(--color-hover);
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
&.active:after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: #f78166;
|
||||
}
|
||||
}
|
||||
|
||||
.item.active {
|
||||
border-bottom: 0;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
.flex-items-block {
|
||||
margin: 0;
|
||||
|
||||
.item {
|
||||
display: block;
|
||||
padding: 8px 10px;
|
||||
text-align: left;
|
||||
text-transform: none;
|
||||
line-height: 1em;
|
||||
margin: 0;
|
||||
|
||||
svg {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
> .item:hover {
|
||||
color: var(--color-text);
|
||||
text-decoration: none;
|
||||
background: var(--color-hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 下拉菜单
|
||||
.ui.dropdown .menu {
|
||||
margin-top: 3.75px !important;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "./button"; // 按钮
|
||||
import "./chroma"; // 代码高亮
|
||||
import "./codemirror"; // codemirror 样式
|
||||
import "./tippy";
|
||||
import "./input"; // 输入框
|
||||
import "./label"; // 标签
|
||||
import "./modal"; // 弹窗
|
||||
|
||||
@@ -87,33 +87,21 @@ export const shaLabel = css`
|
||||
&.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -155,6 +143,7 @@ export const repoLabel = css`
|
||||
.org-visibility div {
|
||||
&.ui.basic.label {
|
||||
background-color: unset;
|
||||
color: ${themeVars.color.text.light.num1};
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -166,6 +155,7 @@ export const packagesLabel = css`
|
||||
> .ui.container > div > .flex-list {
|
||||
// 软件包类型的标签
|
||||
.ui.label {
|
||||
background-color: unset;
|
||||
border: 1px solid ${themeVars.color.light.border};
|
||||
color: ${themeVars.color.primary.self};
|
||||
}
|
||||
|
||||
30
styles/public/tippy.tsx
Normal file
30
styles/public/tippy.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { overlayAppear } from "src/core/theme";
|
||||
import { css, themeVars } from "src/types/vars";
|
||||
|
||||
// 一些界面内的弹窗, 比如克隆按钮, PR信息, Runner信息 等
|
||||
export const tippyBox = css`
|
||||
.tippy-box {
|
||||
margin-top: -3px;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
animation: 200ms cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running ${overlayAppear};
|
||||
// 边框线同步 github 样式
|
||||
&[data-theme="default"],
|
||||
&[data-theme="box-with-header"] {
|
||||
border: unset;
|
||||
box-shadow:
|
||||
0px 0px 0px 1px ${themeVars.color.light.border},
|
||||
0px 6px 12px -3px ${themeVars.color.shadow.self},
|
||||
0px 6px 18px 0px ${themeVars.color.shadow.self};
|
||||
}
|
||||
// 带标题的弹窗 (Runner信息)
|
||||
&[data-theme="box-with-header"] {
|
||||
.tippy-content {
|
||||
background-color: ${themeVars.color.menu};
|
||||
.ui.attached.header {
|
||||
background-color: ${themeVars.color.body};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user