You've already forked gitea-banana-theme
155 lines
5.1 KiB
TypeScript
155 lines
5.1 KiB
TypeScript
import { css, customThemeVars, themeVars } from "src/types/vars";
|
|
|
|
// 克隆按钮的弹窗
|
|
export const clone = css`
|
|
.tippy-box {
|
|
.clone-panel-popup {
|
|
//标题和克隆地址
|
|
> .clone-panel-field {
|
|
margin-left: 16px;
|
|
margin-right: 16px;
|
|
//标题
|
|
&:first-of-type {
|
|
font-weight: 600;
|
|
margin-top: 16px;
|
|
font-size: 16px; // 增加字体大小
|
|
}
|
|
}
|
|
// 按钮组
|
|
.clone-panel-tab {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin: 16px; // 增加外边距
|
|
padding: 4px; // 增加内边距
|
|
background-color: ${themeVars.color.hover.self}; // 添加背景色
|
|
border-radius: 12px; // 增加圆角
|
|
// 按钮
|
|
.item {
|
|
color: ${themeVars.color.text.self};
|
|
font-weight: 600;
|
|
padding: 8px 12px; // 增加内边距
|
|
margin: 4px; // 调整外边距
|
|
border-radius: 8px; // 增加圆角
|
|
transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果
|
|
&:hover {
|
|
background: ${themeVars.github.control.transparent.bgColor.hover};
|
|
transform: translateY(-1px); // 轻微上移效果
|
|
}
|
|
&.active:after {
|
|
content: "";
|
|
display: block;
|
|
position: absolute;
|
|
bottom: -8px;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 2px;
|
|
background: ${themeVars.github.underlineNav.borderColor.active};
|
|
border-radius: 8px; // 增加圆角
|
|
}
|
|
}
|
|
.item.active {
|
|
border-bottom: 0;
|
|
position: relative;
|
|
background-color: ${themeVars.color.menu}; // 添加背景色
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); // 添加阴影
|
|
}
|
|
}
|
|
// 克隆地址
|
|
.ui.input.action {
|
|
margin: 0 16px 16px 16px; // 增加外边距
|
|
> input {
|
|
border: 1px solid ${themeVars.color.light.border};
|
|
border-radius: 8px; // 增加圆角
|
|
font-family: var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace);
|
|
min-width: 150px;
|
|
max-width: 400px;
|
|
width: ${customThemeVars.cloneMenuWidth};
|
|
padding: 8px 12px; // 增加内边距
|
|
font-size: 14px; // 增加字体大小
|
|
transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果
|
|
&:hover {
|
|
border: 1px solid ${themeVars.color.light.border};
|
|
border-radius: 8px; // 增加圆角
|
|
}
|
|
&:focus,
|
|
&:focus-visible {
|
|
border-color: ${themeVars.github.borderColor.accent.emphasis};
|
|
box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.2); // 增强焦点效果
|
|
}
|
|
}
|
|
.ui.ui.ui.button {
|
|
background-color: unset;
|
|
border: unset;
|
|
border-radius: 8px; // 增加圆角
|
|
color: ${themeVars.color.text.light.num1};
|
|
padding: 0;
|
|
width: 36px; // 增加宽度
|
|
height: 36px; // 增加高度
|
|
margin-left: 8px; // 增加左边距
|
|
transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果
|
|
&:hover {
|
|
background-color: ${themeVars.github.control.transparent.bgColor.hover};
|
|
transform: scale(1.05); // 轻微放大效果
|
|
}
|
|
svg {
|
|
width: 18px; // 增加宽度
|
|
height: 18px; // 增加高度
|
|
}
|
|
}
|
|
}
|
|
// 面板操作列表之间的分割线
|
|
.divider {
|
|
margin: 0;
|
|
border-color: ${themeVars.color.light.border}; // 使用主题色
|
|
}
|
|
// 面板操作列表
|
|
.clone-panel-list {
|
|
margin: 8px;
|
|
.item {
|
|
border-radius: 8px; // 增加圆角
|
|
padding: 8px 12px; // 增加内边距
|
|
line-height: 1.5;
|
|
margin: 4px 8px; // 调整外边距
|
|
transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1); // 添加过渡效果
|
|
svg {
|
|
color: ${themeVars.color.text.light.num1};
|
|
margin-right: 0.5rem; // 增加右边距
|
|
width: 16px; // 增加宽度
|
|
height: 16px; // 增加高度
|
|
}
|
|
&:hover {
|
|
color: ${themeVars.color.text.self};
|
|
text-decoration: none;
|
|
background: ${themeVars.github.control.transparent.bgColor.hover};
|
|
transform: translateX(2px); // 轻微右移效果
|
|
}
|
|
}
|
|
> .item:hover {
|
|
color: ${themeVars.color.text.self};
|
|
text-decoration: none;
|
|
background: ${themeVars.github.control.transparent.bgColor.hover};
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// 移动端优化
|
|
@media (max-width: 767.98px) {
|
|
.tippy-box .clone-panel-popup {
|
|
.clone-panel-tab .item {
|
|
padding: 6px 10px; // 调整内边距
|
|
}
|
|
|
|
.ui.input.action {
|
|
> input {
|
|
padding: 6px 10px; // 调整内边距
|
|
font-size: 13px; // 调整字体大小
|
|
}
|
|
.ui.ui.ui.button {
|
|
width: 32px; // 调整宽度
|
|
height: 32px; // 调整高度
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`; |