detail.wxss 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. /* pages/detail/detail.wxss */
  2. page {
  3. padding: 0;
  4. margin: 0;
  5. }
  6. .container {
  7. min-height: 100vh;
  8. background: linear-gradient(180deg, #f8f9ff 0%, #f5f5f5 100%);
  9. padding-bottom: 200rpx;
  10. padding-top: 0;
  11. margin-top: 0;
  12. }
  13. .header {
  14. display: flex;
  15. background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  16. padding: 30rpx 20rpx;
  17. margin-bottom: 24rpx;
  18. border-bottom: 1rpx solid rgba(102, 126, 234, 0.1);
  19. padding-top: calc(30rpx + env(safe-area-inset-top));
  20. }
  21. .cover-wrapper {
  22. width: 220rpx;
  23. height: 300rpx;
  24. margin-right: 32rpx;
  25. flex-shrink: 0;
  26. border-radius: 16rpx;
  27. overflow: hidden;
  28. box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.2);
  29. position: relative;
  30. }
  31. .cover-wrapper::after {
  32. content: '';
  33. position: absolute;
  34. top: 0;
  35. left: 0;
  36. right: 0;
  37. bottom: 0;
  38. background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  39. opacity: 0;
  40. transition: opacity 0.3s ease;
  41. pointer-events: none;
  42. }
  43. .cover {
  44. width: 100%;
  45. height: 100%;
  46. transition: transform 0.3s ease;
  47. }
  48. .cover-placeholder {
  49. width: 100%;
  50. height: 100%;
  51. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  52. border-radius: 16rpx;
  53. display: flex;
  54. align-items: center;
  55. justify-content: center;
  56. padding: 24rpx;
  57. box-sizing: border-box;
  58. position: relative;
  59. }
  60. .cover-text {
  61. color: #fff;
  62. font-size: 26rpx;
  63. font-weight: 500;
  64. text-align: center;
  65. overflow: hidden;
  66. text-overflow: ellipsis;
  67. display: -webkit-box;
  68. -webkit-line-clamp: 4;
  69. -webkit-box-orient: vertical;
  70. line-height: 1.5;
  71. }
  72. .info {
  73. flex: 1;
  74. display: flex;
  75. flex-direction: column;
  76. justify-content: space-between;
  77. min-width: 0;
  78. }
  79. .title {
  80. font-size: 38rpx;
  81. font-weight: 600;
  82. color: #1a1a1a;
  83. margin-bottom: 20rpx;
  84. line-height: 1.4;
  85. }
  86. .author {
  87. font-size: 28rpx;
  88. color: #666;
  89. margin-bottom: 20rpx;
  90. font-weight: 500;
  91. }
  92. .meta {
  93. display: flex;
  94. flex-wrap: wrap;
  95. gap: 12rpx;
  96. margin-bottom: 20rpx;
  97. }
  98. .meta text {
  99. font-size: 24rpx;
  100. color: #667eea;
  101. padding: 8rpx 18rpx;
  102. background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  103. border-radius: 16rpx;
  104. font-weight: 500;
  105. }
  106. .publisher {
  107. font-size: 26rpx;
  108. color: #8a8a8a;
  109. font-weight: 500;
  110. }
  111. .description {
  112. background: #fff;
  113. padding: 40rpx 20rpx;
  114. margin: 0 0 24rpx 0;
  115. border-radius: 0;
  116. box-shadow: 0 4rpx 20rpx rgba(102, 126, 234, 0.08);
  117. width: 100%;
  118. box-sizing: border-box;
  119. }
  120. .section-title {
  121. font-size: 32rpx;
  122. font-weight: 600;
  123. color: #1a1a1a;
  124. margin-bottom: 24rpx;
  125. position: relative;
  126. padding-left: 20rpx;
  127. }
  128. .section-title::before {
  129. content: '';
  130. position: absolute;
  131. left: 0;
  132. top: 50%;
  133. transform: translateY(-50%);
  134. width: 6rpx;
  135. height: 28rpx;
  136. background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  137. border-radius: 3rpx;
  138. }
  139. .desc-text {
  140. font-size: 28rpx;
  141. color: #666;
  142. line-height: 1.9;
  143. text-align: justify;
  144. }
  145. .actions {
  146. position: fixed;
  147. bottom: 0;
  148. left: 0;
  149. right: 0;
  150. display: flex;
  151. background: #fff;
  152. padding: 24rpx 30rpx;
  153. padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
  154. box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1);
  155. gap: 16rpx;
  156. }
  157. .action-btn {
  158. flex: 1;
  159. min-height: 88rpx;
  160. text-align: center;
  161. border-radius: 16rpx;
  162. font-size: 28rpx;
  163. font-weight: 500;
  164. border: none;
  165. transition: all 0.3s ease;
  166. display: flex;
  167. flex-direction: column;
  168. align-items: center;
  169. justify-content: center;
  170. gap: 4rpx;
  171. padding: 12rpx 8rpx;
  172. box-sizing: border-box;
  173. }
  174. .action-btn::after {
  175. border: none;
  176. }
  177. .action-btn.primary {
  178. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  179. color: #fff;
  180. box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.3);
  181. }
  182. .action-btn.primary:active {
  183. transform: scale(0.98);
  184. box-shadow: 0 2rpx 12rpx rgba(102, 126, 234, 0.4);
  185. }
  186. .action-btn:not(.primary) {
  187. background: #fff;
  188. color: #1a1a1a;
  189. border: 2rpx solid #c0c0c0;
  190. font-weight: 600;
  191. }
  192. .action-btn:not(.primary):active {
  193. background: #f5f5f5;
  194. border-color: #999;
  195. transform: scale(0.98);
  196. }
  197. .action-btn.primary {
  198. flex-direction: row;
  199. gap: 8rpx;
  200. }
  201. .btn-icon {
  202. font-size: 40rpx;
  203. font-weight: bold;
  204. color: #667eea;
  205. line-height: 1;
  206. display: block;
  207. }
  208. .action-btn.primary .btn-icon {
  209. display: none;
  210. }
  211. .chapter-section {
  212. background: #fff;
  213. padding: 40rpx 20rpx;
  214. margin: 0 0 24rpx 0;
  215. border-radius: 0;
  216. box-shadow: 0 4rpx 20rpx rgba(102, 126, 234, 0.08);
  217. width: 100%;
  218. box-sizing: border-box;
  219. }
  220. .chapter-section .section-title {
  221. display: flex;
  222. justify-content: space-between;
  223. align-items: center;
  224. font-size: 32rpx;
  225. font-weight: 600;
  226. color: #1a1a1a;
  227. margin-bottom: 24rpx;
  228. padding-left: 20rpx;
  229. }
  230. .chapter-count {
  231. font-size: 26rpx;
  232. font-weight: normal;
  233. color: #8a8a8a;
  234. background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  235. padding: 4rpx 14rpx;
  236. border-radius: 12rpx;
  237. }
  238. .chapter-list,
  239. .chapter-preview {
  240. max-height: 600rpx;
  241. overflow-y: auto;
  242. }
  243. .chapter-item {
  244. display: flex;
  245. align-items: center;
  246. padding: 24rpx 0;
  247. border-bottom: 1rpx solid #f0f0f0;
  248. transition: all 0.3s ease;
  249. position: relative;
  250. }
  251. .chapter-item::before {
  252. content: '';
  253. position: absolute;
  254. left: 0;
  255. top: 0;
  256. bottom: 0;
  257. width: 4rpx;
  258. background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  259. opacity: 0;
  260. transition: opacity 0.3s ease;
  261. }
  262. .chapter-item:active {
  263. background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
  264. padding-left: 12rpx;
  265. }
  266. .chapter-item:active::before {
  267. opacity: 1;
  268. }
  269. .chapter-item:last-child {
  270. border-bottom: none;
  271. }
  272. .chapter-number {
  273. width: 60rpx;
  274. font-size: 24rpx;
  275. color: #999;
  276. text-align: center;
  277. font-weight: 500;
  278. flex-shrink: 0;
  279. }
  280. .chapter-title {
  281. flex: 1;
  282. font-size: 28rpx;
  283. color: #333;
  284. overflow: hidden;
  285. text-overflow: ellipsis;
  286. white-space: nowrap;
  287. margin: 0 16rpx;
  288. font-weight: 500;
  289. }
  290. .chapter-free {
  291. font-size: 22rpx;
  292. color: #667eea;
  293. padding: 6rpx 14rpx;
  294. background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  295. border-radius: 12rpx;
  296. font-weight: 500;
  297. flex-shrink: 0;
  298. }
  299. .no-chapters {
  300. background: #fff;
  301. padding: 80rpx 20rpx;
  302. text-align: center;
  303. color: #999;
  304. font-size: 28rpx;
  305. margin: 0 0 24rpx 0;
  306. border-radius: 0;
  307. box-shadow: 0 4rpx 20rpx rgba(102, 126, 234, 0.08);
  308. width: 100%;
  309. box-sizing: border-box;
  310. }
  311. .no-chapters::before {
  312. content: '📑';
  313. font-size: 80rpx;
  314. display: block;
  315. margin-bottom: 20rpx;
  316. opacity: 0.3;
  317. }
  318. .loading {
  319. text-align: center;
  320. padding: 200rpx 40rpx;
  321. display: flex;
  322. flex-direction: column;
  323. align-items: center;
  324. }
  325. .loading text {
  326. font-size: 28rpx;
  327. color: #999;
  328. margin-top: 20rpx;
  329. }
  330. .loading::before {
  331. content: '';
  332. width: 40rpx;
  333. height: 40rpx;
  334. border: 4rpx solid #f0f0f0;
  335. border-top-color: #667eea;
  336. border-radius: 50%;
  337. animation: spin 0.8s linear infinite;
  338. }
  339. @keyframes spin {
  340. 0% {
  341. transform: rotate(0deg);
  342. }
  343. 100% {
  344. transform: rotate(360deg);
  345. }
  346. }