uoj-theme.css 21 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  1. html {
  2. font-size: 16px
  3. }
  4. body {
  5. padding-top: 10px;
  6. padding-bottom: 10px;
  7. background-color: #efefef;
  8. }
  9. .uoj-content {
  10. min-height: 250px;
  11. }
  12. .uoj-footer {
  13. text-align: center;
  14. margin-top: 20px;
  15. padding-top: 20px;
  16. color: gray;
  17. border-top: 1px solid #e5e5e5;
  18. line-height: 10px;
  19. }
  20. .uoj-footer a {
  21. color: gray;
  22. }
  23. h1.page-header {
  24. font-size: 2em;
  25. }
  26. .page-header {
  27. padding-bottom: 9px;
  28. margin: 40px 0 20px;
  29. border-bottom: 1px solid #eee;
  30. }
  31. a.header-a {
  32. color: #333;
  33. }
  34. a sup {
  35. text-decoration: none;
  36. display: inline-block;
  37. }
  38. a sub {
  39. text-decoration: none;
  40. display: inline-block;
  41. }
  42. .indent2 {
  43. text-indent: 2em;
  44. }
  45. .markdown-editor-out p {
  46. text-indent: 2em;
  47. word-break: break-all;
  48. }
  49. article img {
  50. vertical-align: baseline;
  51. max-width: 100%;
  52. height: auto;
  53. }
  54. article h1 {
  55. font-size: 1.75em;
  56. font-weight: 700;
  57. }
  58. article h2 {
  59. font-size: 1.5em;
  60. font-weight: 700;
  61. margin: 1.2rem 0 1rem;
  62. }
  63. article h3 {
  64. font-size: 1.25em;
  65. font-weight: 700;
  66. margin: 1.2rem 0 1rem;
  67. }
  68. article code {
  69. font-family: monospace;
  70. }
  71. .blog-title {
  72. font-size: 2.125rem;
  73. font-weight: 700;
  74. margin: 1rem 0 1.5rem;
  75. }
  76. pre {
  77. -moz-tab-size: 4;
  78. -o-tab-size: 4;
  79. tab-size: 4;
  80. padding: 9.5px;
  81. margin: 0 0 10px;
  82. background-color: #f5f5f5;
  83. border: 1px solid #ccc;
  84. border-radius: 4px;
  85. }
  86. .uoj-username {
  87. font-weight: 800;
  88. }
  89. .uoj-honor {
  90. font-weight: 800;
  91. }
  92. .uoj-score {
  93. font-weight: 700;
  94. }
  95. .table-text-center>thead>tr>th {
  96. text-align: center;
  97. }
  98. .table-text-center>tbody>tr>td {
  99. text-align: center;
  100. }
  101. .table-vertical-middle>thead>tr>th {
  102. vertical-align: middle;
  103. }
  104. .table-vertical-middle>tbody>tr>td {
  105. vertical-align: middle;
  106. }
  107. .top-buffer-no {
  108. margin-top: 0px;
  109. }
  110. .top-buffer-xs {
  111. margin-top: 3px;
  112. }
  113. .top-buffer-sm {
  114. margin-top: 5px;
  115. }
  116. .top-buffer-md {
  117. margin-top: 10px;
  118. }
  119. .top-buffer-lg {
  120. margin-top: 30px;
  121. }
  122. .bot-buffer-no {
  123. margin-bottom: 0px;
  124. }
  125. .bot-buffer-xs {
  126. margin-bottom: 3px;
  127. }
  128. .bot-buffer-sm {
  129. margin-bottom: 5px;
  130. }
  131. .bot-buffer-md {
  132. margin-bottom: 10px;
  133. }
  134. .bot-buffer-lg {
  135. margin-bottom: 30px;
  136. }
  137. .glyphicon-ok, .glyphicon-ok-sign {
  138. color: green;
  139. }
  140. .glyphicon-remove, .glyphicon-remove-sign {
  141. color: red;
  142. }
  143. .comt {
  144. }
  145. .comtposterbox {
  146. text-align:center;
  147. }
  148. .comtbox {
  149. width: 100%;
  150. }
  151. .comtbox1 {
  152. white-space: pre-wrap;
  153. word-break: break-all;
  154. min-height: 80px;
  155. margin-top: 10px;
  156. margin-bottom: 10px;
  157. }
  158. .comtbox2 {
  159. text-align: right;
  160. }
  161. .comtbox3 {
  162. display: inline-block;
  163. margin-right: 5px;
  164. }
  165. .comtbox4 {
  166. display: inline-block;
  167. }
  168. .comtbox5 {
  169. background-image: -webkit-linear-gradient(top, #f5f5f5 0, #fafafa 100%);
  170. background-image: -o-linear-gradient(top, #f5f5f5 0, #fafafa 100%);
  171. background-image: linear-gradient(to bottom, #f5f5f5 0, #fafafa 100%);
  172. background-repeat: repeat-x;
  173. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fffafafa', GradientType=0);
  174. border-color: #dcdcdc;
  175. -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);
  176. box-shadow: inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);
  177. padding: 9px;
  178. border-radius: 3px;
  179. min-height: 20px;
  180. margin-bottom: 20px;
  181. border: 1px solid #e3e3e3;
  182. margin-top: 10px;
  183. }
  184. .comtbox6 {
  185. white-space: pre-wrap;
  186. word-break: break-all;
  187. }
  188. .comtbox7 {
  189. background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #fafafa 100%);
  190. background-image: -o-linear-gradient(top, #f5f5f5 0%, #fafafa 100%);
  191. background-image: linear-gradient(to bottom, #f5f5f5 0%, #fafafa 100%);
  192. background-repeat: repeat-x;
  193. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fffafafa', GradientType=0);
  194. border-color: #dcdcdc;
  195. -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);
  196. box-shadow: inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);
  197. border-radius: 3px;
  198. margin-left: 50px;
  199. margin-top: 10px;
  200. margin-bottom: 2px;
  201. padding-left: 10px;
  202. padding-right: 10px;
  203. padding-top:10px;
  204. white-space: nowrap;
  205. padding-bottom: 10px;
  206. border: 1px solid #e3e3e3;
  207. text-align: left;
  208. }
  209. .comtbox8 {
  210. background-image: -webkit-linear-gradient(top, #ffffff 100%, #fafafa 0%);
  211. background-image: -o-linear-gradient(top, #ffffff 100%, #fafafa 0%);
  212. background-image: linear-gradient(to bottom, #ffffff 100%, #fafafa 0%);
  213. background-repeat: repeat-x;
  214. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fffafafa', GradientType=0);
  215. border-color: #dcdcdc;
  216. -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);
  217. box-shadow: inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);
  218. border-radius: 3px;
  219. margin-left: 50px;
  220. margin-top: 10px;
  221. margin-bottom: 2px;
  222. padding-left: 10px;
  223. padding-right: 10px;
  224. padding-top:10px;
  225. white-space: nowrap;
  226. padding-bottom: 10px;
  227. border: 1px solid #e3e3e3;
  228. text-align: left;
  229. }
  230. .question-content {
  231. max-height: 100px;
  232. white-space: pre-wrap;
  233. word-wrap: break-word;
  234. word-break: break-all;
  235. }
  236. .uoj-click-zan-block {
  237. display: inline-block;
  238. min-width: 140px;
  239. text-align: left;
  240. }
  241. .uoj-click-zan-up, .uoj-click-zan-down, .uoj-click-zan-cnt {
  242. margin-left: 5px;
  243. margin-right: 5px;
  244. }
  245. .uoj-click-zan-block-cur-up .uoj-click-zan-up {
  246. color: green;
  247. font-weight: 700;
  248. }
  249. .uoj-click-zan-block-cur-down .uoj-click-zan-down {
  250. color: red;
  251. font-weight: 700;
  252. }
  253. .uoj-click-zan-block-cur-down .uoj-click-zan-up, .uoj-click-zan-block-cur-up .uoj-click-zan-down {
  254. color: gray;
  255. }
  256. .uoj-click-zan-block-positive .uoj-click-zan-cnt {
  257. color: green;
  258. }
  259. .uoj-click-zan-block-neutral .uoj-click-zan-cnt {
  260. color: gray;
  261. }
  262. .uoj-click-zan-block-negative .uoj-click-zan-cnt {
  263. color: red;
  264. }
  265. .uoj-problem-tag {
  266. margin-left: 5px;
  267. margin-right: 5px;
  268. }
  269. .uoj-blog-tag {
  270. margin-left: 5px;
  271. margin-right: 5px;
  272. }
  273. .uoj-status-details-img-div {
  274. display:inline-block;
  275. width:50%;
  276. padding-right:10px;
  277. text-align:right;
  278. }
  279. .uoj-status-details-text-div {
  280. display:inline-block;
  281. width:50%;
  282. padding-left:10px;
  283. text-align:left;
  284. }
  285. .uoj-certs {
  286. display: inline-block;
  287. border-radius: 3px;
  288. padding: 3px 5px;
  289. color: white;
  290. font-weight: bold;
  291. font-size: 12px;
  292. margin: 0px 5px;
  293. }
  294. .uoj-certs:hover {
  295. }
  296. .uoj-avatar {
  297. width: 100px;
  298. height: 100px;
  299. }
  300. .uoj-certs-red { background-color: #c41e3a; }
  301. .uoj-certs-blue { background-color: #3498db; }
  302. .uoj-certs-green { background-color: #228b22; }
  303. .uoj-certs-purple { background-color: #8e44ad; }
  304. .uoj-certs-pink { background-color: #da70d6; }
  305. .uoj-certs-deepblue { background-color: #0000cd; }
  306. .uoj-certs-olive { background-color: #808000; }
  307. @keyframes sideBlue {
  308. 0% { background-position: 0% 50%; }
  309. 50% { background-position: 100% 50%; }
  310. 100% { background-position: 0% 50%; }
  311. }
  312. .uoj-certs-pro { background: linear-gradient(90deg, #8a00ff, #ff0000); }
  313. .uoj-certs-max { background: linear-gradient(90deg, #000000, #ff0000); }
  314. .uoj-certs-ultra {
  315. background: linear-gradient(90deg, #9589fe, #0484e2, #980ecc);
  316. background-size: 300% 100%;
  317. animation: sideBlue 4s ease-in-out infinite;
  318. }
  319. .uoj-certs-promax {
  320. background: linear-gradient(90deg, #000000, #ff0000);
  321. background-size: 300% 100%;
  322. animation: sideBlue 4s ease-in-out infinite;
  323. }
  324. .table {
  325. margin-bottom: 0;
  326. }
  327. .wyoj-topcard {
  328. background: #f8f9fa;
  329. border-radius: 12px;
  330. overflow: hidden;
  331. }
  332. /* ===== 首页服务器数据看板 ===== */
  333. .stat-card {
  334. border: 1px solid #e3e3e3;
  335. border-radius: 6px;
  336. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  337. transition: box-shadow 0.2s ease, transform 0.1s ease;
  338. }
  339. .stat-card:hover {
  340. box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  341. transform: translateY(-2px);
  342. }
  343. .stat-icon {
  344. font-size: 1.3rem;
  345. color: #6c757d;
  346. margin-bottom: 4px;
  347. }
  348. .stat-num {
  349. font-size: 1.3rem;
  350. font-weight: 800;
  351. color: #343a40;
  352. line-height: 1.2;
  353. }
  354. .stat-label {
  355. font-size: 0.8rem;
  356. color: #6c757d;
  357. margin-top: 2px;
  358. }
  359. /* ===== 首页最近比赛 ===== */
  360. .contest-table {
  361. margin-bottom: 0;
  362. }
  363. .contest-table td {
  364. vertical-align: middle;
  365. padding: 12px 12px;
  366. border-top: 1px dashed #e9ecef;
  367. }
  368. .contest-table tbody tr:first-child td {
  369. border-top: none;
  370. }
  371. .contest-table .contest-name {
  372. white-space: nowrap;
  373. }
  374. .contest-table .contest-name a {
  375. font-size: 1rem;
  376. font-weight: 700;
  377. color: #212529;
  378. }
  379. .contest-table .contest-info {
  380. font-size: 0.95rem;
  381. color: #343a40;
  382. white-space: nowrap;
  383. }
  384. .contest-table .contest-info .glyphicon {
  385. font-size: 0.85rem;
  386. margin-right: 2px;
  387. color: #495057;
  388. }
  389. .contest-table .contest-countdown {
  390. font-size: 0.95rem;
  391. margin-left: 6px;
  392. color: #e67e22;
  393. }
  394. .contest-table .contest-countdown span {
  395. font-size: 0.95rem !important;
  396. }
  397. /* ===== 题目详情页 ===== */
  398. .problem-title-bar {
  399. margin-bottom: 8px;
  400. }
  401. .problem-statement {
  402. background: #ffffff;
  403. border: 1px solid #e3e3e3;
  404. border-radius: 6px;
  405. padding: 24px 28px;
  406. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  407. line-height: 1.7;
  408. overflow-wrap: break-word;
  409. }
  410. .problem-sidebar {
  411. position: sticky;
  412. top: 12px;
  413. }
  414. .problem-meta-card {
  415. border: 1px solid #e3e3e3;
  416. border-radius: 6px;
  417. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  418. margin-bottom: 16px;
  419. }
  420. .problem-meta-card .card-header {
  421. background: #f8f9fa;
  422. border-bottom: 1px solid #e3e3e3;
  423. font-weight: 700;
  424. color: #495057;
  425. padding: 10px 16px;
  426. font-size: 0.95rem;
  427. }
  428. .problem-meta-card .card-body {
  429. padding: 0;
  430. }
  431. .problem-meta-card .card-body ul li {
  432. padding: 9px 16px;
  433. border-bottom: 1px dashed #e9ecef;
  434. font-size: 0.9rem;
  435. }
  436. .problem-meta-card .card-body ul li:last-child {
  437. border-bottom: none;
  438. }
  439. .problem-meta-card .meta-label {
  440. color: #6c757d;
  441. }
  442. .problem-meta-card .badge-danger {
  443. background-color: #dc3545;
  444. }
  445. .blog-content.collapsed {
  446. max-height: 300px;
  447. overflow: hidden;
  448. transition: max-height 0.3s ease;
  449. transition: box-shadow 0.2ease, transform 0.1s ease;
  450. cursor: pointer;
  451. }
  452. .blog-content.collapsed:hover {
  453. box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  454. }
  455. .blog-content.expanded {
  456. max-height: none;
  457. }
  458. /* --- submission details: test-point squares + detail/code modal dialog --- */
  459. .uoj-test-grid {
  460. display: flex;
  461. flex-direction: column;
  462. gap: 10px;
  463. }
  464. .uoj-test-group {
  465. display: flex;
  466. flex-wrap: wrap;
  467. gap: 8px;
  468. }
  469. .uoj-test-group-subtask {
  470. display: block;
  471. padding-bottom: 8px;
  472. border-bottom: 1px solid #e9ecef;
  473. }
  474. .uoj-test-group-subtask:last-child {
  475. border-bottom: none;
  476. padding-bottom: 0;
  477. }
  478. .uoj-test-subtask-head {
  479. font-size: 0.85rem;
  480. color: #495057;
  481. margin-bottom: 6px;
  482. }
  483. .uoj-test-rects {
  484. display: flex;
  485. flex-wrap: wrap;
  486. gap: 8px;
  487. }
  488. .uoj-test-rect {
  489. box-sizing: border-box;
  490. width: 96px;
  491. height: 96px;
  492. padding: 6px 4px;
  493. border: 1px solid rgba(0, 0, 0, 0.12);
  494. border-radius: 4px;
  495. display: flex;
  496. flex-direction: column;
  497. align-items: center;
  498. justify-content: center;
  499. gap: 1px;
  500. line-height: 1.1;
  501. text-align: center;
  502. overflow: hidden;
  503. cursor: pointer;
  504. -webkit-user-select: none;
  505. user-select: none;
  506. }
  507. .uoj-test-rect-index {
  508. font-size: 12px;
  509. opacity: 0.8;
  510. white-space: nowrap;
  511. }
  512. .uoj-test-rect-verdict {
  513. font-size: 18px;
  514. font-weight: 700;
  515. line-height: 1.1;
  516. white-space: nowrap;
  517. }
  518. .uoj-test-rect-meta {
  519. font-size: 10px;
  520. opacity: 0.9;
  521. white-space: nowrap;
  522. }
  523. /* #00ee00 was a maximum-saturation neon green; a field of 96px squares of it
  524. was hard to look at. #28a745 is the theme's own success green (btn-success,
  525. text-success), so AC also stops being an arbitrary one-off colour.
  526. WA stays Vivid on purpose: failures should be the thing that stands out. */
  527. .uoj-test-rect-ac {
  528. background-color: #28a745;
  529. border-color: #1e7e34;
  530. color: #fff;
  531. }
  532. .uoj-test-rect-wa {
  533. background-color: #dd0000;
  534. border-color: #ff0000;
  535. color: #fff;
  536. }
  537. .uoj-test-rect-other {
  538. background-color: #e6e61e;
  539. border-color: #ffff2b;
  540. color: #333;
  541. }
  542. .uoj-test-rect[data-target]:hover {
  543. filter: brightness(1.08);
  544. }
  545. .uoj-test-rect.is-disabled {
  546. cursor: default;
  547. opacity: 0.75;
  548. }
  549. .uoj-test-rect.is-selected {
  550. outline: 2px solid #333;
  551. outline-offset: 1px;
  552. }
  553. .uoj-test-rect-ac.is-selected {
  554. outline-color: #28a745;
  555. }
  556. .uoj-test-rect-wa.is-selected {
  557. outline-color: #dd0000;
  558. }
  559. .uoj-test-rect-other.is-selected {
  560. outline-color: #e6e61e;
  561. }
  562. .uoj-test-body>h4 {
  563. font-size: 1rem;
  564. margin-top: 8px;
  565. }
  566. .uoj-details-error>pre {
  567. margin-top: 8px;
  568. }
  569. .uoj-code-toggle {
  570. margin-bottom: 2px;
  571. }
  572. .uoj-code-meta {
  573. margin-bottom: 8px;
  574. font-size: 0.85rem;
  575. }
  576. .uoj-modal {
  577. position: fixed;
  578. top: 0;
  579. left: 0;
  580. right: 0;
  581. bottom: 0;
  582. z-index: 1060;
  583. display: flex;
  584. align-items: center;
  585. justify-content: center;
  586. padding: 16px;
  587. background-color: rgba(0, 0, 0, 0.5);
  588. overflow: auto;
  589. }
  590. .uoj-modal[hidden] {
  591. display: none;
  592. }
  593. .uoj-modal-backdrop {
  594. position: absolute;
  595. top: 0;
  596. left: 0;
  597. right: 0;
  598. bottom: 0;
  599. }
  600. .uoj-modal-window {
  601. position: relative;
  602. z-index: 1;
  603. width: min(1100px, 88vw);
  604. height: min(900px, 80vh);
  605. max-width: 100%;
  606. max-height: 100%;
  607. display: flex;
  608. flex-direction: column;
  609. background-color: #fff;
  610. border: 1px solid #dee2e6;
  611. border-radius: 4px;
  612. box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  613. overflow: hidden;
  614. }
  615. .uoj-modal-body {
  616. flex: 1 1 auto;
  617. overflow: auto;
  618. padding: 12px 14px;
  619. }
  620. .uoj-modal-close {
  621. position: absolute;
  622. top: 6px;
  623. right: 8px;
  624. z-index: 2;
  625. width: 30px;
  626. height: 30px;
  627. padding: 0;
  628. border: 0;
  629. border-radius: 4px;
  630. background-color: transparent;
  631. color: #495057;
  632. font-size: 22px;
  633. line-height: 1;
  634. cursor: pointer;
  635. }
  636. .uoj-modal-close:hover {
  637. background-color: #f1f3f5;
  638. color: #000;
  639. }
  640. body.uoj-modal-open {
  641. overflow: hidden;
  642. }
  643. @media (max-width: 480px) {
  644. .uoj-test-group,
  645. .uoj-test-rects {
  646. gap: 6px;
  647. }
  648. .uoj-test-rect {
  649. width: 80px;
  650. height: 80px;
  651. padding: 4px 2px;
  652. }
  653. .uoj-test-rect-index {
  654. font-size: 11px;
  655. }
  656. .uoj-test-rect-verdict {
  657. font-size: 16px;
  658. }
  659. .uoj-test-rect-meta {
  660. font-size: 9px;
  661. }
  662. }
  663. /* ==========================================================================
  664. Quiet section header
  665. --------------------------------------------------------------------------
  666. The card-header is a *label*, not a banner: light surface, hairline, dark
  667. grey small type. Colour on this site is reserved for meaning (red = rating,
  668. green/red/yellow = verdict), so a saturated header competes with it.
  669. This is the same treatment `.problem-meta-card .card-header` already used.
  670. Judge-status headers (.card-uoj-*) and `bg-*` utility headers are more
  671. specific, so they keep their own colours.
  672. ========================================================================== */
  673. .card-header {
  674. background: #f8f9fa;
  675. border-bottom: 1px solid #e3e3e3;
  676. color: #495057;
  677. font-size: 0.95rem;
  678. font-weight: 700;
  679. }
  680. /* the markup mixes <h4>/<h5>/<div> inside headers -- normalise them all */
  681. .card-header > h1, .card-header > h2, .card-header > h3,
  682. .card-header > h4, .card-header > h5, .card-header > h6,
  683. .card-header > .card-title {
  684. color: inherit;
  685. font-size: 0.95rem;
  686. font-weight: 700;
  687. line-height: 1.4;
  688. margin: 0;
  689. }
  690. .card-header .card-title > small,
  691. .card-header > small {
  692. font-weight: 400;
  693. }
  694. /* ==========================================================================
  695. Blog pages: list titles/cards, shared sidebar, activity heatmap.
  696. Self-contained; nothing here restyles global typography, buttons or cards.
  697. ========================================================================== */
  698. /* -- list titles: a list headline, not an article headline ---------------- */
  699. .blog-title.wyoj-blog-list-title {
  700. font-size: 1.25rem;
  701. font-weight: 600;
  702. color: #1d1d1f;
  703. line-height: 1.4;
  704. margin: 0 0 0.75rem;
  705. }
  706. .blog-title.wyoj-blog-list-title a {
  707. color: inherit;
  708. text-decoration: none;
  709. }
  710. .blog-title.wyoj-blog-list-title a:hover {
  711. color: #007bff;
  712. }
  713. /* -- post detail title: clearly larger than the list headline ------------ */
  714. .blog-title.wyoj-blog-detail-title {
  715. font-size: 1.5rem;
  716. font-weight: 600;
  717. line-height: 1.3;
  718. /* .blog-title carries `margin: 1rem 0 1.5rem`. Inside a card body that 1rem
  719. stacked on the card's own 20px padding and pushed the title 37px off the
  720. top edge; the card padding is inset enough on its own. */
  721. margin-top: 0;
  722. }
  723. /* -- compact author/date/zan meta line ----------------------------------- */
  724. .wyoj-blog-meta {
  725. font-size: 0.85rem;
  726. line-height: 1.2;
  727. }
  728. .wyoj-blog-meta-avatar {
  729. width: 24px;
  730. height: 24px;
  731. object-fit: cover;
  732. }
  733. /* -- list summary: clamp the real rendered HTML; click to expand ---------- */
  734. .blog-list .blog-content-orig {
  735. display: -webkit-box;
  736. -webkit-line-clamp: 6;
  737. -webkit-box-orient: vertical;
  738. overflow: hidden;
  739. /* safety cap: -webkit-line-clamp treats an embedded table/JSON block as a
  740. single box, so bound the height as well (~6 lines + paragraph gaps). */
  741. max-height: 14rem;
  742. }
  743. .blog-list .blog-content:not(.uoj-clamp-open) {
  744. cursor: pointer;
  745. }
  746. .blog-list .blog-content.uoj-clamp-open .blog-content-orig {
  747. display: block;
  748. overflow: visible;
  749. max-height: none;
  750. }
  751. /* -- infinite feed status ------------------------------------------------ */
  752. .wyoj-blog-feed-loading {
  753. font-size: 0.9rem;
  754. }
  755. .wyoj-blog-feed-loading .spinner-border {
  756. width: 1rem;
  757. height: 1rem;
  758. border-width: 0.15em;
  759. }
  760. /* -- shared sidebar: sticky on wide screens only ------------------------- */
  761. .wyoj-blog-owner-card .card-body {
  762. text-align: center;
  763. }
  764. .wyoj-blog-owner-avatar {
  765. width: 80px;
  766. height: 80px;
  767. object-fit: cover;
  768. border-radius: 8px;
  769. }
  770. .wyoj-blog-owner-name {
  771. margin-top: 0.5rem;
  772. font-weight: 600;
  773. }
  774. .wyoj-blog-owner-motto {
  775. margin-top: 0.25rem;
  776. font-size: 0.85rem;
  777. word-break: break-word;
  778. }
  779. @media (min-width: 992px) {
  780. .wyoj-blog-sidebar {
  781. position: sticky;
  782. top: 12px;
  783. max-height: calc(100vh - 24px);
  784. overflow-y: auto;
  785. }
  786. }
  787. /* -- GitHub-style activity heatmap --------------------------------------- */
  788. /* Mini preview in the sidebar: full 53 weeks at 3px, no labels, no legend and
  789. no horizontal scroll. minmax(2px,3px) lets the tracks shrink instead of
  790. overflowing when col-lg-3 is at its narrowest (992-1200px container). */
  791. .wyoj-heatmap-card {
  792. cursor: pointer;
  793. transition: box-shadow 0.15s ease;
  794. }
  795. .wyoj-heatmap-card:hover {
  796. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  797. }
  798. /* Keep the header's 20px inset so the grid lines up with the 活跃度 label, but
  799. pull the bottom in: the default 20px left the card ending in a band of empty
  800. space under the 查看全年 hint. */
  801. .wyoj-heatmap-card .card-body {
  802. padding-bottom: 10px;
  803. }
  804. .wyoj-heatmap-mini {
  805. width: 100%;
  806. }
  807. .wyoj-heatmap-grid-mini {
  808. display: grid;
  809. grid-auto-flow: column;
  810. grid-template-columns: repeat(53, minmax(2px, 3px));
  811. grid-template-rows: repeat(7, 3px);
  812. gap: 1px;
  813. justify-content: space-between;
  814. }
  815. .wyoj-heatmap-hint {
  816. margin-top: 8px;
  817. font-size: 12px;
  818. text-align: center;
  819. }
  820. .wyoj-heatmap-card:hover .wyoj-heatmap-hint {
  821. color: #007bff !important;
  822. }
  823. /* Shared cells. The grid tracks own the size; the base rule must not impose
  824. width/height or the cells would not shrink to fit. */
  825. .wyoj-heatmap-grid .wyoj-heatmap-cell {
  826. display: block;
  827. width: auto;
  828. height: auto;
  829. border-radius: 1px;
  830. }
  831. .wyoj-heatmap-cell[data-level="0"] { background-color: #ebedf0; }
  832. .wyoj-heatmap-cell[data-level="1"] { background-color: #9be9a8; }
  833. .wyoj-heatmap-cell[data-level="2"] { background-color: #40c463; }
  834. .wyoj-heatmap-cell[data-level="3"] { background-color: #30a14e; }
  835. .wyoj-heatmap-cell[data-level="4"] { background-color: #216e39; }
  836. .wyoj-heatmap-cell-future {
  837. visibility: hidden;
  838. }
  839. /* Enlarged grid inside the reusable .uoj-modal component. */
  840. .wyoj-heatmap-modal .uoj-modal-window {
  841. height: auto;
  842. width: min(1040px, 94vw);
  843. }
  844. .wyoj-heatmap-modal-head {
  845. padding-right: 28px;
  846. margin-bottom: 10px;
  847. }
  848. .wyoj-heatmap-modal-title {
  849. font-size: 1.1rem;
  850. font-weight: 700;
  851. margin-right: 8px;
  852. }
  853. .wyoj-heatmap-lg-wrap {
  854. overflow-x: auto;
  855. padding-bottom: 4px;
  856. }
  857. .wyoj-heatmap-lg {
  858. display: grid;
  859. grid-template-columns: auto auto;
  860. grid-template-rows: auto auto;
  861. column-gap: 6px;
  862. row-gap: 4px;
  863. width: max-content;
  864. }
  865. .wyoj-heatmap-lg-corner {
  866. grid-column: 1;
  867. grid-row: 1;
  868. }
  869. .wyoj-heatmap-lg .wyoj-heatmap-months {
  870. grid-column: 2;
  871. grid-row: 1;
  872. }
  873. .wyoj-heatmap-lg-days {
  874. grid-column: 1;
  875. grid-row: 2;
  876. display: grid;
  877. grid-template-rows: repeat(7, 14px);
  878. gap: 3px;
  879. font-size: 11px;
  880. line-height: 14px;
  881. color: #586069;
  882. text-align: right;
  883. }
  884. .wyoj-heatmap-lg .wyoj-heatmap-grid {
  885. grid-column: 2;
  886. grid-row: 2;
  887. }
  888. .wyoj-heatmap-months {
  889. display: grid;
  890. height: 14px;
  891. font-size: 10px;
  892. line-height: 1;
  893. color: #586069;
  894. }
  895. .wyoj-heatmap-months > span {
  896. white-space: nowrap;
  897. }
  898. .wyoj-heatmap-months-lg {
  899. grid-template-columns: repeat(53, 14px);
  900. column-gap: 3px;
  901. height: 16px;
  902. font-size: 11px;
  903. }
  904. .wyoj-heatmap-grid-lg {
  905. display: grid;
  906. grid-auto-flow: column;
  907. grid-template-columns: repeat(53, 14px);
  908. grid-template-rows: repeat(7, 14px);
  909. gap: 3px;
  910. }
  911. .wyoj-heatmap-grid-lg .wyoj-heatmap-cell {
  912. border-radius: 3px;
  913. }
  914. .wyoj-heatmap-legend {
  915. display: flex;
  916. align-items: center;
  917. margin-top: 10px;
  918. font-size: 11px;
  919. color: #586069;
  920. }
  921. .wyoj-heatmap-legend > span {
  922. margin-right: 4px;
  923. }
  924. .wyoj-heatmap-legend-label {
  925. white-space: nowrap;
  926. }
  927. .wyoj-heatmap-legend .wyoj-heatmap-cell {
  928. display: inline-block;
  929. width: 5px;
  930. height: 5px;
  931. border-radius: 1px;
  932. margin-right: 3px;
  933. vertical-align: middle;
  934. }
  935. .wyoj-heatmap-legend-lg .wyoj-heatmap-cell {
  936. width: 14px;
  937. height: 14px;
  938. border-radius: 2px;
  939. }