library-index.css 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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%,
  98. 100% {
  99. opacity: 1;
  100. }
  101. 50% {
  102. opacity: 0.4;
  103. }
  104. }
  105. /* ══════════════════════════════════════════
  106. 四、最新译文列表
  107. ══════════════════════════════════════════ */
  108. .lib-recent {
  109. padding: 0; /* 覆盖 wiki-card 默认 padding,由 item 自己管理 */
  110. }
  111. .lib-recent__item {
  112. display: flex;
  113. align-items: center;
  114. gap: 0.875rem;
  115. padding: 0.75rem 1.25rem;
  116. border-bottom: 1px solid var(--tblr-border-color);
  117. text-decoration: none;
  118. color: inherit;
  119. transition: background 0.12s;
  120. }
  121. .lib-recent__item:last-child {
  122. border-bottom: none;
  123. }
  124. .lib-recent__item:hover {
  125. background: var(--tblr-bg-surface-secondary);
  126. color: inherit;
  127. text-decoration: none;
  128. }
  129. /* 封面缩略图固定不缩 */
  130. .lib-recent__item .book-cover {
  131. flex-shrink: 0;
  132. }
  133. .lib-recent__info {
  134. flex: 1;
  135. min-width: 0;
  136. }
  137. .lib-recent__title {
  138. font-size: 0.9375rem;
  139. font-weight: 500;
  140. color: var(--tblr-body-color);
  141. margin-bottom: 0.25rem;
  142. white-space: nowrap;
  143. overflow: hidden;
  144. text-overflow: ellipsis;
  145. }
  146. .lib-recent__item:hover .lib-recent__title {
  147. color: var(--tblr-primary);
  148. }
  149. .lib-recent__meta {
  150. font-size: 0.75rem;
  151. color: var(--tblr-secondary);
  152. display: flex;
  153. align-items: center;
  154. gap: 0.375rem;
  155. flex-wrap: wrap;
  156. }
  157. .lib-recent__sep {
  158. opacity: 0.5;
  159. }
  160. .lib-recent__right {
  161. display: flex;
  162. flex-direction: column;
  163. align-items: flex-end;
  164. gap: 4px;
  165. flex-shrink: 0;
  166. }
  167. .lib-recent__time {
  168. font-size: 0.75rem;
  169. color: var(--tblr-secondary);
  170. white-space: nowrap;
  171. }
  172. /* 新增 / 更新 徽章 */
  173. .lib-new-badge {
  174. font-size: 0.625rem;
  175. font-weight: 600;
  176. padding: 1px 6px;
  177. border-radius: 20px;
  178. background: #e6f1fb;
  179. color: #185fa5;
  180. border: 1px solid #b5d4f4;
  181. white-space: nowrap;
  182. }
  183. .lib-update-badge {
  184. font-size: 0.625rem;
  185. font-weight: 600;
  186. padding: 1px 6px;
  187. border-radius: 20px;
  188. background: #f1efe8;
  189. color: #5f5e5a;
  190. border: 1px solid #d3d1c7;
  191. white-space: nowrap;
  192. }
  193. /* ══════════════════════════════════════════
  194. 五、栏目导航卡片
  195. ══════════════════════════════════════════ */
  196. .lib-nav-card {
  197. display: flex;
  198. flex-direction: column;
  199. align-items: center;
  200. text-align: center;
  201. padding: 1.25rem 1rem;
  202. background: var(--tblr-bg-surface);
  203. border: 1px solid var(--tblr-border-color);
  204. border-radius: var(--tblr-border-radius-lg);
  205. text-decoration: none;
  206. color: inherit;
  207. transition:
  208. background 0.12s,
  209. transform 0.15s,
  210. box-shadow 0.15s;
  211. height: 100%;
  212. }
  213. .lib-nav-card:hover {
  214. background: var(--tblr-bg-surface-secondary);
  215. transform: translateY(-2px);
  216. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  217. color: inherit;
  218. text-decoration: none;
  219. }
  220. .lib-nav-card__icon {
  221. font-size: 1.75rem;
  222. color: var(--tblr-primary);
  223. margin-bottom: 0.625rem;
  224. display: block;
  225. }
  226. .lib-nav-card__name {
  227. font-size: 0.9375rem;
  228. font-weight: 600;
  229. color: var(--tblr-body-color);
  230. margin-bottom: 0.25rem;
  231. }
  232. .lib-nav-card__desc {
  233. font-size: 0.75rem;
  234. color: var(--tblr-secondary);
  235. line-height: 1.4;
  236. }
  237. /* ══════════════════════════════════════════
  238. 六、响应式
  239. ══════════════════════════════════════════ */
  240. /* 最新译文:手机隐藏作者,只显示标题+分类+时间 */
  241. @media (max-width: 576px) {
  242. .lib-recent__item {
  243. padding: 0.625rem 1rem;
  244. gap: 0.625rem;
  245. }
  246. .lib-recent__author,
  247. .lib-recent__sep:last-of-type {
  248. display: none;
  249. }
  250. .lib-recent__title {
  251. font-size: 0.875rem;
  252. }
  253. }
  254. /* 栏目导航:手机 2 列,平板 3 列,桌面 5 列(Bootstrap row g-3 自动处理) */
  255. @media (max-width: 575px) {
  256. .lib-nav-card {
  257. padding: 1rem 0.75rem;
  258. }
  259. .lib-nav-card__icon {
  260. font-size: 1.5rem;
  261. }
  262. .lib-nav-card__desc {
  263. display: none; /* 手机隐藏描述,只显示图标+名称 */
  264. }
  265. }
  266. /* 三藏分类卡片:手机 2 列已由 Bootstrap col-6 处理 */
  267. @media (max-width: 575px) {
  268. .lib-cat-card__more {
  269. display: none; /* 手机隐藏"更多"链接,避免挤压 */
  270. }
  271. }