_tipitaka.css 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. /* resources/css/modules/_tipitaka.css
  2. Tipitaka 栏目专属样式。
  3. 来源:book-list.blade.php / book-item.blade.php 内联样式提取,
  4. 去除 CDN 引入,风格与 wiki 对齐。
  5. */
  6. /* ══════════════════════════════════════════
  7. 一、书籍卡片(.card-book)
  8. 纵向:封面上 + 信息下
  9. ══════════════════════════════════════════ */
  10. .card-book {
  11. transition: transform 0.2s, box-shadow 0.2s;
  12. }
  13. .card-book:hover {
  14. transform: translateY(-2px);
  15. box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  16. }
  17. .card-book__link {
  18. display: block;
  19. text-decoration: none;
  20. color: inherit;
  21. }
  22. .card-book__link:hover {
  23. text-decoration: none;
  24. color: inherit;
  25. }
  26. /* 封面:撑满卡片宽度 */
  27. .card-book .book-cover--md {
  28. width: 100%;
  29. min-width: unset;
  30. height: 200px;
  31. border-radius: var(--tblr-border-radius);
  32. }
  33. @media (max-width: 768px) {
  34. .card-book .book-cover--md {
  35. height: 150px;
  36. }
  37. }
  38. /* 信息区 */
  39. .card-book__info {
  40. padding: 0.75rem 0 0;
  41. }
  42. .card-book__title {
  43. font-size: 0.9375rem;
  44. font-weight: 600;
  45. color: var(--tblr-body-color);
  46. margin-bottom: 0.25rem;
  47. line-height: 1.4;
  48. display: -webkit-box;
  49. -webkit-line-clamp: 2;
  50. -webkit-box-orient: vertical;
  51. overflow: hidden;
  52. }
  53. .card-book:hover .card-book__title {
  54. color: var(--tblr-primary);
  55. }
  56. .card-book__author {
  57. font-size: 0.8125rem;
  58. color: var(--tblr-secondary);
  59. margin-bottom: 0.25rem;
  60. }
  61. .card-book__publisher {
  62. font-size: 0.8125rem;
  63. color: var(--tblr-secondary);
  64. margin-bottom: 0.375rem;
  65. }
  66. .card-book__publisher-link {
  67. color: var(--tblr-primary);
  68. text-decoration: none;
  69. }
  70. .card-book__publisher-link:hover {
  71. text-decoration: underline;
  72. }
  73. .card-book__badges {
  74. display: flex;
  75. flex-wrap: wrap;
  76. gap: 4px;
  77. margin-top: 0.375rem;
  78. }
  79. .card-book__badge {
  80. display: inline-block;
  81. padding: 2px 8px;
  82. background: var(--tblr-bg-surface-secondary);
  83. border: 1px solid var(--tblr-border-color);
  84. border-radius: 20px;
  85. font-size: 0.6875rem;
  86. color: var(--tblr-secondary);
  87. }
  88. /* ══════════════════════════════════════════
  89. 二、书籍网格(.book-grid)
  90. ══════════════════════════════════════════ */
  91. .book-grid {
  92. display: grid;
  93. grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  94. gap: 1.25rem;
  95. }
  96. @media (max-width: 575px) {
  97. .book-grid {
  98. grid-template-columns: repeat(2, 1fr);
  99. gap: 0.875rem;
  100. }
  101. }
  102. /* ══════════════════════════════════════════
  103. 三、show 页 — 文字截断
  104. ══════════════════════════════════════════ */
  105. .line2 {
  106. display: -webkit-box;
  107. -webkit-line-clamp: 2;
  108. -webkit-box-orient: vertical;
  109. overflow: hidden;
  110. text-overflow: ellipsis;
  111. }
  112. /* ══════════════════════════════════════════
  113. 四、子分类网格
  114. ══════════════════════════════════════════ */
  115. .tipitaka-sub-grid {
  116. display: grid;
  117. grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  118. gap: 8px;
  119. }
  120. /* ══════════════════════════════════════════
  121. 五、过滤器区
  122. ══════════════════════════════════════════ */
  123. .tipitaka-filters {
  124. display: flex;
  125. flex-direction: column;
  126. gap: 0.875rem;
  127. }
  128. .tipitaka-filter-row {
  129. display: flex;
  130. align-items: flex-start;
  131. gap: 0.75rem;
  132. }
  133. .tipitaka-filter-label {
  134. font-size: 0.75rem;
  135. font-weight: 500;
  136. color: var(--tblr-secondary);
  137. white-space: nowrap;
  138. padding-top: 4px;
  139. min-width: 2.5rem;
  140. }
  141. .tipitaka-filter-pills {
  142. display: flex;
  143. flex-wrap: wrap;
  144. gap: 6px;
  145. flex: 1;
  146. }
  147. .tipitaka-pill {
  148. display: inline-flex;
  149. align-items: center;
  150. gap: 4px;
  151. font-size: 0.8125rem;
  152. padding: 3px 10px;
  153. border-radius: 20px;
  154. border: 1px solid var(--tblr-border-color);
  155. color: var(--tblr-body-color);
  156. background: var(--tblr-bg-surface);
  157. text-decoration: none;
  158. transition: background 0.12s, border-color 0.12s, color 0.12s;
  159. white-space: nowrap;
  160. }
  161. .tipitaka-pill:hover {
  162. background: var(--tblr-bg-surface-secondary);
  163. border-color: var(--tblr-border-color-dark, #adb5bd);
  164. color: var(--tblr-body-color);
  165. text-decoration: none;
  166. }
  167. .tipitaka-pill--active {
  168. background: var(--tblr-primary);
  169. border-color: var(--tblr-primary);
  170. color: #fff;
  171. pointer-events: none;
  172. }
  173. .tipitaka-pill--active:hover {
  174. background: var(--tblr-primary);
  175. color: #fff;
  176. }
  177. .tipitaka-pill-count {
  178. font-size: 0.6875rem;
  179. opacity: 0.75;
  180. }
  181. .tipitaka-author-select {
  182. max-width: 220px;
  183. }
  184. .tipitaka-filter-clear {
  185. display: flex;
  186. justify-content: flex-end;
  187. padding-top: 0.25rem;
  188. border-top: 1px solid var(--tblr-border-color);
  189. }
  190. .tipitaka-clear-btn {
  191. font-size: 0.75rem;
  192. color: var(--tblr-secondary);
  193. text-decoration: none;
  194. display: inline-flex;
  195. align-items: center;
  196. gap: 4px;
  197. transition: color 0.12s;
  198. }
  199. .tipitaka-clear-btn:hover {
  200. color: var(--tblr-danger);
  201. }
  202. /* ══════════════════════════════════════════
  203. 六、排序栏
  204. ══════════════════════════════════════════ */
  205. .tipitaka-sort-bar {
  206. display: flex;
  207. align-items: center;
  208. justify-content: space-between;
  209. padding: 0 0.25rem;
  210. }
  211. .tipitaka-sort-bar__count {
  212. font-size: 0.8125rem;
  213. color: var(--tblr-secondary);
  214. }
  215. .tipitaka-sort-bar__count strong {
  216. color: var(--tblr-body-color);
  217. font-weight: 500;
  218. }
  219. .tipitaka-sort-bar__right {
  220. display: flex;
  221. align-items: center;
  222. gap: 0.5rem;
  223. }
  224. .tipitaka-sort-bar__label {
  225. font-size: 0.8125rem;
  226. color: var(--tblr-secondary);
  227. white-space: nowrap;
  228. }
  229. .tipitaka-sort-select {
  230. width: auto;
  231. min-width: 80px;
  232. }
  233. /* ══════════════════════════════════════════
  234. 七、活跃译者列表
  235. ══════════════════════════════════════════ */
  236. .tipitaka-author-list {
  237. list-style: none;
  238. padding: 0;
  239. margin: 0;
  240. }
  241. .tipitaka-author-list li {
  242. border-bottom: 1px solid var(--tblr-border-color);
  243. }
  244. .tipitaka-author-list li:last-child {
  245. border-bottom: none;
  246. }
  247. .tipitaka-author-item {
  248. display: flex;
  249. align-items: center;
  250. gap: 0.625rem;
  251. padding: 6px 0;
  252. text-decoration: none;
  253. color: inherit;
  254. transition: background 0.12s;
  255. }
  256. .tipitaka-author-item:hover {
  257. color: var(--tblr-primary);
  258. text-decoration: none;
  259. }
  260. .tipitaka-author-item__info {
  261. display: flex;
  262. flex-direction: column;
  263. min-width: 0;
  264. }
  265. .tipitaka-author-item__name {
  266. font-size: 0.8125rem;
  267. font-weight: 500;
  268. color: var(--tblr-body-color);
  269. white-space: nowrap;
  270. overflow: hidden;
  271. text-overflow: ellipsis;
  272. }
  273. .tipitaka-author-item:hover .tipitaka-author-item__name {
  274. color: var(--tblr-primary);
  275. }
  276. .tipitaka-author-item__count {
  277. font-size: 0.6875rem;
  278. color: var(--tblr-secondary);
  279. }
  280. /* ══════════════════════════════════════════
  281. 八、响应式
  282. ══════════════════════════════════════════ */
  283. @media (max-width: 768px) {
  284. /* 过滤器:label 和 pills 垂直排列 */
  285. .tipitaka-filter-row {
  286. flex-direction: column;
  287. gap: 0.375rem;
  288. }
  289. .tipitaka-filter-label {
  290. padding-top: 0;
  291. }
  292. /* 作者下拉撑满 */
  293. .tipitaka-author-select {
  294. max-width: 100%;
  295. width: 100%;
  296. }
  297. }