插件UI
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-12-28 13:36:09 +08:00
parent 626b546a29
commit dbe2090549

View File

@@ -1,13 +1,56 @@
/* ============================================ /* ============================================
主题配置插件 - 现代化 UI 设计 黑果云模板控制器 - 清爽专业风格
设计理念:清晰、高效、美观 设计理念:简洁、可靠、商务化
============================================ */ ============================================ */
/* CSS 变量定义 - 统一配色方案 */
:root {
/* 主色调 - 专业蓝 */
--primary-color: #2563eb;
--primary-hover: #1d4ed8;
--primary-light: #eff6ff;
/* 背景色 - 清爽白灰 */
--bg-page: #f8fafc;
--bg-card: #ffffff;
--bg-section: #f1f5f9;
--bg-input: #ffffff;
/* 文字色 - 清晰层级 */
--text-primary: #0f172a;
--text-secondary: #64748b;
--text-tertiary: #94a3b8;
--text-disabled: #cbd5e1;
/* 边框色 */
--border-light: #e2e8f0;
--border-normal: #cbd5e1;
--border-dark: #94a3b8;
/* 功能色 */
--success: #10b981;
--warning: #f59e0b;
--danger: #ef4444;
/* 间距 */
--spacing-xs: 8px;
--spacing-sm: 12px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
/* 圆角 */
--radius-sm: 6px;
--radius-md: 8px;
--radius-lg: 12px;
}
/* 全局容器 */ /* 全局容器 */
.template { .template {
max-width: 1400px; max-width: 1400px;
margin: 0 auto; margin: 0 auto;
padding: 20px; padding: var(--spacing-lg);
background: var(--bg-page);
} }
/* 隐藏加载时的闪烁 */ /* 隐藏加载时的闪烁 */
@@ -15,293 +58,211 @@
display: none; display: none;
} }
/* 页面标题优化 */ /* ============================================
.template > h1 { 卡片样式
font-size: 28px; ============================================ */
font-weight: 700;
color: #1e293b;
margin-bottom: 24px;
padding-bottom: 16px;
border-bottom: 2px solid #e2e8f0;
display: flex;
align-items: center;
gap: 12px;
}
.template > h1::before {
content: '🎨';
font-size: 32px;
}
/* 卡片优化 - 增加层次感和呼吸感 */
.theme-card { .theme-card {
margin-bottom: 24px; background: var(--bg-card);
border-radius: 12px; border: 1px solid var(--border-light);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); border-radius: var(--radius-md);
transition: all 0.3s ease; margin-bottom: var(--spacing-lg);
overflow: hidden; overflow: hidden;
background: white;
} }
.theme-card:hover { /* 卡片标题 */
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
transform: translateY(-2px);
}
/* 卡片标题优化 */
.theme-card .t-card__title { .theme-card .t-card__title {
font-size: 18px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: #1e293b; color: var(--text-primary);
padding: 20px 24px; padding: 20px var(--spacing-lg);
border-bottom: 2px solid #f1f5f9; border-bottom: 1px solid var(--bg-section);
background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%); background: var(--bg-card);
} }
/* 卡片内容 */
.theme-card .t-card__body { .theme-card .t-card__body {
padding: 24px; padding: var(--spacing-lg);
} }
/* 表单网格 - 优化间距和布局 */ /* ============================================
表单样式
============================================ */
/* 表单网格布局 */
.form-grid { .form-grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-template-columns: repeat(2, 1fr);
gap: 24px; gap: var(--spacing-lg) 20px;
padding: 4px 0; padding: 4px 0;
} }
/* 表单项优化 */ /* 表单项 */
.form-item { .form-item {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 76px;
} }
.form-item--full { .form-item--full {
grid-column: 1 / -1; grid-column: 1 / -1;
} }
/* 标签样式优化 - 更清晰的视觉层次 */ /* 标签样式 */
.form-item label { .form-item label {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 500;
color: #374151; color: var(--text-secondary);
margin-bottom: 10px; margin-bottom: var(--spacing-xs);
display: flex;
align-items: center;
line-height: 1.5; line-height: 1.5;
} }
.form-item label::before { /* Switch 开关布局 */
content: '';
width: 3px;
height: 16px;
background: linear-gradient(180deg, #38BDF8 0%, #6366F1 100%);
border-radius: 2px;
margin-right: 10px;
opacity: 0.8;
}
/* Switch 开关优化 - 解决"新窗口打开"文字过长问题 */
.form-item--switch { .form-item--switch {
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
min-height: 52px; padding: var(--spacing-sm) var(--spacing-md);
padding: 14px 18px; background: var(--bg-section);
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border-radius: var(--radius-sm);
border-radius: 10px; border: 1px solid var(--border-light);
border: 1px solid #e2e8f0;
transition: all 0.3s ease;
}
.form-item--switch:hover {
background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
border-color: #cbd5e1;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
} }
.form-item--switch label { .form-item--switch label {
margin-bottom: 0; margin-bottom: 0;
font-size: 14px; font-size: 14px;
flex: 1;
font-weight: 500;
} }
.form-item--switch label::before { /* ============================================
background: linear-gradient(180deg, #38BDF8 0%, #6366F1 100%); 输入框样式
height: 14px; ============================================ */
width: 3px;
.t-input,
.t-textarea {
border-radius: var(--radius-sm);
border: 1px solid var(--border-light);
transition: all 0.2s;
} }
/* Switch 标签图标优化 */ .t-input:focus-within,
.switch-label-icon { .t-textarea:focus-within {
display: inline-flex; border-color: var(--primary-color);
align-items: center; box-shadow: 0 0 0 3px var(--primary-light);
justify-content: center;
width: 18px;
height: 18px;
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%);
border-radius: 4px;
color: white;
font-size: 11px;
font-weight: 700;
margin-right: 6px;
} }
/* 提示文本优化 */ /* ============================================
提示文本
============================================ */
.theme-tip { .theme-tip {
margin: 0 0 20px; margin: 0 0 var(--spacing-md);
padding: 14px 18px; padding: var(--spacing-sm) var(--spacing-md);
background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%); background: var(--primary-light);
border-left: 4px solid #38BDF8; border-left: 3px solid var(--primary-color);
border-radius: 8px; border-radius: var(--radius-sm);
color: #475569; color: var(--text-secondary);
font-size: 13px; font-size: 13px;
line-height: 1.7; line-height: 1.6;
} }
.theme-tip code { .theme-tip code {
padding: 3px 8px; padding: 2px var(--spacing-xs);
background: rgba(56, 189, 248, 0.12); background: rgba(37, 99, 235, 0.1);
border-radius: 4px; border-radius: 4px;
color: #38BDF8; color: var(--primary-color);
font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace; font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 12px; font-size: 12px;
font-weight: 500;
} }
/* JSON 编辑器优化 */ /* ============================================
JSON 编辑器
============================================ */
.theme-textarea textarea { .theme-textarea textarea {
font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace; font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
font-size: 13px; font-size: 13px;
line-height: 1.7; line-height: 1.6;
background: #0f172a; padding: var(--spacing-md) !important;
background: #1e293b;
color: #e2e8f0; color: #e2e8f0;
border-radius: 10px; border: 1px solid #334155;
padding: 18px !important; border-radius: var(--radius-sm);
border: 1px solid #1e293b;
} }
.theme-textarea textarea:focus { .theme-textarea textarea:focus {
background: #1e293b; background: #1e293b;
border-color: #38BDF8; border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
} }
/* 轮播/配置项卡片优化 - 更有层次感 */ /* ============================================
配置项卡片 (轮播、荣誉等)
============================================ */
.banner-item, .banner-item,
.config-item { .config-item {
border: 1px solid #e2e8f0; border: 1px solid var(--border-light);
border-radius: 12px; border-radius: var(--radius-md);
padding: 24px; padding: var(--spacing-lg);
margin-bottom: 24px; margin-bottom: var(--spacing-lg);
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); background: var(--bg-card);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
} }
.banner-item::before, /* 配置项头部 */
.config-item::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #38BDF8 0%, #6366F1 50%, #8B5CF6 100%);
opacity: 0;
transition: opacity 0.3s ease;
}
.banner-item:hover,
.config-item:hover {
border-color: #cbd5e1;
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
transform: translateY(-3px);
}
.banner-item:hover::before,
.config-item:hover::before {
opacity: 1;
}
/* 配置项头部优化 */
.banner-item__header, .banner-item__header,
.config-item__header { .config-item__header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 24px; margin-bottom: var(--spacing-md);
padding-bottom: 14px; padding-bottom: var(--spacing-sm);
border-bottom: 2px solid #f1f5f9; border-bottom: 1px solid var(--bg-section);
} }
.banner-item__header h4, .banner-item__header h4,
.config-item__header h4 { .config-item__header h4 {
margin: 0; margin: 0;
font-size: 17px;
font-weight: 700;
color: #1e293b;
display: flex;
align-items: center;
gap: 10px;
}
.banner-item__header h4::before,
.config-item__header h4::before {
content: '●';
color: #38BDF8;
font-size: 14px;
}
/* 子标题优化 */
.sub-title {
margin: 32px 0 16px;
padding-left: 14px;
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 600;
color: #475569; color: var(--text-primary);
border-left: 4px solid #38BDF8;
display: flex;
align-items: center;
} }
/* 空状态优化 - 更友好的视觉引导 */ /* ============================================
子标题
============================================ */
.sub-title {
margin: var(--spacing-xl) 0 var(--spacing-md);
padding-left: var(--spacing-sm);
font-size: 15px;
font-weight: 600;
color: var(--text-primary);
border-left: 3px solid var(--primary-color);
}
/* ============================================
空状态
============================================ */
.empty-tip { .empty-tip {
padding: 40px 24px; padding: var(--spacing-xl) var(--spacing-lg);
border: 2px dashed #cbd5e1; border: 2px dashed var(--border-normal);
border-radius: 12px; border-radius: var(--radius-md);
color: #64748b; color: var(--text-tertiary);
margin-bottom: 24px; margin-bottom: var(--spacing-lg);
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); background: var(--bg-section);
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
line-height: 1.8; line-height: 1.6;
position: relative;
transition: all 0.3s ease;
} }
.empty-tip::before { /* ============================================
content: '📋'; 上传行
display: block; ============================================ */
font-size: 36px;
margin-bottom: 12px;
opacity: 0.7;
}
.empty-tip:hover {
border-color: #94a3b8;
background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
/* 上传行优化 - 更紧凑的布局 */
.upload-row { .upload-row {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: var(--spacing-sm);
} }
.upload-row .t-input { .upload-row .t-input {
@@ -310,103 +271,112 @@
.upload-row .t-button { .upload-row .t-button {
flex-shrink: 0; flex-shrink: 0;
min-width: 90px;
} }
/* 底部操作栏优化 */ /* ============================================
底部操作栏
============================================ */
.action-bar { .action-bar {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
gap: 12px; gap: var(--spacing-sm);
margin-top: 40px; margin-top: var(--spacing-xl);
padding: 24px; padding: var(--spacing-md) var(--spacing-lg);
background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%); background: var(--bg-card);
border-radius: 12px; border-radius: var(--radius-md);
border: 1px solid #e2e8f0; border: 1px solid var(--border-light);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
position: sticky; position: sticky;
bottom: 20px; bottom: 20px;
z-index: 100; z-index: 100;
} }
/* 按钮增强 */ /* 按钮样式 */
.action-bar .t-button { .action-bar .t-button {
min-width: 130px; min-width: 120px;
font-weight: 600; font-weight: 500;
transition: all 0.3s ease; transition: all 0.2s;
padding: 10px 24px;
} }
.action-bar .t-button--primary { .action-bar .t-button--primary {
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%); background: var(--primary-color);
box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35); border-color: var(--primary-color);
border: none;
} }
.action-bar .t-button--primary:hover { .action-bar .t-button--primary:hover {
box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45); background: var(--primary-hover);
transform: translateY(-2px); border-color: var(--primary-hover);
} }
/* 间距工具类优化 */ /* ============================================
.mt-10 { Tab 标签页
margin-top: 20px; ============================================ */
}
.ml-10 {
margin-left: 12px;
}
.mb-10 {
margin-bottom: 20px;
}
/* Tab 标签页优化 */
.t-tabs__nav { .t-tabs__nav {
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); background: var(--bg-card);
border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--border-light);
padding: 10px; padding: 0;
margin-bottom: 24px; margin-bottom: var(--spacing-lg);
} }
.t-tab { .t-tab {
font-weight: 600; font-weight: 500;
font-size: 15px; font-size: 14px;
transition: all 0.3s ease; color: var(--text-secondary);
padding: 10px 20px; padding: var(--spacing-sm) var(--spacing-md);
border-radius: 8px; transition: all 0.2s;
} }
.t-tab:hover { .t-tab:hover {
background: rgba(56, 189, 248, 0.08); color: var(--primary-color);
background: var(--primary-light);
} }
.t-tab.t-is-active { .t-tab.t-is-active {
background: linear-gradient(135deg, #38BDF8 0%, #6366F1 100%) !important; color: var(--primary-color) !important;
color: white !important; background: var(--primary-light) !important;
box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3); border-bottom: 2px solid var(--primary-color) !important;
} }
/* 响应式优化 */ /* ============================================
工具类
============================================ */
.mt-10 {
margin-top: var(--spacing-md);
}
.ml-10 {
margin-left: var(--spacing-sm);
}
.mb-10 {
margin-bottom: var(--spacing-md);
}
/* ============================================
响应式
============================================ */
@media (max-width: 768px) { @media (max-width: 768px) {
.template { .template {
padding: 12px; padding: var(--spacing-sm);
} }
.form-grid { .form-grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
gap: 16px; gap: var(--spacing-md);
} }
.banner-item, .banner-item,
.config-item { .config-item {
padding: 18px; padding: var(--spacing-md);
} }
.action-bar { .action-bar {
flex-direction: column; flex-direction: column;
gap: 10px; gap: var(--spacing-sm);
position: relative; position: relative;
bottom: 0; bottom: 0;
} }
@@ -418,98 +388,87 @@
.form-item--switch { .form-item--switch {
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
gap: 12px; gap: var(--spacing-sm);
} }
} }
/* 滚动条美化 */ /* ============================================
滚动条美化 (保持简洁)
============================================ */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 10px; width: 8px;
height: 10px; height: 8px;
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background: #f1f5f9; background: var(--bg-section);
border-radius: 5px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, #38BDF8 0%, #6366F1 100%); background: var(--border-normal);
border-radius: 5px; border-radius: 4px;
transition: background 0.3s ease;
} }
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background: linear-gradient(180deg, #0EA5E9 0%, #4F46E5 100%); background: var(--border-dark);
} }
/* 输入框聚焦优化 */ /* ============================================
.t-input:focus-within, 按钮状态
.t-textarea:focus-within { ============================================ */
box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
border-color: #38BDF8;
}
/* 加载状态优化 */
.t-button--loading { .t-button--loading {
opacity: 0.6; opacity: 0.6;
cursor: not-allowed; cursor: not-allowed;
pointer-events: none; pointer-events: none;
} }
/* 删除按钮优化 */
.t-button--danger {
transition: all 0.3s ease;
}
.t-button--danger:hover { .t-button--danger:hover {
transform: scale(1.05); background: #dc2626;
box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35); border-color: #dc2626;
} }
/* 成功状态提示 */ /* ============================================
表单验证提示
============================================ */
.form-error {
color: var(--danger);
font-size: 13px;
margin-top: var(--spacing-xs);
font-weight: 400;
}
/* ============================================
成功提示
============================================ */
.success-indicator { .success-indicator {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 6px; gap: var(--spacing-xs);
padding: 6px 14px; padding: 6px var(--spacing-sm);
background: linear-gradient(135deg, #10b981 0%, #059669 100%); background: var(--success);
color: white; color: white;
border-radius: 20px; border-radius: 20px;
font-size: 13px; font-size: 13px;
font-weight: 600;
box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
/* 表单验证提示 */
.form-error {
color: #ef4444;
font-size: 13px;
margin-top: 6px;
display: flex;
align-items: center;
gap: 6px;
font-weight: 500; font-weight: 500;
} }
.form-error::before { /* ============================================
content: '⚠'; 其他优化
font-size: 15px; ============================================ */
/* 移除emoji标记,使用纯文本 */
.form-item label::before,
.banner-item__header h4::before,
.config-item__header h4::before,
.empty-tip::before {
display: none;
} }
/* 动画效果 */ /* Switch 图标简化 */
@keyframes slideIn { .switch-label-icon {
from { display: none;
opacity: 0; }
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.banner-item,
.config-item {
animation: slideIn 0.3s ease;
}