_library-index.css 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. /* resources/css/modules/_library-index.css
  2. Library 门户首页专属样式。
  3. */
  4. /* ══════════════════════════════════════════
  5. 一、区块通用结构
  6. ══════════════════════════════════════════ */
  7. .lib-section {
  8. margin-top: 2rem;
  9. margin-bottom: 0.5rem;
  10. }
  11. .lib-section__header {
  12. display: flex;
  13. align-items: center;
  14. gap: 0.75rem;
  15. margin-bottom: 1rem;
  16. padding-bottom: 0.625rem;
  17. border-bottom: 1px solid var(--tblr-border-color);
  18. }
  19. .lib-section__title {
  20. font-size: 1rem;
  21. font-weight: 600;
  22. color: var(--tblr-body-color);
  23. margin: 0;
  24. display: flex;
  25. align-items: center;
  26. gap: 0.4rem;
  27. flex: 1;
  28. }
  29. .lib-section__title .ti {
  30. font-size: 1.125rem;
  31. color: var(--tblr-secondary);
  32. }
  33. .lib-section__more {
  34. font-size: 0.8125rem;
  35. color: var(--tblr-primary);
  36. text-decoration: none;
  37. white-space: nowrap;
  38. display: flex;
  39. align-items: center;
  40. gap: 0.25rem;
  41. flex-shrink: 0;
  42. }
  43. .lib-section__more:hover {
  44. text-decoration: underline;
  45. }
  46. /* ══════════════════════════════════════════
  47. 二、三藏分类卡片头部
  48. ══════════════════════════════════════════ */
  49. .lib-cat-card__head {
  50. display: flex;
  51. align-items: center;
  52. justify-content: space-between;
  53. margin-bottom: 0.75rem;
  54. }
  55. .lib-cat-card__name {
  56. font-size: 0.9375rem;
  57. font-weight: 600;
  58. color: var(--tblr-body-color);
  59. }
  60. .lib-cat-card__more {
  61. font-size: 0.75rem;
  62. color: var(--tblr-primary);
  63. text-decoration: none;
  64. display: flex;
  65. align-items: center;
  66. gap: 0.2rem;
  67. flex-shrink: 0;
  68. }
  69. .lib-cat-card__more:hover {
  70. text-decoration: underline;
  71. }
  72. /* ══════════════════════════════════════════
  73. 三、"持续更新中" 标签
  74. ══════════════════════════════════════════ */
  75. .lib-live-badge {
  76. display: inline-flex;
  77. align-items: center;
  78. gap: 5px;
  79. font-size: 0.6875rem;
  80. font-weight: 500;
  81. color: #3b6d11;
  82. background: #eaf3de;
  83. border: 1px solid #c0dd97;
  84. border-radius: 20px;
  85. padding: 2px 8px;
  86. margin-left: 0.25rem;
  87. }
  88. .lib-live-dot {
  89. width: 6px;
  90. height: 6px;
  91. border-radius: 50%;
  92. background: #639922;
  93. flex-shrink: 0;
  94. animation: lib-live-pulse 2s ease-in-out infinite;
  95. }
  96. @keyframes lib-live-pulse {
  97. 0%, 100% { opacity: 1; }
  98. 50% { opacity: 0.4; }
  99. }
  100. /* ══════════════════════════════════════════
  101. 四、最新译文列表
  102. ══════════════════════════════════════════ */
  103. .lib-recent {
  104. padding: 0; /* 覆盖 wiki-card 默认 padding,由 item 自己管理 */
  105. }
  106. .lib-recent__item {
  107. display: flex;
  108. align-items: center;
  109. gap: 0.875rem;
  110. padding: 0.75rem 1.25rem;
  111. border-bottom: 1px solid var(--tblr-border-color);
  112. text-decoration: none;
  113. color: inherit;
  114. transition: background 0.12s;
  115. }
  116. .lib-recent__item:last-child {
  117. border-bottom: none;
  118. }
  119. .lib-recent__item:hover {
  120. background: var(--tblr-bg-surface-secondary);
  121. color: inherit;
  122. text-decoration: none;
  123. }
  124. /* 封面缩略图固定不缩 */
  125. .lib-recent__item .book-cover {
  126. flex-shrink: 0;
  127. }
  128. .lib-recent__info {
  129. flex: 1;
  130. min-width: 0;
  131. }
  132. .lib-recent__title {
  133. font-size: 0.9375rem;
  134. font-weight: 500;
  135. color: var(--tblr-body-color);
  136. margin-bottom: 0.25rem;
  137. white-space: nowrap;
  138. overflow: hidden;
  139. text-overflow: ellipsis;
  140. }
  141. .lib-recent__item:hover .lib-recent__title {
  142. color: var(--tblr-primary);
  143. }
  144. .lib-recent__meta {
  145. font-size: 0.75rem;
  146. color: var(--tblr-secondary);
  147. display: flex;
  148. align-items: center;
  149. gap: 0.375rem;
  150. flex-wrap: wrap;
  151. }
  152. .lib-recent__sep {
  153. opacity: 0.5;
  154. }
  155. .lib-recent__right {
  156. display: flex;
  157. flex-direction: column;
  158. align-items: flex-end;
  159. gap: 4px;
  160. flex-shrink: 0;
  161. }
  162. .lib-recent__time {
  163. font-size: 0.75rem;
  164. color: var(--tblr-secondary);
  165. white-space: nowrap;
  166. }
  167. /* 新增 / 更新 徽章 */
  168. .lib-new-badge {
  169. font-size: 0.625rem;
  170. font-weight: 600;
  171. padding: 1px 6px;
  172. border-radius: 20px;
  173. background: #e6f1fb;
  174. color: #185fa5;
  175. border: 1px solid #b5d4f4;
  176. white-space: nowrap;
  177. }
  178. .lib-update-badge {
  179. font-size: 0.625rem;
  180. font-weight: 600;
  181. padding: 1px 6px;
  182. border-radius: 20px;
  183. background: #f1efe8;
  184. color: #5f5e5a;
  185. border: 1px solid #d3d1c7;
  186. white-space: nowrap;
  187. }
  188. /* ══════════════════════════════════════════
  189. 五、栏目导航卡片
  190. ══════════════════════════════════════════ */
  191. .lib-nav-card {
  192. display: flex;
  193. flex-direction: column;
  194. align-items: center;
  195. text-align: center;
  196. padding: 1.25rem 1rem;
  197. background: var(--tblr-bg-surface);
  198. border: 1px solid var(--tblr-border-color);
  199. border-radius: var(--tblr-border-radius-lg);
  200. text-decoration: none;
  201. color: inherit;
  202. transition: background 0.12s, transform 0.15s, box-shadow 0.15s;
  203. height: 100%;
  204. }
  205. .lib-nav-card:hover {
  206. background: var(--tblr-bg-surface-secondary);
  207. transform: translateY(-2px);
  208. box-shadow: 0 4px 12px rgba(0,0,0,.06);
  209. color: inherit;
  210. text-decoration: none;
  211. }
  212. .lib-nav-card__icon {
  213. font-size: 1.75rem;
  214. color: var(--tblr-primary);
  215. margin-bottom: 0.625rem;
  216. display: block;
  217. }
  218. .lib-nav-card__name {
  219. font-size: 0.9375rem;
  220. font-weight: 600;
  221. color: var(--tblr-body-color);
  222. margin-bottom: 0.25rem;
  223. }
  224. .lib-nav-card__desc {
  225. font-size: 0.75rem;
  226. color: var(--tblr-secondary);
  227. line-height: 1.4;
  228. }
  229. /* ══════════════════════════════════════════
  230. 六、响应式
  231. ══════════════════════════════════════════ */
  232. /* 最新译文:手机隐藏作者,只显示标题+分类+时间 */
  233. @media (max-width: 576px) {
  234. .lib-recent__item {
  235. padding: 0.625rem 1rem;
  236. gap: 0.625rem;
  237. }
  238. .lib-recent__author,
  239. .lib-recent__sep:last-of-type {
  240. display: none;
  241. }
  242. .lib-recent__title {
  243. font-size: 0.875rem;
  244. }
  245. }
  246. /* 栏目导航:手机 2 列,平板 3 列,桌面 5 列(Bootstrap row g-3 自动处理) */
  247. @media (max-width: 575px) {
  248. .lib-nav-card {
  249. padding: 1rem 0.75rem;
  250. }
  251. .lib-nav-card__icon {
  252. font-size: 1.5rem;
  253. }
  254. .lib-nav-card__desc {
  255. display: none; /* 手机隐藏描述,只显示图标+名称 */
  256. }
  257. }
  258. /* 三藏分类卡片:手机 2 列已由 Bootstrap col-6 处理 */
  259. @media (max-width: 575px) {
  260. .lib-cat-card__more {
  261. display: none; /* 手机隐藏"更多"链接,避免挤压 */
  262. }
  263. }