mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2025-10-26 21:20:31 +00:00
部分 dropdown 迁移和其他细节修复
This commit is contained in:
@@ -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