Files
Docker-Proxy/hubcmdui/web/style.css
T

2938 lines
65 KiB
CSS

/* 现代化UI样式 - 面向C端用户 */
:root {
/* 主色调 */
--primary-color: #3D7CF4;
--primary-light: #5D95FD;
--primary-dark: #2F62C9;
--primary-dark-color: #2c5282; /* 深蓝色,可以根据您的主题调整 */
/* 辅助色 */
--secondary-color: #FF6B6B;
--secondary-light: #FF8E8E;
--secondary-dark: #DA5151;
/* 中性色 */
--background-color: #F7F9FC;
--container-bg: #FFFFFF;
--card-bg: #FFFFFF;
/* 文字颜色 */
--text-primary: #2A3749;
--text-secondary: #5A6A80;
--text-muted: #8896AB;
/* 边框和分隔线 */
--border-color: #E2E8F0;
--border-light: #EDF1F7;
/* 状态颜色 */
--success-color: #32D583;
--warning-color: #FFB547;
--danger-color: #FF5252;
--info-color: #4AADD4;
/* 阴影 */
--shadow-sm: 0 2px 4px rgba(11, 31, 77, 0.04);
--shadow-md: 0 4px 12px rgba(11, 31, 77, 0.08);
--shadow-lg: 0 8px 24px rgba(11, 31, 77, 0.12);
/* 圆角 */
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 16px;
/* 动画 */
--transition-fast: 0.15s ease;
--transition-normal: 0.25s ease;
--transition-slow: 0.4s ease;
/* 字体 */
--font-sans: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
/* 基础样式 */
body {
font-family: var(--font-sans);
line-height: 1.6;
margin: 0;
padding: 0;
background-color: var(--background-color);
color: var(--text-primary);
min-height: 100vh;
display: flex;
flex-direction: column;
overflow-x: hidden;
}
/* 头部导航 */
.header {
background-color: #ffffff; /* 白色背景 */
padding: 20px 0; /* 增加上下padding */
position: relative;
border-bottom: 1px solid #e0e0e0; /* 添加边框分隔 */
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1200px;
margin: 0 auto;
padding: 0 30px; /* 增加左右padding */
}
.logo {
height: 60px; /* 将原来的40px增大到60px */
width: auto;
transition: transform 0.3s ease;
}
.logo:hover {
transform: scale(1.05); /* 添加悬停效果 */
}
/* 导航菜单修复 */
.nav-menu {
display: flex;
align-items: center;
}
.menu-toggle {
display: none;
font-size: 24px;
color: #333333; /* 深色图标 */
cursor: pointer;
}
.nav-list {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}
.nav-list li {
margin-left: 20px;
}
/* 注意:菜单项的具体样式由JS中的内联样式控制 */
/* 移动设备适配 */
@media (max-width: 768px) {
.menu-toggle {
display: block;
}
.nav-list {
position: absolute;
top: 100%;
right: 20px;
background-color: #ffffff; /* 白色背景 */
border-radius: 5px;
padding: 20px;
flex-direction: column;
display: none;
z-index: 100;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
border: 1px solid #e0e0e0;
}
.nav-menu.active .nav-list {
display: flex;
}
.nav-list li {
margin: 10px 0;
}
}
.no-menu, .menu-error {
color: #ff6b6b;
font-size: 14px;
margin-right: 20px;
}
/* 主容器 */
.container {
width: 90%;
max-width: 1320px;
margin: 2rem auto;
padding: 0;
flex: 1 0 auto;
display: flex;
flex-direction: column;
}
.page-title {
font-size: 2.2rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 1.5rem;
text-align: center;
line-height: 1.2;
}
.page-subtitle {
font-size: 1.1rem;
color: var(--text-secondary);
margin-top: -0.5rem;
margin-bottom: 2rem;
text-align: center;
max-width: 700px;
margin-left: auto;
margin-right: auto;
}
/* 选项卡 */
.tab-container {
display: flex;
margin-bottom: 2rem;
background: var(--container-bg);
border-radius: var(--radius-lg);
padding: 0.5rem;
box-shadow: var(--shadow-sm);
justify-content: center;
position: relative;
z-index: 1;
}
.tab {
padding: 0.8rem 1.8rem;
border: none;
background: none;
color: var(--text-secondary);
cursor: pointer;
font-weight: 600;
position: relative;
transition: all var(--transition-normal);
border-radius: var(--radius-md);
font-size: 1rem;
flex: 1;
text-align: center;
max-width: 180px;
}
.tab:hover {
color: var(--primary-color);
}
.tab.active {
color: var(--primary-color);
background-color: rgba(61, 124, 244, 0.08);
}
/* 内容区域 */
.content {
display: none;
background: var(--container-bg);
padding: 2.5rem;
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
flex: 1;
width: 100%;
box-sizing: border-box;
animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.content.active {
display: flex;
flex-direction: column;
}
/* 输入框和按钮 */
input[type="text"] {
width: 100%;
padding: 0.9rem 1.2rem;
border: 2px solid var(--border-color);
border-radius: var(--radius-md);
font-size: 1rem;
transition: all var(--transition-fast);
background-color: var(--container-bg);
color: var(--text-primary);
box-shadow: var(--shadow-sm);
}
input[type="text"]:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(61, 124, 244, 0.2);
outline: none;
}
input[type="text"]::placeholder {
color: var(--text-muted);
}
button {
background-color: var(--primary-color);
color: white;
border: none;
padding: 0.9rem 1.8rem;
border-radius: var(--radius-md);
cursor: pointer;
font-size: 1rem;
font-weight: 600;
transition: all var(--transition-fast);
box-shadow: var(--shadow-sm);
}
button:hover {
background-color: var(--primary-dark);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
button:active {
transform: translateY(0);
}
/* 搜索区域 */
.search-container {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
}
.search-container input {
flex: 1;
}
.search-container button {
white-space: nowrap;
}
/* 搜索结果样式 */
#searchResults {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
margin-top: 2rem;
}
.search-result-item {
background-color: var(--card-bg);
border-radius: var(--radius-md);
border: 1px solid var(--border-light);
padding: 1.5rem;
transition: all var(--transition-normal);
box-shadow: var(--shadow-sm);
display: flex;
flex-direction: column;
}
.search-result-item:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-md);
border-color: var(--primary-light);
}
.search-result-item h3 {
font-size: 1.2rem;
margin: 0 0 1rem 0;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 0.5rem;
}
.search-result-item p {
color: var(--text-secondary);
margin: 0.5rem 0;
font-size: 0.95rem;
}
.official-badge {
background-color: var(--success-color);
color: white;
padding: 0.2rem 0.5rem;
border-radius: var(--radius-sm);
font-size: 0.75rem;
font-weight: 500;
}
.image-stats {
display: flex;
gap: 1rem;
margin: 1rem 0;
color: var(--text-muted);
font-size: 0.9rem;
}
.stars, .pull-count {
display: flex;
align-items: center;
gap: 0.3rem;
}
.button-group {
display: flex;
gap: 0.75rem;
margin-top: auto;
padding-top: 1rem;
}
.button-group button {
flex: 1;
font-size: 0.9rem;
padding: 0.7rem 1rem;
}
.view-tags-btn {
background-color: var(--background-color);
color: var(--primary-color);
border: 1px solid var(--primary-color);
}
.view-tags-btn:hover {
background-color: rgba(61, 124, 244, 0.1);
}
/* 加速命令区 */
.input-group {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
}
.input-group input {
flex: 1;
}
#result {
background-color: var(--background-color);
padding: 1.5rem;
border-radius: var(--radius-lg);
margin-top: 2rem;
}
#result h2 {
margin-top: 0;
color: var(--text-primary);
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 1.5rem;
}
.step {
background: var(--container-bg);
padding: 1.2rem; /* 减小内边距 */
border-radius: var(--radius-md);
margin-bottom: 1rem; /* 减小步骤之间的间距 */
box-shadow: var(--shadow-sm);
border: 1px solid var(--border-light);
transition: transform var(--transition-normal);
}
.step:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.step h3 {
color: var(--primary-color);
margin: 0 0 0.5rem 0; /* 减小标题下方间距 */
font-size: 1.1rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
}
.step h3::before {
content: "";
display: inline-block;
width: 24px;
height: 24px;
background-color: var(--primary-light);
border-radius: 50%;
color: white;
text-align: center;
line-height: 24px;
font-size: 0.9rem;
}
/* 命令终端样式优化 */
.command-terminal {
background: #1F2937;
border-radius: var(--radius-md);
overflow: visible; /* 修改为visible以避免复制按钮被裁剪 */
position: relative;
margin-bottom: 0.75rem; /* 减小命令之间的间距 */
min-height: fit-content; /* 设置最小高度为内容自适应 */
}
.command-terminal pre {
margin: 0;
padding: 0;
background: transparent;
display: flex; /* 使用弹性布局 */
align-items: center; /* 垂直居中 */
min-height: 44px; /* 设置最小高度 */
}
.command-terminal code {
display: block;
padding: 0.6rem 1rem; /* 减小内边距 */
color: #F3F4F6;
font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
font-size: 0.95rem;
line-height: 1.4;
flex: 1; /* 占据剩余空间 */
}
/* 文档页面代码块样式 */
#documentationText .command-terminal pre {
max-height: none; /* 移除最大高度限制 */
overflow: visible; /* 移除滚动条 */
}
.terminal-header {
background: #111827;
padding: 8px 12px;
display: flex;
align-items: center;
gap: 6px;
}
.terminal-button {
width: 12px;
height: 12px;
border-radius: 50%;
}
.button-red { background: #FF5F57; }
.button-yellow { background: #FEBC2E; }
.button-green { background: #28C840; }
.copy-btn {
position: absolute;
top: 8px; /* 调整位置在终端标题栏右侧 */
right: 8px;
padding: 0.35rem 0.7rem;
font-size: 0.8rem;
background-color: rgba(255, 255, 255, 0.1);
border-radius: var(--radius-sm);
opacity: 0;
transition: opacity var(--transition-fast);
z-index: 10; /* 确保按钮始终在顶层 */
color: #F3F4F6;
border: none;
}
.command-terminal:hover .copy-btn {
opacity: 1;
}
.copy-btn:hover {
background-color: rgba(255, 255, 255, 0.3);
transform: translateY(0); /* 覆盖默认的按钮hover效果 */
}
/* 标签展示区域 - 修复宽度与主容器一致 */
#imageTagsView {
width: 100%;
background-color: var(--container-bg);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
margin: 0;
padding: 2rem;
transition: all var(--transition-normal);
}
.tag-header {
margin-bottom: 2rem;
}
.tag-breadcrumb {
display: flex;
align-items: center;
margin-bottom: 1.5rem;
}
.tag-breadcrumb a {
display: inline-flex;
align-items: center;
color: var(--primary-color);
text-decoration: none;
font-weight: 500;
padding: 0.5rem 1rem;
border-radius: var(--radius-md);
transition: all var(--transition-fast);
}
.tag-breadcrumb a:hover {
background-color: rgba(61, 124, 244, 0.1);
color: var (--primary-dark);
}
.tag-breadcrumb a::before {
content: "←";
font-size: 1.2rem;
margin-right: 0.5rem;
}
#currentImageTitle {
font-size: 1.8rem;
margin: 0 0 1rem 0;
color: var(--text-primary);
}
.image-description {
color: var(--text-secondary);
margin-bottom: 1.5rem;
line-height: 1.6;
background-color: var(--container-bg);
padding: 1rem 1.5rem;
border-radius: var(--radius-md);
border-left: 4px solid var(--primary-color);
}
.tag-search-container {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
max-width: 600px; /* 限制搜索框宽度 */
margin: 0 auto 2rem; /* 居中显示并添加底部间距 */
}
.tag-search-container input {
flex: 1;
}
.tag-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
border-radius: var(--radius-md);
overflow: hidden;
box-shadow: var(--shadow-md);
margin: 0 auto; /* 居中显示 */
}
.tag-table th {
background-color: var(--primary-color);
color: white;
text-align: left;
padding: 1rem 1.5rem;
font-weight: 600;
}
.tag-table td {
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border-light);
background-color: var(--container-bg);
}
.tag-table tr:last-child td {
border-bottom: none;
}
.tag-table tr:hover td {
background-color: rgba(61, 124, 244, 0.05);
}
.tag-table td:first-child {
font-weight: 500;
color: var(--primary-color);
padding-left: 1.5rem; /* 第一列左对齐 */
}
.tag-table th:last-child,
.tag-table td:last-child {
padding-right: 1.5rem; /* 最后一列右对齐 */
text-align: right; /* 操作按钮右对齐 */
}
/* OS/ARCH垂直显示样式 */
.tag-os-arch {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin: 0.5rem 0;
}
.tag-os-arch-item {
display: inline-flex;
align-items: center;
padding: 0.4rem 0.8rem;
background: var(--background-color);
border-radius: var(--radius-sm);
font-size: 0.85rem;
color: var(--text-secondary);
margin-right: 0;
margin-bottom: 0.25rem;
}
.tag-os-arch-more {
color: var(--primary-color);
cursor: pointer;
font-size: 0.85rem;
padding: 0.4rem 0;
text-decoration: underline;
}
.tag-os-arch-all {
display: none;
margin-top: 0.5rem;
padding-left: 0.5rem;
border-left: 2px solid var(--border-color);
}
.tag-os-arch-all.show {
display: block;
}
/* 分页控件 */
.pagination-container {
display: flex;
justify-content: center;
gap: 1rem;
margin-top: 2rem;
}
.pagination-container button {
padding: 0.5rem 1.2rem;
border-radius: var(--radius-md);
}
.pagination-container button:disabled {
background-color: var(--text-muted);
cursor: not-allowed;
transform: none;
box-shadow: none;
}
.pagination-container span {
display: flex;
align-items: center;
color: var(--text-secondary);
font-weight: 500;
}
/* 文档区样式 */
#documentationContent.active {
display: grid;
grid-template-columns: 280px 1fr;
gap: 2.5rem;
}
#documentList {
border-right: 1px solid var(--border-light);
padding-right: 1.5rem;
}
#documentList h2 {
font-size: 1.3rem;
margin: 0 0 1.5rem 0;
padding-bottom: 0.8rem;
border-bottom: 2px solid var(--border-light);
color: var(--text-primary);
}
#documentList ul {
list-style: none;
padding: 0;
margin: 0;
}
#documentList li {
margin-bottom: 0.8rem;
}
#documentList a {
display: block;
padding: 0.8rem 1.2rem;
color: var(--text-secondary);
text-decoration: none;
border-radius: var (--radius-md);
transition: all var(--transition-fast);
font-weight: 500;
}
#documentList a:hover {
background-color: rgba(61, 124, 244, 0.08);
color: var(--primary-color);
}
#documentList a.active {
background-color: var(--primary-color);
color: white;
}
#documentationText {
padding: 0.5rem 1.5rem; /* 增加左右内边距 */
max-width: 900px; /* 限制最大宽度以提高可读性 */
/* margin-left: auto; 移除左边距自动 */
/* margin-right: auto; 移除右边距自动 */
}
#documentationText h2 {
font-size: 1.8em;
margin-top: 2.5em;
margin-bottom: 1em;
border-bottom: 1px solid #eaecef;
padding-bottom: 0.4em;
font-weight: 600;
}
#documentationText p {
margin-bottom: 1.5rem; /* 增大段落间距 */
font-size: 1.05rem; /* 稍微增大正文字号 */
}
#documentationText ul, #documentationText ol {
padding-left: 1.8em; /* 调整缩进 */
margin-bottom: 1.5rem;
}
#documentationText li {
margin-bottom: 0.6rem;
}
#documentationText pre {
background-color: #1F2937; /* 深色背景 */
color: #F3F4F6; /* 浅色文字 */
padding: 1.2rem 1.5rem; /* 调整内边距 */
border-radius: var(--radius-md);
overflow-x: auto;
margin: 1.8rem 0; /* 增加垂直外边距 */
line-height: 1.6; /* 调整行高 */
border: 1px solid #374151; /* 深色边框 */
font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; /* 使用适合编程的字体 */
font-size: 0.95rem; /* 标准化字体大小 */
position: relative; /* 为复制按钮定位 */
}
.doc-content pre::before {
content: ''; /* 模拟终端窗口的顶部栏 */
display: block;
height: 28px; /* 顶部栏高度 */
background-color: #111827; /* 顶部栏颜色 */
border-top-left-radius: var(--radius-md);
border-top-right-radius: var(--radius-md);
margin: -1.2rem -1.5rem 1rem -1.5rem; /* 定位和添加下方间距 */
position: relative;
}
/* 模拟窗口按钮 */
.doc-content pre::after {
content: '';
position: absolute;
top: 8px;
left: 15px;
width: 12px;
height: 12px;
background-color: #FF5F57;
border-radius: 50%;
box-shadow: 20px 0 #FEBC2E, 40px 0 #28C840;
}
.doc-content pre code {
display: block; /* 确保代码块充满 pre */
background-color: transparent;
padding: 0;
margin: 0;
color: inherit;
border-radius: 0;
border: none;
line-height: inherit;
font-family: inherit;
white-space: pre; /* 保留空格和换行 */
font-size: inherit; /* 继承 pre 的字号 */
}
/* 行内代码样式 */
.doc-content code {
font-family: 'Fira Code', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 0.9em; /* 调整大小 */
background-color: rgba(61, 124, 244, 0.1); /* 更柔和的背景 */
padding: 0.25em 0.5em;
margin: 0 0.1em;
border-radius: 4px;
color: #2c5282; /* 主色调的深色 */
border: 1px solid rgba(61, 124, 244, 0.2);
vertical-align: middle; /* 垂直对齐 */
}
/* 链接样式 */
.doc-content a {
color: var(--primary-dark); /* 使用更深的蓝色 */
text-decoration: underline;
text-decoration-color: rgba(61, 124, 244, 0.4);
transition: all 0.2s ease;
}
.doc-content a:hover {
color: var(--primary-color);
text-decoration-color: var(--primary-color);
background-color: rgba(61, 124, 244, 0.05);
}
/* 引用块样式 */
.doc-content blockquote {
margin: 2em 0;
padding: 1em 1.5em;
color: #555;
border-left: 4px solid var(--primary-light);
background-color: #f8faff; /* 淡蓝色背景 */
border-radius: var(--radius-sm);
}
.doc-content blockquote p:last-child {
margin-bottom: 0;
}
/* 表格样式 */
.doc-content table {
border-collapse: separate; /* 使用 separate 以应用圆角 */
border-spacing: 0;
margin: 1.8rem 0;
width: 100%;
border: 1px solid #e2e8f0;
border-radius: var(--radius-md);
overflow: hidden; /* 应用圆角 */
}
.doc-content th,
.doc-content td {
border-bottom: 1px solid #e2e8f0;
padding: 0.8em 1.2em;
text-align: left;
}
.doc-content tr:last-child td {
border-bottom: none;
}
.doc-content th {
font-weight: 600;
background-color: #f7f9fc; /* 更浅的表头背景 */
color: #4a5568;
}
.doc-content tr:nth-child(even) td {
background-color: #fafcff; /* 斑马纹 */
}
/* 元数据 (更新时间) 样式 */
.doc-meta {
font-size: 0.9em;
color: #888;
text-align: right; /* 右对齐 */
margin-top: 0rem; /* 调整与内容的距离 */
padding-top: 0.5rem; /* 增加顶部内边距 */
border-top: 1px dashed #eee; /* 放到顶部 */
clear: both; /* 确保在内容下方 */
}
/* 加载中和消息提示 */
.loading-indicator {
display: flex;
justify-content: center;
align-items: center;
padding: 3rem 0;
color: var(--text-secondary);
font-size: 1.1rem;
}
.loading-indicator::after {
content: "...";
animation: loading-dots 1.5s infinite;
}
@keyframes loading-dots {
0%, 20% { content: "."; }
40% { content: ".."; }
60%, 100% { content: "..."; }
}
.message-container {
padding: 3rem 0;
text-align: center;
color: var(--text-secondary);
font-size: 1.1rem;
}
/* TAG搜索无结果提示 */
.no-filter-results {
margin: 1rem 0;
border-radius: var(--radius-md);
border: 1px dashed var (--border-color);
color: var(--text-muted);
text-align: center;
padding: 2rem;
}
/* 复制按钮位置调整 */
.copy-btn {
position: absolute;
top: 8px; /* 调整位置在终端标题栏右侧 */
right: 8px;
padding: 0.35rem 0.7rem;
font-size: 0.8rem;
background-color: rgba(255, 255, 255, 0.1);
border-radius: var(--radius-sm);
opacity: 0;
transition: opacity var(--transition-fast);
z-index: 10; /* 确保按钮始终在顶层 */
color: #F3F4F6;
border: none;
}
.command-terminal:hover .copy-btn {
opacity: 1;
}
.copy-btn:hover {
background-color: rgba(255, 255, 255, 0.3);
transform: translateY(0); /* 覆盖默认的按钮hover效果 */
}
/* 标签展示区域 - 修复宽度与主容器一致 */
#imageTagsView {
width: 100%;
max-width: 100%; /* 确保不超出父容器 */
box-sizing: border-box; /* 确保padding和border包含在宽度内 */
background-color: var(--container-bg);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
margin: 0;
padding: 1.5rem; /* 略微减小内边距 */
transition: all var(--transition-normal);
overflow-x: hidden; /* 防止水平溢出 */
}
.tag-header {
margin-bottom: 2rem;
padding-bottom: 1.5rem;
border-bottom: 1px solid var(--border-light);
}
.tag-breadcrumb {
display: flex;
align-items: center;
margin-bottom: 1.5rem;
}
.tag-breadcrumb a {
display: inline-flex;
align-items: center;
color: var(--primary-color);
text-decoration: none;
font-weight: 500;
padding: 0.5rem 1rem;
border-radius: var(--radius-md);
transition: all var(--transition-fast);
}
.tag-breadcrumb a:hover {
background-color: rgba(61, 124, 244, 0.1);
color: var(--primary-dark);
}
.tag-breadcrumb a::before {
content: "←";
font-size: 1.2rem;
margin-right: 0.5rem;
}
#currentImageTitle {
font-size: 2rem;
margin: 0 0 1rem 0;
color: var(--text-primary);
font-weight: 700;
}
.image-description {
color: var(--text-secondary);
margin-bottom: 1.5rem;
line-height: 1.6;
background-color: var(--background-color);
padding: 1rem 1.5rem;
border-radius: var(--radius-md);
border-left: 4px solid var(--primary-color);
font-size: 1rem;
}
.image-meta {
display: flex;
align-items: center;
gap: 2rem;
margin-top: 1.5rem;
}
.image-meta span {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 1rem;
color: var(--text-secondary);
}
.image-meta i {
color: var(--primary-color);
}
/* 标签搜索栏优化 */
.tag-search-container {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
padding: 1.5rem;
background-color: var(--background-color);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
}
.tag-search-container input {
flex: 1;
padding: 0.75rem 1rem;
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
background-color: var(--container-bg);
}
.tag-search-container input:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(61, 124, 244, 0.2);
}
.tag-search-container .search-btn {
padding: 0.75rem 1.2rem;
white-space: nowrap;
}
/* 标签统计信息 */
.tag-search-stats {
margin-bottom: 1rem;
padding: 0.75rem 1rem;
background-color: var(--background-color);
border-radius: var(--radius-md);
color: var(--text-secondary);
}
.tag-search-stats p {
margin: 0;
font-size: 0.95rem;
}
.tag-search-stats strong {
color: var(--primary-color);
font-weight: 600;
}
/* 标签表格优化 */
.tag-table-container {
width: 100%;
overflow-x: auto; /* 在小屏幕上允许水平滚动 */
margin-bottom: 1rem;
}
.tag-table {
min-width: 100%;
width: 100%;
border-collapse: separate;
border-spacing: 0;
border-radius: var(--radius-md);
overflow: hidden;
box-shadow: var(--shadow-md);
margin: 0 auto;
}
.tag-table th {
background-color: var (--primary-color);
color: white;
text-align: left;
padding: 1rem 1.5rem;
font-weight: 600;
}
.tag-table td {
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border-light);
background-color: var(--container-bg);
vertical-align: top;
}
.tag-table tr:last-child td {
border-bottom: none;
}
.tag-table tr:hover td {
background-color: rgba(61, 124, 244, 0.05);
}
.tag-table td:first-child {
font-weight: 600;
color: var(--text-primary);
font-size: 1rem;
}
.tag-table th:last-child,
.tag-table td:last-child {
padding-right: 1.5rem;
text-align: right;
}
/* 优化OS/ARCH显示样式 */
.tag-os-arch {
display: flex;
flex-wrap: wrap;
gap: 0.3rem; /* 减小间距 */
margin: 0;
}
.tag-os-arch-item {
display: inline-flex;
align-items: center;
padding: 0.3rem 0.6rem; /* 减小padding */
background: var(--background-color);
border-radius: var(--radius-sm);
font-size: 0.8rem; /* 减小字体 */
color: var(--text-secondary);
margin-bottom: 0.25rem;
border: 1px solid var(--border-light);
white-space: nowrap; /* 防止内容换行 */
}
.tag-os-arch-more {
color: var(--primary-color);
cursor: pointer;
font-size: 0.9rem;
padding: 0.4rem 0;
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.5rem;
font-weight: 500;
}
.tag-os-arch-more i {
font-size: 1rem;
}
.tag-os-arch-all {
display: none;
margin-top: 0.5rem;
width: 100%;
padding-top: 0.5rem;
border-top: 1px dashed var(--border-light);
transition: all var(--transition-normal);
}
.tag-os-arch-all.show {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
/* 加载容器样式 */
.loading-container {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
padding: 3rem 0;
}
/* 优化分页控件样式 */
.pagination-container {
display: flex;
justify-content: center;
align-items: center;
gap: 1.5rem;
margin-top: 2rem;
padding: 1rem 0;
border-top: 1px solid var(--border-light);
}
.pagination-container button {
padding: 0.6rem 1.2rem;
border-radius: var(--radius-md);
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 500;
}
.pagination-container button:disabled {
background-color: var(--text-muted);
cursor: not-allowed;
transform: none;
box-shadow: none;
opacity: 0.7;
}
.pagination-container span {
display: flex;
align-items: center;
color: var(--text-secondary);
font-weight: 500;
font-size: 1rem;
}
/* 优化按钮样式 */
.primary-btn {
background-color: var(--primary-color);
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: var(--radius-md);
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
transition: all var(--transition-fast);
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.primary-btn:hover {
background-color: var(--primary-dark);
transform: translateY(-2px);
box-shadow: var(--shadow-sm);
}
/* 页脚 */
.footer {
background-color: var(--container-bg);
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
border-top: 1px solid var(--border-light);
position: relative;
}
.footer p {
color: var(--text-secondary);
font-size: 0.95rem;
margin: 0;
}
.footer a {
color: var(--primary-color);
text-decoration: none;
font-weight: 500;
position: relative;
}
.footer a::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
width: 0;
height: 1px;
background-color: var(--primary-color);
transition: width 0.3s ease;
}
.footer a:hover::after {
width: 100%;
}
.copyright-text {
font-weight: 600;
color: var(--primary-color);
}
/* 响应式设计 */
@media (max-width: 1200px) {
.container {
width: 95%;
}
.page-title {
font-size: 2rem;
}
/* 优化标签页面在中等屏幕上的显示 */
.tag-table th, .tag-table td {
padding: 0.75rem 1rem;
}
}
@media (max-width: 992px) {
.input-group, .search-container {
flex-direction: column;
}
.page-title {
font-size: 2rem;
}
.content {
padding: 2rem;
}
#searchResults {
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
#documentationContent.active {
grid-template-columns: 1fr;
}
#documentList {
border-right: none;
padding-right: 0;
padding-bottom: 1.5rem;
margin-bottom: 1.5rem;
}
/* 优化标签页面在平板上的显示 */
.tag-table th:nth-child(2),
.tag-table td:nth-child(2) {
max-width: 150px; /* 限制OS/ARCH列宽度 */
}
}
@media (max-width: 768px) {
.tab-container {
flex-wrap: wrap;
}
.tab {
max-width: none;
flex: 0 0 100%;
}
.header-content {
flex-direction: column;
padding: 1rem;
}
.nav-menu {
width: 100%;
margin-top: 1rem;
justify-content: center;
}
.content {
padding: 1.5rem;
}
.search-result-item {
padding: 1.2rem;
}
/* 调整标签视图在移动设备上的显示 */
#imageTagsView {
padding: 1rem;
}
.tag-header {
margin-bottom: 1rem;
}
.tag-table th:nth-child(4),
.tag-table td:nth-child(4),
.tag-table th:nth-child(3),
.tag-table td:nth-child(3) {
display: none; /* 在小屏幕上隐藏日期和大小列 */
}
}
@media (max-width: 576px) {
.page-title {
font-size: 1.8rem;
}
#searchResults {
grid-template-columns: 1fr;
}
.tag-table th, .tag-table td {
padding: 0.8rem;
}
}
/* 新增: 特性卡片样式 */
.features {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 2rem;
margin-top: 2rem;
transition: all var(--transition-normal);
}
.feature-card {
background: var(--container-bg);
padding: 2rem;
border-radius: var(--radius-lg);
text-align: center;
transition: all var(--transition-normal);
border: 1px solid var(--border-light);
}
.feature-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.feature-card i {
font-size: 2.5rem;
color: var(--primary-color);
margin-bottom: 1.5rem;
}
.feature-card h3 {
color: var(--text-primary);
margin-bottom: 1rem;
}
.feature-card p {
color: var(--text-secondary);
font-size: 0.95rem;
}
/* 搜索结果项样式优化 */
.search-result-item {
background: var(--card-bg);
border-radius: var(--radius-lg);
border: 1px solid var(--border-light);
padding: 1.5rem;
transition: all var(--transition-normal);
box-shadow: var(--shadow-sm);
}
.search-result-item:hover {
transform: translateY(-4px);
box-shadow: var(--shadow-lg);
border-color: var(--primary-light);
}
.title-badge {
display: flex;
align-items: center;
gap: 0.75rem;
}
.result-stats {
display: flex;
gap: 1rem;
color: var(--text-muted);
font-size: 0.9rem;
}
.stats {
display: flex;
align-items: center;
gap: 0.4rem;
}
.result-description {
margin: 1rem 0;
color: var(--text-secondary);
line-height: 1.6;
}
.result-actions {
display: flex;
gap: 1rem;
margin-top: 1.5rem;
}
.action-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.8rem;
border-radius: var(--radius-md);
font-weight: 600;
transition: all var(--transition-fast);
}
.action-btn.primary {
background: var (--primary-color);
color: white;
}
.action-btn.secondary {
background: var(--background-color);
color: var(--primary-color);
border: 1px solid var(--primary-color);
}
.action-btn:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.action-btn.secondary:hover {
background-color: rgba(61, 124, 244, 0.1);
color: var(--primary-color);
}
/* 通知提示样式 */
.notification-container {
position: fixed;
top: 20px;
right: 20px;
z-index: 1000;
transition: all 0.3s ease;
}
.notification {
background: white;
border-radius: var(--radius-md);
padding: 1rem 1.5rem;
margin-bottom: 10px;
box-shadow: var(--shadow-lg);
display: flex;
align-items: center;
gap: 0.75rem;
animation: slideIn 0.3s ease-out;
}
.notification.success {
border-left: 4px solid var(--success-color);
}
.notification.error {
border-left: 4px solid var(--danger-color);
}
@keyframes slideIn {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* 加载动画样式 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.loading-overlay.active {
opacity: 1;
visibility: visible;
}
.loading-spinner {
width: 40px;
height: 40px;
border: 3px solid var(--border-light);
border-top-color: var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* 快速指南样式 */
.quick-guide {
background: #f8f9fa;
padding: 1.5rem;
border-radius: 8px;
margin: 2rem 0;
border: 1px solid var(--border-color);
}
/* TAG页面样式优化 */
.image-meta-info {
margin: 1.5rem 0;
padding: 1rem;
background: var(--background-color);
border-radius: var(--radius-lg);
display: flex;
justify-content: space-between;
align-items: center;
}
.image-stats-large {
display: flex;
align-items: center;
gap: 2rem;
}
.stat-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
.stat-value {
font-size: 1.5rem;
font-weight: 600;
color: var(--primary-color);
}
.stat-label {
font-size: 0.9rem;
color: var(--text-secondary);
}
.stat-divider {
width: 1px;
height: 40px;
background: var(--border-light);
}
.official-badge-large {
background: var(--success-color);
color: white;
padding: 0.5rem 1rem;
border-radius: var(--radius-md);
font-weight: 500;
display: flex;
align-items: center;
gap: 0.5rem;
}
.image-description-card {
background: var(--background-color);
border-radius: var(--radius-lg);
padding: 1.5rem;
margin: 1.5rem 0;
border-left: 4px solid var(--primary-color);
}
.image-description-card h3 {
color: var(--text-primary);
margin-bottom: 1rem;
font-size: 1.1rem;
}
.image-description-card p {
color: var(--text-secondary);
line-height: 1.6;
margin: 0;
}
.tag-search-container {
background: var(--container-bg);
padding: 1rem;
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
margin: 1.5rem 0;
}
/* 标签表格样式优化 */
.tag-table {
background: var(--container-bg);
margin-top: 1.5rem;
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
}
.tag-table th {
background: var (--primary-color);
color: white;
padding: 1rem;
font-weight: 600;
text-align: left;
}
.tag-table td {
padding: 1rem;
border-bottom: 1px solid var(--border-light);
background-color: var(--container-bg);
}
.tag-table tr:hover td {
background: rgba(61, 124, 244, 0.05);
}
.tag-table button {
background: var(--primary-color);
color: white;
padding: 0.5rem 1rem;
border-radius: var(--radius-md);
border: none;
cursor: pointer;
transition: all 0.2s;
}
.tag-table button:hover {
background: var(--primary-dark);
transform: translateY(-2px);
}
/* 搜索结果容器样式 */
#searchResultsContainer {
width: 100%;
transition: all var(--transition-normal);
}
/* 搜索结果列表样式 */
#searchResultsList {
width: 100%;
transition: all var(--transition-normal);
}
.no-filter-results {
margin: 1rem 0;
border-radius: var(--radius-md);
border: 1px dashed var(--border-color);
color: var(--text-muted);
text-align: center;
padding: 2rem;
transition: all var(--transition-normal);
}
/* 提示消息样式 */
.toast-notification {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
background-color: var(--container-bg);
color: var(--text-primary);
padding: 1rem 2rem;
border-radius: var(--radius-md);
box-shadow: var(--shadow-lg);
z-index: 1100;
animation: fadeIn 0.3s ease-in;
text-align: center;
max-width: 90%;
display: flex;
align-items: center;
gap: 0.75rem;
}
.toast-notification i {
font-size: 1.2rem;
}
.toast-notification.error {
border-left: 4px solid var(--danger-color);
}
.toast-notification.error i {
color: var(--danger-color);
}
.toast-notification.info {
border-left: 4px solid var(--info-color);
}
.toast-notification.info i {
color: var(--info-color);
}
.toast-notification.fade-out {
opacity: 0;
transition: opacity 0.3s ease-out;
}
/* 标签排序容器样式 */
.tag-sort-container {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1rem;
padding: 0.75rem 1rem;
background-color: var(--background-color);
border-radius: var(--radius-md);
}
.tag-sort-container label {
font-weight: 500;
color: var(--text-secondary);
}
.tag-sort-container select {
padding: 0.5rem 1rem;
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
background-color: var(--container-bg);
color: var(--text-primary);
font-size: 0.9rem;
cursor: pointer;
transition: all var(--transition-fast);
}
.tag-sort-container select:focus {
border-color: var(--primary-color);
outline: none;
box-shadow: 0 0 0 3px rgba(61, 124, 244, 0.2);
}
/* 增强标签列表用户体验 */
.tag-table {
table-layout: fixed; /* 固定表格布局以提高渲染性能 */
width: 100%;
}
.tag-table td {
overflow: hidden;
text-overflow: ellipsis;
white-space: normal; /* 允许文本换行 */
}
/* 优化分页样式 */
.pagination-container {
margin-top: 2rem;
padding-top: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid var(--border-light);
}
.pagination-container .pagination-info {
font-size: 0.9rem;
color: var(--text-secondary);
}
.pagination-controls {
display: flex;
gap: 0.75rem;
}
.pagination-container button {
padding: 0.5rem 1rem;
font-size: 0.9rem;
}
/* 优化加载指示器 */
.loading-indicator {
display: flex;
justify-content: center;
align-items: center;
padding: 3rem;
color: var(--text-secondary);
font-size: 1.1rem;
}
/* 标签动作区域 */
.tag-actions {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
gap: 1.5rem;
}
/* 修改标签搜索容器样式以适应新布局 */
.tag-search-container {
display: flex;
gap: 1rem;
padding: 1rem;
background-color: var(--background-color);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
flex: 1;
margin: 0; /* 覆盖之前的margin设置 */
}
/* 加载全部标签按钮 */
.load-all-btn {
white-space: nowrap;
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.2rem;
background-color: var(--warning-color);
color: white;
font-weight: 500;
transition: all var(--transition-fast);
}
.load-all-btn:hover {
background-color: var(--secondary-color);
transform: translateY(-2px);
}
.load-all-btn:disabled {
background-color: var(--text-muted);
cursor: not-allowed;
transform: none;
}
/* 旋转加载图标动画 */
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.fa-spin {
animation: spin 1s linear infinite;
}
/* 提示消息增强样式 */
.toast-notification {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
/* Glassmorphism styles - Simplified & Reinforced */
background-color: rgba(250, 250, 250, 0.4); /* 调整了Alpha值,使其更透明一些 */
backdrop-filter: blur(12px); /* 调整模糊值 */
-webkit-backdrop-filter: blur(12px); /* Safari 兼容 */
border: 1px solid rgba(255, 255, 255, 0.2); /* 边框更柔和 */
color: #2A3749; /* 使用了您CSS变量中的 --text-primary */
padding: 1rem 1.5rem;
border-radius: 12px; /* 圆角调整 */
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); /* 调整阴影 */
z-index: 1100;
animation: fadeIn 0.3s ease-in-out; /* 使用 ease-in-out */
text-align: center;
min-width: 250px; /* 最小宽度 */
max-width: 350px; /* 最大宽度,避免过宽 */
display: flex;
align-items: center;
gap: 0.8rem; /* 图标与文字间距 */
}
.toast-notification i {
font-size: 1.25rem; /* 图标大小 */
color: inherit; /* 默认继承文本颜色 */
}
/* 状态特定样式 */
.toast-notification.success {
/* background-color: rgba(230, 245, 230, 0.4); /* 可选:为成功状态叠加一层淡淡的绿色玻璃感 */
/* border-left: none !important; /* 强制移除任何可能的旧左边框 */
}
.toast-notification.success i {
color: var(--success-color); /* 使用CSS变量 */
}
.toast-notification.error {
/* background-color: rgba(250, 230, 230, 0.4); /* 可选:为错误状态叠加一层淡淡的红色玻璃感 */
/* border-left: none !important; */
}
.toast-notification.error i {
color: var(--danger-color); /* 使用CSS变量 */
}
.toast-notification.info {
/* background-color: rgba(230, 240, 250, 0.4); /* 可选:为信息状态叠加一层淡淡的蓝色玻璃感 */
/* border-left: none !important; */
}
.toast-notification.info i {
color: var(--info-color); /* 使用CSS变量 */
}
/* 优化标签表格性能 */
.tag-table {
border-collapse: separate;
border-spacing: 0;
width: 100%;
}
/* 响应式调整 */
@media (max-width: 768px) {
.tag-actions {
flex-direction: column;
}
.tag-search-container {
width: 100%;
}
.load-all-btn {
width: 100%;
justify-content: center;
}
}
/* 标签数量警告样式 */
.tag-count-warning {
margin: 1rem 0 2rem;
padding: 1rem 1.5rem;
background-color: rgba(255, 87, 87, 0.1);
border-left: 4px solid var(--danger-color);
border-radius: var(--radius-md);
display: flex;
align-items: center;
gap: 1rem;
}
.tag-count-warning.moderate {
background-color: rgba(255, 181, 71, 0.1);
border-left: 4px solid var(--warning-color);
}
.tag-count-warning i {
font-size: 1.5rem;
color: var(--danger-color);
}
.tag-count-warning.moderate i {
color: var(--warning-color);
}
.tag-count-warning p {
margin: 0;
color: var(--text-primary);
font-size: 0.95rem;
line-height: 1.5;
}
.tag-count-warning strong {
font-weight: 600;
}
/* 改进加载全部标签按钮 */
.load-all-btn:disabled {
background-color: var(--text-muted);
cursor: not-allowed;
transform: none !important;
opacity: 0.7;
}
.load-all-btn:disabled:hover {
background-color: var(--text-muted);
box-shadow: none;
}
/* 添加标签加载进度样式 */
.loading-progress {
width: 100%;
height: 4px;
background-color: var(--background-color);
border-radius: 2px;
margin: 10px 0;
overflow: hidden;
}
.progress-bar {
height: 100%;
background-color: var(--primary-color);
width: 0%;
transition: width 0.3s ease;
}
.loading-indicator {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 3rem 0;
color: var(--text-secondary);
font-size: 1.1rem;
text-align: center;
}
/* 登录页面特定样式 - 确保按钮正确显示 */
.login-container .captcha-area {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 10px !important;
width: 100% !important;
}
.login-container #captcha {
flex: 1.5 !important;
min-width: 0 !important;
margin: 0 !important;
}
.login-container #captchaText {
flex: 1 !important;
min-width: 80px !important;
height: 44px !important;
text-align: center !important;
line-height: 44px !important;
background-color: #f5f7fa !important;
border: 1px solid #ddd !important;
border-radius: 5px !important;
margin: 0 !important;
}
.login-container .btn-login {
flex: 1 !important;
min-width: 80px !important;
height: 44px !important;
margin: 0 !important;
white-space: nowrap !important;
width: auto !important;
background-color: var(--primary-color) !important;
color: white !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
/* 处理登录按钮在hover时的行为 */
.login-container .btn-login:hover {
background-color: var(--primary-dark) !important;
transform: none !important; /* 防止按钮hover时的上移效果导致布局变化 */
}
/* 确保登录表单中的其他按钮不受影响 */
.login-container button:not(.btn-login) {
width: 100%;
}
/* 修复在移动设备上的显示 */
@media (max-width: 480px) {
.login-container .captcha-area {
flex-wrap: wrap !important;
}
.login-container #captcha {
flex: 100% !important;
margin-bottom: 10px !important;
}
.login-container #captchaText {
flex: 1 !important;
}
.login-container .btn-login {
flex: 1 !important;
}
}
/* 登录按钮样式 */
#loginButton {
display: block !important;
width: 100% !important;
padding: 10px !important;
background-color: var(--primary-color) !important;
color: white !important;
border: none !important;
border-radius: 5px !important;
cursor: pointer !important;
font-size: 16px !important;
margin-top: 15px !important;
}
#loginButton:hover {
background-color: var(--primary-dark-color) !important;
}
.login-form button {
background-color: var(--primary-color) !important;
color: white !important;
}
.login-form button:hover {
background-color: var(--primary-dark-color) !important;
color: white !important;
}
.login-modal .login-content .login-form #loginButton:hover {
background-color: var(--primary-dark-color) !important;
color: white !important;
}
/* ======================
文档内容样式 (Doc Content) - 优化版
====================== */
/* 文档文本容器整体调整 */
#documentationText {
padding: 0.5rem 1.5rem; /* 增加左右内边距 */
max-width: 900px; /* 限制最大宽度以提高可读性 */
/* margin-left: auto; 移除左边距自动 */
/* margin-right: auto; 移除右边距自动 */
}
.doc-content {
font-family: 'Georgia', 'Times New Roman', 'Source Han Serif CN', 'Songti SC', serif; /* 使用更适合阅读的衬线字体 */
line-height: 1.8; /* 增加行高 */
color: #333;
padding-top: 0; /* 移除顶部padding,让标题控制间距 */
margin-bottom: 2rem; /* 内容和元数据之间的间距 */
}
/* 标题样式调整 */
.doc-content h1:first-of-type, /* 优先将第一个h1作为主标题 */
.doc-content h2:first-of-type,
.doc-content h3:first-of-type {
margin-top: 0; /* 移除主标题上方的间距 */
margin-bottom: 1rem; /* 主标题下方间距 */
padding-bottom: 0.5rem; /* 标题下划线间距 */
border-bottom: 2px solid var(--primary-color); /* 强调主标题下划线 */
font-size: 2.5em; /* 增大主标题字号 */
font-weight: 700;
line-height: 1.2;
}
.doc-content h2 {
font-size: 1.8em;
margin-top: 2.5em;
margin-bottom: 1em;
border-bottom: 1px solid #eaecef;
padding-bottom: 0.4em;
font-weight: 600;
}
.doc-content h3 {
font-size: 1.5em;
margin-top: 2em;
margin-bottom: 0.8em;
font-weight: 600;
}
.doc-content h4 {
font-size: 1.25em;
margin-top: 1.8em;
margin-bottom: 0.7em;
font-weight: 600;
color: #444;
}
/* 段落样式 */
.doc-content p {
margin-bottom: 1.5rem; /* 增大段落间距 */
font-size: 1.05rem; /* 稍微增大正文字号 */
}
/* 列表样式 */
.doc-content ul,
.doc-content ol {
padding-left: 1.8em; /* 调整缩进 */
margin-bottom: 1.5rem;
}
.doc-content li {
margin-bottom: 0.6rem;
}
/* 元数据 (更新时间) 样式 */
.doc-meta {
font-size: 0.9em;
color: #888;
text-align: right; /* 右对齐 */
margin-top: 0rem; /* 调整与内容的距离 */
padding-top: 0.5rem; /* 增加顶部内边距 */
border-top: 1px dashed #eee; /* 放到顶部 */
clear: both; /* 确保在内容下方 */
}
/* 代码块样式统一 */
.doc-content pre {
background-color: #1F2937; /* 深色背景 */
color: #F3F4F6; /* 浅色文字 */
padding: 1.2rem 1.5rem; /* 调整内边距 */
border-radius: var(--radius-md);
overflow-x: auto;
margin: 1.8rem 0; /* 增加垂直外边距 */
line-height: 1.6; /* 调整行高 */
border: 1px solid #374151; /* 深色边框 */
font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; /* 使用适合编程的字体 */
font-size: 0.95rem; /* 标准化字体大小 */
position: relative; /* 为复制按钮定位 */
}
.doc-content pre::before {
content: ''; /* 模拟终端窗口的顶部栏 */
display: block;
height: 28px; /* 顶部栏高度 */
background-color: #111827; /* 顶部栏颜色 */
border-top-left-radius: var(--radius-md);
border-top-right-radius: var(--radius-md);
margin: -1.2rem -1.5rem 1rem -1.5rem; /* 定位和添加下方间距 */
position: relative;
}
/* 模拟窗口按钮 */
.doc-content pre::after {
content: '';
position: absolute;
top: 8px;
left: 15px;
width: 12px;
height: 12px;
background-color: #FF5F57;
border-radius: 50%;
box-shadow: 20px 0 #FEBC2E, 40px 0 #28C840;
}
.doc-content pre code {
display: block; /* 确保代码块充满 pre */
background-color: transparent;
padding: 0;
margin: 0;
color: inherit;
border-radius: 0;
border: none;
line-height: inherit;
font-family: inherit;
white-space: pre; /* 保留空格和换行 */
font-size: inherit; /* 继承 pre 的字号 */
}
/* 行内代码样式 */
.doc-content code {
font-family: 'Fira Code', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 0.9em; /* 调整大小 */
background-color: rgba(61, 124, 244, 0.1); /* 更柔和的背景 */
padding: 0.25em 0.5em;
margin: 0 0.1em;
border-radius: 4px;
color: #2c5282; /* 主色调的深色 */
border: 1px solid rgba(61, 124, 244, 0.2);
vertical-align: middle; /* 垂直对齐 */
}
/* 链接样式 */
.doc-content a {
color: var(--primary-dark); /* 使用更深的蓝色 */
text-decoration: underline;
text-decoration-color: rgba(61, 124, 244, 0.4);
transition: all 0.2s ease;
}
.doc-content a:hover {
color: var(--primary-color);
text-decoration-color: var(--primary-color);
background-color: rgba(61, 124, 244, 0.05);
}
/* 引用块样式 */
.doc-content blockquote {
margin: 2em 0;
padding: 1em 1.5em;
color: #555;
border-left: 4px solid var(--primary-light);
background-color: #f8faff; /* 淡蓝色背景 */
border-radius: var(--radius-sm);
}
.doc-content blockquote p:last-child {
margin-bottom: 0;
}
/* 表格样式 */
.doc-content table {
border-collapse: separate; /* 使用 separate 以应用圆角 */
border-spacing: 0;
margin: 1.8rem 0;
width: 100%;
border: 1px solid #e2e8f0;
border-radius: var(--radius-md);
overflow: hidden; /* 应用圆角 */
}
.doc-content th,
.doc-content td {
border-bottom: 1px solid #e2e8f0;
padding: 0.8em 1.2em;
text-align: left;
}
.doc-content tr:last-child td {
border-bottom: none;
}
.doc-content th {
font-weight: 600;
background-color: #f7f9fc; /* 更浅的表头背景 */
color: #4a5568;
}
.doc-content tr:nth-child(even) td {
background-color: #fafcff; /* 斑马纹 */
}
/* 提示消息增强样式 - 修改为居中模态样式 */
.toast-notification {
position: fixed;
/* top: 20px; */ /* 移除顶部定位 */
top: 50%; /* 垂直居中 */
left: 50%;
transform: translate(-50%, -50%); /* 水平垂直居中 */
background-color: white; /* 使用白色背景更像弹窗 */
color: var(--text-primary);
padding: 2rem 2.5rem; /* 增加内边距 */
border-radius: var(--radius-lg); /* 更大的圆角 */
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* 更明显的阴影 */
z-index: 1100;
/* animation: fadeIn 0.3s ease-in; */ /* 可以保留或换成缩放动画 */
animation: fadeInScale 0.3s ease-out; /* 使用新的缩放动画 */
text-align: center;
min-width: 300px; /* 设置最小宽度 */
max-width: 90%;
display: flex;
flex-direction: column; /* 让图标和文字垂直排列 */
align-items: center;
gap: 1rem; /* 图标和文字之间的间距 */
border-left: none; /* 移除之前的左边框 */
border-top: 5px solid var(--info-color); /* 使用顶部边框指示类型 */
}
/* 不同类型的顶部边框颜色 */
.toast-notification.error {
border-top-color: var(--danger-color);
}
.toast-notification.success {
border-top-color: var(--success-color);
}
.toast-notification.info {
border-top-color: var(--info-color);
}
/* 图标样式 */
.toast-notification i {
font-size: 2.5rem; /* 增大图标 */
margin-bottom: 0.5rem; /* 图标下方间距 */
}
.toast-notification.error i {
color: var(--danger-color);
}
.toast-notification.success i {
color: var(--success-color);
}
.toast-notification.info i {
color: var(--info-color);
}
/* 消息文本样式 */
.toast-notification span {
font-size: 1.1rem;
line-height: 1.5;
}
/* 淡出动画 */
.toast-notification.fade-out {
opacity: 0;
transform: translate(-50%, -50%) scale(0.9); /* 淡出时缩小 */
transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
/* 新增:淡入和缩放动画 */
@keyframes fadeInScale {
from {
opacity: 0;
transform: translate(-50%, -50%) scale(0.8);
}
to {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
}
/* ... 其他样式 ... */
/* 表格通用样式 */
.admin-container table {
/* ... (现有表格样式) ... */
}
/* Docker 状态表格特定样式 */
#dockerStatusTable {
table-layout: fixed; /* 固定表格布局,让列宽设定生效 */
width: 100%;
border-collapse: collapse; /* 合并边框 */
margin-top: 1rem; /* 与上方元素保持距离 */
}
#dockerStatusTable th,
#dockerStatusTable td {
padding: 0.8rem 1rem; /* 统一内边距 */
border: 1px solid var(--border-light, #e5e7eb); /* 添加边框 */
vertical-align: middle;
font-size: 0.9rem; /* 稍小字体 */
}
#dockerStatusTable thead th {
background-color: var(--table-header-bg, #f9fafb); /* 表头背景色 */
color: var(--text-secondary, #6b7280);
font-weight: 600; /* 表头字体加粗 */
position: sticky; /* 尝试粘性定位,如果表格滚动 */
top: 0; /* 配合 sticky */
z-index: 1; /* 确保表头在加载提示之上 */
}
/* 为 ID 列设置较窄宽度 */
#dockerStatusTable th:nth-child(1),
#dockerStatusTable td:nth-child(1) {
width: 120px; /* 或 10% */
}
/* 为 名称 列设置最大宽度和文本溢出处理 */
#dockerStatusTable th:nth-child(2),
#dockerStatusTable td:nth-child(2) {
width: 25%; /* 将宽度从原来的过大值减小到25% */
max-width: 250px; /* 限制最大宽度 */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* 为 镜像 列设置最大宽度和文本溢出处理 */
#dockerStatusTable th:nth-child(3),
#dockerStatusTable td:nth-child(3) {
max-width: 300px; /* 可以比名称宽一些 */
width: 35%; /* 尝试百分比宽度 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 为 状态 列设置宽度 */
#dockerStatusTable th:nth-child(4),
#dockerStatusTable td:nth-child(4) {
width: 100px; /* 或 10% */
text-align: center; /* 状态居中 */
}
/* 为 操作 列设置宽度 */
#dockerStatusTable th:nth-child(5),
#dockerStatusTable td:nth-child(5) {
width: 20%;
text-align: center; /* 操作按钮居中 */
}
/* 确保 title 属性的提示能正常显示 */
#dockerStatusTable td:nth-child(2),
#dockerStatusTable td:nth-child(3) {
cursor: default; /* 或 help,提示用户悬停可查看完整信息 */
}
/* 加载提示行样式调整 */
#dockerStatusTable .loading-container td {
background-color: rgba(255, 255, 255, 0.8); /* 半透明背景,避免完全遮挡 */
padding: 2rem 0; /* 增加垂直内边距 */
text-align: center;
color: var(--text-secondary);
}
/* --- 新增:操作下拉菜单样式 --- */
.action-cell {
position: relative; /* 确保下拉菜单相对于单元格定位 */
text-align: center; /* 让按钮居中 */
}
.action-dropdown .dropdown-toggle {
padding: 0.3rem 0.6rem;
font-size: 0.85rem; /* 按钮字体小一点 */
background-color: var(--container-bg);
border: 1px solid var(--border-color);
color: var(--text-secondary);
}
.action-dropdown .dropdown-toggle:hover,
.action-dropdown .dropdown-toggle:focus {
background-color: var(--background-color);
border-color: var(--border-dark);
color: var(--text-primary);
}
.action-dropdown .dropdown-menu {
min-width: 160px; /* 设置最小宽度 */
box-shadow: var(--shadow-md);
border: 1px solid var(--border-light);
padding: 0.5rem 0;
margin-top: 0.25rem; /* 微调与按钮的距离 */
}
.action-dropdown .dropdown-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.6rem 1.2rem; /* 调整内边距 */
font-size: 0.9rem;
color: var(--text-secondary);
cursor: pointer;
white-space: nowrap;
}
.action-dropdown .dropdown-item:hover {
background-color: var(--background-color);
color: var(--text-primary);
}
.action-dropdown .dropdown-item i {
width: 16px; /* 固定图标宽度 */
text-align: center;
color: var(--text-muted);
transition: color var(--transition-fast);
}
.action-dropdown .dropdown-item:hover i {
color: var(--primary-color);
}
.action-dropdown .dropdown-item.text-danger,
.action-dropdown .dropdown-item.text-danger:hover {
color: var(--danger-color) !important;
}
.action-dropdown .dropdown-item.text-danger i {
color: var(--danger-color) !important;
}
/* --- 结束:操作下拉菜单样式 --- */
/* --- 新增:详情弹窗表格样式 --- */
.details-swal-popup .details-table-container {
max-height: 70vh;
overflow-y: auto;
text-align: left; /* 确保内容左对齐 */
}
.details-swal-popup .details-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}
.details-swal-popup .details-table thead th {
background-color: var(--table-header-bg, #f9fafb);
color: var(--text-secondary, #6b7280);
font-weight: 600;
text-align: left; /* 确保表头左对齐 */
padding: 0.8rem 1rem;
border-bottom: 2px solid var(--border-dark, #e5e7eb);
position: sticky; /* 表头粘性定位 */
top: 0;
z-index: 1;
}
.details-swal-popup .details-table tbody td {
padding: 8px 12px;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
word-break: break-word;
font-family: monospace;
white-space: pre-wrap;
text-align: left; /* 确保文本左对齐 */
font-size: 14px;
}
.details-swal-popup .details-table tbody tr:last-child td {
border-bottom: none;
}
.details-swal-popup .details-table tbody tr:hover td {
background-color: var(--background-color, #f8f9fa);
}
.details-swal-popup .details-table .badge {
font-size: 0.8rem; /* 状态徽章字体稍小 */
}
/* --- 结束:详情弹窗表格样式 --- */
/* --- 新增:资源详情表格特殊样式 (两列) --- */
.details-swal-popup .resource-details-table td.label {
font-weight: 600; /* 标签加粗 */
width: 40%; /* 设定标签列宽度 */
color: var(--text-secondary); /* 标签颜色稍浅 */
padding-right: 1.5rem; /* 标签和值之间的距离 */
white-space: nowrap; /* 防止标签换行 */
}
.details-swal-popup .resource-details-table td {
border-bottom: 1px dashed var(--border-light, #e5e7eb); /* 使用虚线分隔行 */
}
/* --- 结束:资源详情表格特殊样式 --- */
/* --- 新增:资源详情类 Excel 表格样式 --- */
.details-swal-popup .resource-details-excel {
table-layout: fixed; /* 固定布局 */
width: 100%;
margin-top: 0; /* 移除与容器的顶部距离 */
}
.details-swal-popup .resource-details-excel thead th {
text-align: center; /* 表头居中 */
white-space: nowrap;
border: 1px solid var(--border-dark, #dee2e6); /* 使用更深的边框 */
padding: 0.6rem 0.5rem; /* 调整内边距 */
}
.details-swal-popup .resource-details-excel tbody td {
text-align: center; /* 数据居中 */
padding: 0.6rem 0.5rem;
border: 1px solid var(--border-color, #dee2e6);
word-break: break-all; /* 允许长内容换行 */
}
/* --- 结束:资源详情类 Excel 表格样式 --- */
/* ... 其他样式 ... */
/* 导航菜单样式 */
.nav-menu {
display: flex;
align-items: center;
}
.nav-menu .nav-list {
display: flex;
list-style: none;
margin: 0;
padding: 0;
}
.nav-menu .nav-list li {
margin-left: 20px;
}
.nav-menu .nav-list li a {
color: #fff;
text-decoration: none;
font-size: 14px;
transition: color 0.3s;
}
.nav-menu .nav-list li a:hover {
color: #3d7cf4;
}
.menu-toggle {
display: none;
cursor: pointer;
font-size: 1.5rem;
color: #fff;
}
/* 移动设备适配 */
@media (max-width: 768px) {
.nav-menu {
position: relative;
}
.menu-toggle {
display: block;
}
.nav-menu .nav-list {
position: absolute;
top: 100%;
right: 0;
flex-direction: column;
background-color: #111;
padding: 20px;
border-radius: 5px;
display: none;
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
z-index: 1000;
}
.nav-menu.active .nav-list {
display: flex;
}
.nav-menu .nav-list li {
margin: 10px 0;
}
}
.no-menu, .menu-error {
color: #ff6b6b;
font-size: 14px;
margin-right: 20px;
}
/* 操作按钮布局优化 */
.action-cell {
white-space: nowrap;
text-align: center;
display: flex;
justify-content: center;
gap: 5px; /* 使用gap来控制按钮间隔 */
}
.action-cell button,
.action-cell .btn {
margin: 0;
padding: 5px 8px;
font-size: 13px;
display: inline-block;
min-width: auto; /* 防止按钮过宽 */
flex-shrink: 0; /* 防止按钮被压缩 */
}
/* 确保操作按钮保持在一行 */
#dockerStatusTable th:last-child,
#dockerStatusTable td:last-child {
width: auto;
min-width: 180px; /* 确保有足够的空间放置按钮 */
white-space: nowrap;
}
/* 日志弹窗内容优化 */
.log-content {
text-align: left;
font-family: 'Courier New', monospace;
white-space: pre-wrap;
overflow-x: auto;
background-color: #f5f5f5;
padding: 15px;
border-radius: 5px;
max-height: 60vh;
overflow-y: auto;
}
/* 确保SweetAlert2弹窗内容左对齐 */
.swal2-html-container {
text-align: left !important;
}
/* 确保弹窗样式优先级最高 */
.swal2-popup .swal2-html-container,
.swal2-popup .swal2-content {
text-align: left !important;
}
.swal2-popup pre,
.swal2-popup code,
.swal2-popup .log-content {
text-align: left !important;
direction: ltr !important;
font-family: 'Courier New', monospace !important;
font-size: 14px !important;
line-height: 1.5 !important;
}
/* 调整容器表格布局 */
#dockerStatusTable {
table-layout: fixed;
width: 100%;
}
/* 容器ID/名称列宽度 */
#dockerStatusTable th:nth-child(1),
#dockerStatusTable td:nth-child(1) {
width: 20%;
}
/* 镜像名称列宽度 */
#dockerStatusTable th:nth-child(2),
#dockerStatusTable td:nth-child(2) {
width: 25%;
max-width: 250px;
}
/* 容器状态列宽度 */
#dockerStatusTable th:nth-child(3),
#dockerStatusTable td:nth-child(3) {
width: 15%;
}
/* 创建时间列宽度 */
#dockerStatusTable th:nth-child(4),
#dockerStatusTable td:nth-child(4) {
width: 20%;
}
/* 操作列宽度 */
#dockerStatusTable th:nth-child(5),
#dockerStatusTable td:nth-child(5) {
width: 20%;
}
/* 新增:使教程页面的代码块在悬停时也显示复制按钮 */
#documentationText pre:hover .copy-btn,
.doc-content pre:hover .copy-btn {
opacity: 1;
}