style.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. /* ==================== 全局样式 ==================== */
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. box-sizing: border-box;
  6. }
  7. :root {
  8. /* 明亮主题 */
  9. --primary-color: #3498db;
  10. --secondary-color: #2ecc71;
  11. --danger-color: #e74c3c;
  12. --warning-color: #f39c12;
  13. --bg-color: #f5f7fa;
  14. --panel-bg: #ffffff;
  15. --text-color: #2c3e50;
  16. --text-secondary: #7f8c8d;
  17. --border-color: #e1e8ed;
  18. --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  19. --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
  20. --transition: all 0.3s ease;
  21. }
  22. body.dark-theme {
  23. /* 暗黑主题 */
  24. --bg-color: #1a1a2e;
  25. --panel-bg: #16213e;
  26. --text-color: #eaeaea;
  27. --text-secondary: #a0a0a0;
  28. --border-color: #2a2a3e;
  29. --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  30. --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.5);
  31. }
  32. body {
  33. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  34. background-color: var(--bg-color);
  35. color: var(--text-color);
  36. line-height: 1.6;
  37. }
  38. /* ==================== 顶部标题栏 ==================== */
  39. .header {
  40. background: var(--panel-bg);
  41. border-bottom: 1px solid var(--border-color);
  42. box-shadow: var(--shadow);
  43. position: sticky;
  44. top: 0;
  45. z-index: 100;
  46. }
  47. .header-content {
  48. display: flex;
  49. justify-content: space-between;
  50. align-items: center;
  51. padding: 1rem 2rem;
  52. }
  53. .header-title {
  54. font-size: 1.5rem;
  55. color: var(--primary-color);
  56. font-weight: 600;
  57. }
  58. .header-stats {
  59. display: flex;
  60. gap: 2rem;
  61. }
  62. .stat-item {
  63. display: flex;
  64. align-items: center;
  65. gap: 0.5rem;
  66. }
  67. .stat-label {
  68. color: var(--text-secondary);
  69. font-size: 0.875rem;
  70. }
  71. .stat-value {
  72. font-weight: 600;
  73. color: var(--primary-color);
  74. font-size: 1.125rem;
  75. }
  76. /* ==================== 工具栏 ==================== */
  77. .toolbar {
  78. display: flex;
  79. justify-content: space-between;
  80. align-items: center;
  81. padding: 1rem 2rem;
  82. gap: 1rem;
  83. border-top: 1px solid var(--border-color);
  84. }
  85. .search-box {
  86. display: flex;
  87. flex: 1;
  88. max-width: 400px;
  89. }
  90. .search-input {
  91. flex: 1;
  92. padding: 0.5rem 1rem;
  93. border: 1px solid var(--border-color);
  94. border-radius: 4px 0 0 4px;
  95. font-size: 0.875rem;
  96. background: var(--bg-color);
  97. color: var(--text-color);
  98. }
  99. .search-input:focus {
  100. outline: none;
  101. border-color: var(--primary-color);
  102. }
  103. .search-btn {
  104. padding: 0.5rem 1rem;
  105. background: var(--primary-color);
  106. color: white;
  107. border: none;
  108. border-radius: 0 4px 4px 0;
  109. cursor: pointer;
  110. transition: var(--transition);
  111. }
  112. .search-btn:hover {
  113. background: #2980b9;
  114. }
  115. .filter-box {
  116. display: flex;
  117. gap: 0.5rem;
  118. }
  119. .filter-select {
  120. padding: 0.5rem 1rem;
  121. border: 1px solid var(--border-color);
  122. border-radius: 4px;
  123. background: var(--panel-bg);
  124. color: var(--text-color);
  125. cursor: pointer;
  126. }
  127. .theme-toggle {
  128. padding: 0.5rem 1rem;
  129. background: var(--panel-bg);
  130. border: 1px solid var(--border-color);
  131. border-radius: 4px;
  132. cursor: pointer;
  133. font-size: 1.2rem;
  134. transition: var(--transition);
  135. }
  136. .theme-toggle:hover {
  137. background: var(--bg-color);
  138. }
  139. /* ==================== 主容器布局 ==================== */
  140. .main-container {
  141. display: flex;
  142. height: calc(100vh - 180px);
  143. gap: 1rem;
  144. padding: 1rem;
  145. }
  146. /* ==================== 左侧树形列表 ==================== */
  147. .sidebar {
  148. width: 30%;
  149. min-width: 300px;
  150. background: var(--panel-bg);
  151. border-radius: 8px;
  152. box-shadow: var(--shadow);
  153. display: flex;
  154. flex-direction: column;
  155. overflow: hidden;
  156. }
  157. .sidebar-header {
  158. display: flex;
  159. justify-content: space-between;
  160. align-items: center;
  161. padding: 1rem;
  162. border-bottom: 1px solid var(--border-color);
  163. }
  164. .sidebar-title {
  165. font-size: 1.125rem;
  166. font-weight: 600;
  167. }
  168. .collapse-all-btn {
  169. padding: 0.25rem 0.75rem;
  170. background: var(--bg-color);
  171. border: 1px solid var(--border-color);
  172. border-radius: 4px;
  173. font-size: 0.75rem;
  174. cursor: pointer;
  175. transition: var(--transition);
  176. }
  177. .collapse-all-btn:hover {
  178. background: var(--primary-color);
  179. color: white;
  180. border-color: var(--primary-color);
  181. }
  182. .tree-container {
  183. flex: 1;
  184. overflow-y: auto;
  185. padding: 0.5rem;
  186. }
  187. /* 树节点样式 */
  188. .tree-node {
  189. margin-bottom: 0.25rem;
  190. }
  191. .tree-node-content {
  192. display: flex;
  193. align-items: center;
  194. padding: 0.5rem;
  195. border-radius: 4px;
  196. cursor: pointer;
  197. transition: var(--transition);
  198. user-select: none;
  199. }
  200. .tree-node-content:hover {
  201. background: var(--bg-color);
  202. }
  203. .tree-node-content.active {
  204. background: var(--primary-color);
  205. color: white;
  206. }
  207. .tree-node-icon {
  208. margin-right: 0.5rem;
  209. font-size: 1rem;
  210. cursor: pointer;
  211. width: 20px;
  212. display: inline-block;
  213. }
  214. .tree-node-icon.expanded::before {
  215. content: '▼';
  216. }
  217. .tree-node-icon.collapsed::before {
  218. content: '▶';
  219. }
  220. .tree-node-icon.no-children::before {
  221. content: '•';
  222. font-size: 0.75rem;
  223. }
  224. .tree-node-label {
  225. flex: 1;
  226. font-size: 0.875rem;
  227. }
  228. .tree-node-badge {
  229. padding: 0.125rem 0.5rem;
  230. background: var(--secondary-color);
  231. color: white;
  232. border-radius: 12px;
  233. font-size: 0.75rem;
  234. margin-left: 0.5rem;
  235. }
  236. .tree-node-badge.status-failed {
  237. background: var(--danger-color);
  238. }
  239. .tree-node-badge.status-pending {
  240. background: var(--warning-color);
  241. }
  242. .tree-node-children {
  243. margin-left: 1.5rem;
  244. display: none;
  245. }
  246. .tree-node-children.expanded {
  247. display: block;
  248. }
  249. /* 不同层级的样式 */
  250. .tree-node.level-1 .tree-node-label {
  251. font-weight: 600;
  252. font-size: 1rem;
  253. }
  254. .tree-node.level-2 .tree-node-label {
  255. font-weight: 500;
  256. }
  257. .tree-node.level-3 .tree-node-label {
  258. font-size: 0.875rem;
  259. }
  260. .tree-node.level-4 .tree-node-label {
  261. font-size: 0.8125rem;
  262. color: var(--text-secondary);
  263. }
  264. /* ==================== 右侧内容面板 ==================== */
  265. .content-panel {
  266. flex: 1;
  267. background: var(--panel-bg);
  268. border-radius: 8px;
  269. box-shadow: var(--shadow);
  270. display: flex;
  271. flex-direction: column;
  272. overflow: hidden;
  273. }
  274. .panel-header {
  275. padding: 1rem;
  276. border-bottom: 1px solid var(--border-color);
  277. }
  278. .panel-title {
  279. font-size: 1.125rem;
  280. font-weight: 600;
  281. margin-bottom: 0.5rem;
  282. }
  283. .panel-info {
  284. font-size: 0.875rem;
  285. color: var(--text-secondary);
  286. }
  287. .cards-container {
  288. flex: 1;
  289. overflow-y: auto;
  290. padding: 1rem;
  291. }
  292. /* 空状态 */
  293. .empty-state {
  294. display: flex;
  295. flex-direction: column;
  296. align-items: center;
  297. justify-content: center;
  298. height: 100%;
  299. color: var(--text-secondary);
  300. }
  301. .empty-icon {
  302. font-size: 4rem;
  303. margin-bottom: 1rem;
  304. opacity: 0.5;
  305. }
  306. .empty-text {
  307. font-size: 1rem;
  308. }
  309. /* ==================== 帖子卡片 ==================== */
  310. .note-card {
  311. background: var(--panel-bg);
  312. border: 1px solid var(--border-color);
  313. border-radius: 8px;
  314. padding: 1rem;
  315. margin-bottom: 1rem;
  316. box-shadow: var(--shadow);
  317. transition: var(--transition);
  318. }
  319. .note-card:hover {
  320. box-shadow: var(--shadow-hover);
  321. transform: translateY(-2px);
  322. }
  323. /* 卡片头部 */
  324. .card-header {
  325. display: flex;
  326. justify-content: space-between;
  327. align-items: center;
  328. margin-bottom: 1rem;
  329. }
  330. .card-user {
  331. display: flex;
  332. align-items: center;
  333. gap: 0.75rem;
  334. }
  335. .card-avatar {
  336. width: 40px;
  337. height: 40px;
  338. border-radius: 50%;
  339. object-fit: cover;
  340. }
  341. .card-user-info {
  342. display: flex;
  343. flex-direction: column;
  344. }
  345. .card-username {
  346. font-weight: 600;
  347. font-size: 0.875rem;
  348. }
  349. .card-time {
  350. font-size: 0.75rem;
  351. color: var(--text-secondary);
  352. }
  353. /* 图片轮播 */
  354. .card-carousel {
  355. position: relative;
  356. display: flex;
  357. justify-content: center;
  358. margin-top: 1.5rem;
  359. margin-bottom: 1.5rem;
  360. margin-left: auto;
  361. margin-right: auto;
  362. max-width: 600px;
  363. border-radius: 8px;
  364. overflow: hidden;
  365. background: var(--bg-color);
  366. }
  367. .carousel-images {
  368. display: flex;
  369. transition: transform 0.3s ease;
  370. }
  371. .carousel-image {
  372. min-width: 100%;
  373. width: 100%;
  374. height: auto;
  375. flex-shrink: 0;
  376. object-fit: contain;
  377. max-height: 500px;
  378. cursor: pointer;
  379. }
  380. .carousel-controls {
  381. position: absolute;
  382. top: 50%;
  383. transform: translateY(-50%);
  384. width: 100%;
  385. display: flex;
  386. justify-content: space-between;
  387. padding: 0 0.5rem;
  388. opacity: 0;
  389. transition: opacity 0.3s;
  390. }
  391. .card-carousel:hover .carousel-controls {
  392. opacity: 1;
  393. }
  394. .carousel-btn {
  395. background: rgba(0, 0, 0, 0.6);
  396. color: white;
  397. border: none;
  398. width: 40px;
  399. height: 40px;
  400. border-radius: 50%;
  401. font-size: 1.5rem;
  402. cursor: pointer;
  403. display: flex;
  404. align-items: center;
  405. justify-content: center;
  406. transition: var(--transition);
  407. }
  408. .carousel-btn:hover {
  409. background: rgba(0, 0, 0, 0.8);
  410. }
  411. .carousel-indicators {
  412. position: absolute;
  413. bottom: 1rem;
  414. left: 50%;
  415. transform: translateX(-50%);
  416. display: flex;
  417. gap: 0.5rem;
  418. }
  419. .carousel-indicator {
  420. width: 8px;
  421. height: 8px;
  422. border-radius: 50%;
  423. background: rgba(255, 255, 255, 0.5);
  424. cursor: pointer;
  425. transition: var(--transition);
  426. }
  427. .carousel-indicator.active {
  428. background: white;
  429. width: 24px;
  430. border-radius: 4px;
  431. }
  432. /* 卡片内容 */
  433. .card-title {
  434. font-size: 1.125rem;
  435. font-weight: 600;
  436. margin-bottom: 0.75rem;
  437. line-height: 1.4;
  438. }
  439. .card-desc {
  440. font-size: 0.875rem;
  441. color: var(--text-secondary);
  442. line-height: 1.6;
  443. margin-bottom: 1rem;
  444. max-height: 100px;
  445. overflow: hidden;
  446. position: relative;
  447. }
  448. .card-desc.expanded {
  449. max-height: none;
  450. }
  451. .card-desc-toggle {
  452. color: var(--primary-color);
  453. cursor: pointer;
  454. font-size: 0.875rem;
  455. margin-top: 0.5rem;
  456. display: inline-block;
  457. }
  458. /* 卡片底部交互数据 */
  459. .card-stats {
  460. display: flex;
  461. gap: 1.5rem;
  462. padding-top: 1rem;
  463. border-top: 1px solid var(--border-color);
  464. }
  465. .card-stat {
  466. display: flex;
  467. align-items: center;
  468. gap: 0.25rem;
  469. font-size: 0.875rem;
  470. color: var(--text-secondary);
  471. }
  472. .card-stat-icon {
  473. font-size: 1rem;
  474. }
  475. /* ==================== 图片查看器模态框 ==================== */
  476. .modal {
  477. display: none;
  478. position: fixed;
  479. top: 0;
  480. left: 0;
  481. width: 100%;
  482. height: 100%;
  483. z-index: 1000;
  484. }
  485. .modal.active {
  486. display: block;
  487. }
  488. .modal-overlay {
  489. position: absolute;
  490. top: 0;
  491. left: 0;
  492. width: 100%;
  493. height: 100%;
  494. background: rgba(0, 0, 0, 0.9);
  495. }
  496. .modal-content {
  497. position: relative;
  498. width: 100%;
  499. height: 100%;
  500. display: flex;
  501. align-items: center;
  502. justify-content: center;
  503. }
  504. .modal-image {
  505. max-width: 90%;
  506. max-height: 90%;
  507. object-fit: contain;
  508. }
  509. .modal-close {
  510. position: absolute;
  511. top: 1rem;
  512. right: 1rem;
  513. background: rgba(0, 0, 0, 0.6);
  514. color: white;
  515. border: none;
  516. width: 40px;
  517. height: 40px;
  518. border-radius: 50%;
  519. font-size: 2rem;
  520. cursor: pointer;
  521. line-height: 1;
  522. }
  523. .modal-prev,
  524. .modal-next {
  525. position: absolute;
  526. top: 50%;
  527. transform: translateY(-50%);
  528. background: rgba(0, 0, 0, 0.6);
  529. color: white;
  530. border: none;
  531. width: 50px;
  532. height: 50px;
  533. border-radius: 50%;
  534. font-size: 2rem;
  535. cursor: pointer;
  536. transition: var(--transition);
  537. }
  538. .modal-prev {
  539. left: 2rem;
  540. }
  541. .modal-next {
  542. right: 2rem;
  543. }
  544. .modal-prev:hover,
  545. .modal-next:hover,
  546. .modal-close:hover {
  547. background: rgba(0, 0, 0, 0.8);
  548. }
  549. .modal-caption {
  550. position: absolute;
  551. bottom: 2rem;
  552. left: 50%;
  553. transform: translateX(-50%);
  554. color: white;
  555. background: rgba(0, 0, 0, 0.6);
  556. padding: 0.5rem 1rem;
  557. border-radius: 4px;
  558. }
  559. /* ==================== 加载和滚动条 ==================== */
  560. .loading {
  561. display: flex;
  562. justify-content: center;
  563. align-items: center;
  564. padding: 2rem;
  565. color: var(--text-secondary);
  566. }
  567. /* 自定义滚动条 */
  568. ::-webkit-scrollbar {
  569. width: 8px;
  570. height: 8px;
  571. }
  572. ::-webkit-scrollbar-track {
  573. background: var(--bg-color);
  574. }
  575. ::-webkit-scrollbar-thumb {
  576. background: var(--border-color);
  577. border-radius: 4px;
  578. }
  579. ::-webkit-scrollbar-thumb:hover {
  580. background: var(--text-secondary);
  581. }
  582. /* ==================== 响应式设计 ==================== */
  583. @media (max-width: 1024px) {
  584. .sidebar {
  585. width: 40%;
  586. min-width: 250px;
  587. }
  588. }
  589. @media (max-width: 768px) {
  590. .header-content {
  591. flex-direction: column;
  592. gap: 1rem;
  593. }
  594. .toolbar {
  595. flex-direction: column;
  596. align-items: stretch;
  597. }
  598. .search-box {
  599. max-width: none;
  600. }
  601. .main-container {
  602. flex-direction: column;
  603. height: auto;
  604. }
  605. .sidebar {
  606. width: 100%;
  607. max-height: 300px;
  608. }
  609. }