text-classify-ui/static/css/dashboard.css
superlishunqin f434b83090 first commit
2025-03-17 22:43:53 +08:00

206 lines
3.5 KiB
CSS

/* static/css/dashboard.css */
:root {
--sidebar-width: 250px;
}
body {
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
background-color: #f8f9fa;
}
/* 顶部导航 */
.top-navbar {
height: 60px;
background-color: #343a40;
color: white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
z-index: 1030;
}
/* 侧边栏 */
.sidebar {
width: var(--sidebar-width);
position: fixed;
top: 60px;
left: 0;
bottom: 0;
background-color: #343a40;
color: white;
padding-top: 20px;
overflow-y: auto;
transition: all 0.3s;
z-index: 1020;
}
.sidebar-link {
padding: 10px 15px;
color: rgba(255, 255, 255, 0.8);
display: flex;
align-items: center;
text-decoration: none;
transition: all 0.3s;
}
.sidebar-link:hover {
color: white;
background-color: rgba(255, 255, 255, 0.1);
}
.sidebar-link.active {
color: white;
background-color: rgba(255, 255, 255, 0.2);
border-left: 4px solid #007bff;
}
.sidebar-link i {
margin-right: 10px;
width: 20px;
text-align: center;
}
/* 主内容区 */
.main-content {
margin-left: var(--sidebar-width);
margin-top: 60px;
padding: 20px;
transition: all 0.3s;
}
/* 响应式设计 */
@media (max-width: 768px) {
.sidebar {
margin-left: calc(-1 * var(--sidebar-width));
}
.sidebar.active {
margin-left: 0;
}
.main-content {
margin-left: 0;
}
.main-content.sidebar-active {
margin-left: var(--sidebar-width);
}
}
/* 用户下拉菜单 */
.user-dropdown .dropdown-toggle::after {
display: none;
}
.user-dropdown .dropdown-menu {
right: 0;
left: auto;
}
/* 内容卡片 */
.content-card {
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
padding: 20px;
margin-bottom: 20px;
}
/* 加载指示器 */
.spinner-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(255, 255, 255, 0.7);
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
visibility: hidden;
opacity: 0;
transition: all 0.3s;
}
.spinner-overlay.show {
visibility: visible;
opacity: 1;
}
/* 结果容器 */
#classification-result.result-success {
border-color: #28a745 !important;
}
#classification-result.result-error {
border-color: #dc3545 !important;
}
/* 表格样式 */
.table th {
background-color: #f8f9fa;
font-weight: 600;
}
/* 文件大小显示 */
.file-size {
font-family: monospace;
color: #6c757d;
}
/* 分类标签样式 */
.category-badge {
font-size: 0.85rem;
font-weight: 500;
padding: 0.35em 0.65em;
}
/* 分页控件 */
.pagination {
margin-bottom: 0;
}
.pagination .page-item.active .page-link {
background-color: #007bff;
border-color: #007bff;
}
/* 批量上传区域 */
.upload-area {
border: 2px dashed #dee2e6;
border-radius: 8px;
transition: all 0.3s;
}
.upload-area:hover {
border-color: #007bff;
}
/* 文件操作按钮 */
.file-action-btn {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
}
/* 结果统计卡片 */
.stat-card {
padding: 1rem;
border-radius: 6px;
margin-bottom: 1rem;
}
.stat-value {
font-size: 2rem;
font-weight: 700;
}
/* 置信度进度条 */
.confidence-bar {
height: 10px;
margin-top: 5px;
}
/* 类别分布图 */
.category-chart-container {
height: 300px;
margin: 1rem 0;
}