| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709 |
- /* ==================== 全局样式 ==================== */
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- :root {
- /* 明亮主题 */
- --primary-color: #3498db;
- --secondary-color: #2ecc71;
- --danger-color: #e74c3c;
- --warning-color: #f39c12;
- --bg-color: #f5f7fa;
- --panel-bg: #ffffff;
- --text-color: #2c3e50;
- --text-secondary: #7f8c8d;
- --border-color: #e1e8ed;
- --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
- --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
- --transition: all 0.3s ease;
- }
- body.dark-theme {
- /* 暗黑主题 */
- --bg-color: #1a1a2e;
- --panel-bg: #16213e;
- --text-color: #eaeaea;
- --text-secondary: #a0a0a0;
- --border-color: #2a2a3e;
- --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
- --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.5);
- }
- body {
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
- background-color: var(--bg-color);
- color: var(--text-color);
- line-height: 1.6;
- }
- /* ==================== 顶部标题栏 ==================== */
- .header {
- background: var(--panel-bg);
- border-bottom: 1px solid var(--border-color);
- box-shadow: var(--shadow);
- position: sticky;
- top: 0;
- z-index: 100;
- }
- .header-content {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 1rem 2rem;
- }
- .header-title {
- font-size: 1.5rem;
- color: var(--primary-color);
- font-weight: 600;
- }
- .header-stats {
- display: flex;
- gap: 2rem;
- }
- .stat-item {
- display: flex;
- align-items: center;
- gap: 0.5rem;
- }
- .stat-label {
- color: var(--text-secondary);
- font-size: 0.875rem;
- }
- .stat-value {
- font-weight: 600;
- color: var(--primary-color);
- font-size: 1.125rem;
- }
- /* ==================== 工具栏 ==================== */
- .toolbar {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 1rem 2rem;
- gap: 1rem;
- border-top: 1px solid var(--border-color);
- }
- .search-box {
- display: flex;
- flex: 1;
- max-width: 400px;
- }
- .search-input {
- flex: 1;
- padding: 0.5rem 1rem;
- border: 1px solid var(--border-color);
- border-radius: 4px 0 0 4px;
- font-size: 0.875rem;
- background: var(--bg-color);
- color: var(--text-color);
- }
- .search-input:focus {
- outline: none;
- border-color: var(--primary-color);
- }
- .search-btn {
- padding: 0.5rem 1rem;
- background: var(--primary-color);
- color: white;
- border: none;
- border-radius: 0 4px 4px 0;
- cursor: pointer;
- transition: var(--transition);
- }
- .search-btn:hover {
- background: #2980b9;
- }
- .filter-box {
- display: flex;
- gap: 0.5rem;
- }
- .filter-select {
- padding: 0.5rem 1rem;
- border: 1px solid var(--border-color);
- border-radius: 4px;
- background: var(--panel-bg);
- color: var(--text-color);
- cursor: pointer;
- }
- .theme-toggle {
- padding: 0.5rem 1rem;
- background: var(--panel-bg);
- border: 1px solid var(--border-color);
- border-radius: 4px;
- cursor: pointer;
- font-size: 1.2rem;
- transition: var(--transition);
- }
- .theme-toggle:hover {
- background: var(--bg-color);
- }
- /* ==================== 主容器布局 ==================== */
- .main-container {
- display: flex;
- height: calc(100vh - 180px);
- gap: 1rem;
- padding: 1rem;
- }
- /* ==================== 左侧树形列表 ==================== */
- .sidebar {
- width: 30%;
- min-width: 300px;
- background: var(--panel-bg);
- border-radius: 8px;
- box-shadow: var(--shadow);
- display: flex;
- flex-direction: column;
- overflow: hidden;
- }
- .sidebar-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 1rem;
- border-bottom: 1px solid var(--border-color);
- }
- .sidebar-title {
- font-size: 1.125rem;
- font-weight: 600;
- }
- .collapse-all-btn {
- padding: 0.25rem 0.75rem;
- background: var(--bg-color);
- border: 1px solid var(--border-color);
- border-radius: 4px;
- font-size: 0.75rem;
- cursor: pointer;
- transition: var(--transition);
- }
- .collapse-all-btn:hover {
- background: var(--primary-color);
- color: white;
- border-color: var(--primary-color);
- }
- .tree-container {
- flex: 1;
- overflow-y: auto;
- padding: 0.5rem;
- }
- /* 树节点样式 */
- .tree-node {
- margin-bottom: 0.25rem;
- }
- .tree-node-content {
- display: flex;
- align-items: center;
- padding: 0.5rem;
- border-radius: 4px;
- cursor: pointer;
- transition: var(--transition);
- user-select: none;
- }
- .tree-node-content:hover {
- background: var(--bg-color);
- }
- .tree-node-content.active {
- background: var(--primary-color);
- color: white;
- }
- .tree-node-icon {
- margin-right: 0.5rem;
- font-size: 1rem;
- cursor: pointer;
- width: 20px;
- display: inline-block;
- }
- .tree-node-icon.expanded::before {
- content: '▼';
- }
- .tree-node-icon.collapsed::before {
- content: '▶';
- }
- .tree-node-icon.no-children::before {
- content: '•';
- font-size: 0.75rem;
- }
- .tree-node-label {
- flex: 1;
- font-size: 0.875rem;
- }
- .tree-node-badge {
- padding: 0.125rem 0.5rem;
- background: var(--secondary-color);
- color: white;
- border-radius: 12px;
- font-size: 0.75rem;
- margin-left: 0.5rem;
- }
- .tree-node-badge.status-failed {
- background: var(--danger-color);
- }
- .tree-node-badge.status-pending {
- background: var(--warning-color);
- }
- .tree-node-children {
- margin-left: 1.5rem;
- display: none;
- }
- .tree-node-children.expanded {
- display: block;
- }
- /* 不同层级的样式 */
- .tree-node.level-1 .tree-node-label {
- font-weight: 600;
- font-size: 1rem;
- }
- .tree-node.level-2 .tree-node-label {
- font-weight: 500;
- }
- .tree-node.level-3 .tree-node-label {
- font-size: 0.875rem;
- }
- .tree-node.level-4 .tree-node-label {
- font-size: 0.8125rem;
- color: var(--text-secondary);
- }
- /* ==================== 右侧内容面板 ==================== */
- .content-panel {
- flex: 1;
- background: var(--panel-bg);
- border-radius: 8px;
- box-shadow: var(--shadow);
- display: flex;
- flex-direction: column;
- overflow: hidden;
- }
- .panel-header {
- padding: 1rem;
- border-bottom: 1px solid var(--border-color);
- }
- .panel-title {
- font-size: 1.125rem;
- font-weight: 600;
- margin-bottom: 0.5rem;
- }
- .panel-info {
- font-size: 0.875rem;
- color: var(--text-secondary);
- }
- .cards-container {
- flex: 1;
- overflow-y: auto;
- padding: 1rem;
- }
- /* 空状态 */
- .empty-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- height: 100%;
- color: var(--text-secondary);
- }
- .empty-icon {
- font-size: 4rem;
- margin-bottom: 1rem;
- opacity: 0.5;
- }
- .empty-text {
- font-size: 1rem;
- }
- /* ==================== 帖子卡片 ==================== */
- .note-card {
- background: var(--panel-bg);
- border: 1px solid var(--border-color);
- border-radius: 8px;
- padding: 1rem;
- margin-bottom: 1rem;
- box-shadow: var(--shadow);
- transition: var(--transition);
- }
- .note-card:hover {
- box-shadow: var(--shadow-hover);
- transform: translateY(-2px);
- }
- /* 卡片头部 */
- .card-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 1rem;
- }
- .card-user {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- }
- .card-avatar {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- object-fit: cover;
- }
- .card-user-info {
- display: flex;
- flex-direction: column;
- }
- .card-username {
- font-weight: 600;
- font-size: 0.875rem;
- }
- .card-time {
- font-size: 0.75rem;
- color: var(--text-secondary);
- }
- /* 图片轮播 */
- .card-carousel {
- position: relative;
- display: flex;
- justify-content: center;
- margin-top: 1.5rem;
- margin-bottom: 1.5rem;
- margin-left: auto;
- margin-right: auto;
- max-width: 600px;
- border-radius: 8px;
- overflow: hidden;
- background: var(--bg-color);
- }
- .carousel-images {
- display: flex;
- transition: transform 0.3s ease;
- }
- .carousel-image {
- min-width: 100%;
- width: 100%;
- height: auto;
- flex-shrink: 0;
- object-fit: contain;
- max-height: 500px;
- cursor: pointer;
- }
- .carousel-controls {
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- width: 100%;
- display: flex;
- justify-content: space-between;
- padding: 0 0.5rem;
- opacity: 0;
- transition: opacity 0.3s;
- }
- .card-carousel:hover .carousel-controls {
- opacity: 1;
- }
- .carousel-btn {
- background: rgba(0, 0, 0, 0.6);
- color: white;
- border: none;
- width: 40px;
- height: 40px;
- border-radius: 50%;
- font-size: 1.5rem;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: var(--transition);
- }
- .carousel-btn:hover {
- background: rgba(0, 0, 0, 0.8);
- }
- .carousel-indicators {
- position: absolute;
- bottom: 1rem;
- left: 50%;
- transform: translateX(-50%);
- display: flex;
- gap: 0.5rem;
- }
- .carousel-indicator {
- width: 8px;
- height: 8px;
- border-radius: 50%;
- background: rgba(255, 255, 255, 0.5);
- cursor: pointer;
- transition: var(--transition);
- }
- .carousel-indicator.active {
- background: white;
- width: 24px;
- border-radius: 4px;
- }
- /* 卡片内容 */
- .card-title {
- font-size: 1.125rem;
- font-weight: 600;
- margin-bottom: 0.75rem;
- line-height: 1.4;
- }
- .card-desc {
- font-size: 0.875rem;
- color: var(--text-secondary);
- line-height: 1.6;
- margin-bottom: 1rem;
- max-height: 100px;
- overflow: hidden;
- position: relative;
- }
- .card-desc.expanded {
- max-height: none;
- }
- .card-desc-toggle {
- color: var(--primary-color);
- cursor: pointer;
- font-size: 0.875rem;
- margin-top: 0.5rem;
- display: inline-block;
- }
- /* 卡片底部交互数据 */
- .card-stats {
- display: flex;
- gap: 1.5rem;
- padding-top: 1rem;
- border-top: 1px solid var(--border-color);
- }
- .card-stat {
- display: flex;
- align-items: center;
- gap: 0.25rem;
- font-size: 0.875rem;
- color: var(--text-secondary);
- }
- .card-stat-icon {
- font-size: 1rem;
- }
- /* ==================== 图片查看器模态框 ==================== */
- .modal {
- display: none;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 1000;
- }
- .modal.active {
- display: block;
- }
- .modal-overlay {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: rgba(0, 0, 0, 0.9);
- }
- .modal-content {
- position: relative;
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .modal-image {
- max-width: 90%;
- max-height: 90%;
- object-fit: contain;
- }
- .modal-close {
- position: absolute;
- top: 1rem;
- right: 1rem;
- background: rgba(0, 0, 0, 0.6);
- color: white;
- border: none;
- width: 40px;
- height: 40px;
- border-radius: 50%;
- font-size: 2rem;
- cursor: pointer;
- line-height: 1;
- }
- .modal-prev,
- .modal-next {
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- background: rgba(0, 0, 0, 0.6);
- color: white;
- border: none;
- width: 50px;
- height: 50px;
- border-radius: 50%;
- font-size: 2rem;
- cursor: pointer;
- transition: var(--transition);
- }
- .modal-prev {
- left: 2rem;
- }
- .modal-next {
- right: 2rem;
- }
- .modal-prev:hover,
- .modal-next:hover,
- .modal-close:hover {
- background: rgba(0, 0, 0, 0.8);
- }
- .modal-caption {
- position: absolute;
- bottom: 2rem;
- left: 50%;
- transform: translateX(-50%);
- color: white;
- background: rgba(0, 0, 0, 0.6);
- padding: 0.5rem 1rem;
- border-radius: 4px;
- }
- /* ==================== 加载和滚动条 ==================== */
- .loading {
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 2rem;
- color: var(--text-secondary);
- }
- /* 自定义滚动条 */
- ::-webkit-scrollbar {
- width: 8px;
- height: 8px;
- }
- ::-webkit-scrollbar-track {
- background: var(--bg-color);
- }
- ::-webkit-scrollbar-thumb {
- background: var(--border-color);
- border-radius: 4px;
- }
- ::-webkit-scrollbar-thumb:hover {
- background: var(--text-secondary);
- }
- /* ==================== 响应式设计 ==================== */
- @media (max-width: 1024px) {
- .sidebar {
- width: 40%;
- min-width: 250px;
- }
- }
- @media (max-width: 768px) {
- .header-content {
- flex-direction: column;
- gap: 1rem;
- }
- .toolbar {
- flex-direction: column;
- align-items: stretch;
- }
- .search-box {
- max-width: none;
- }
- .main-container {
- flex-direction: column;
- height: auto;
- }
- .sidebar {
- width: 100%;
- max-height: 300px;
- }
- }
|