与牧同行-小程序用户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

441 lines
7.5 KiB

  1. .forum-list-page {
  2. min-height: 100vh;
  3. background-color: #f8f8f8;
  4. position: relative;
  5. }
  6. /* 顶部栏 */
  7. .header {
  8. display: flex;
  9. justify-content: space-between;
  10. align-items: center;
  11. padding: 60rpx 30rpx 20rpx;
  12. background-color: #fff;
  13. position: sticky;
  14. top: 0;
  15. z-index: 100;
  16. box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  17. }
  18. .title {
  19. font-size: 40rpx;
  20. font-weight: bold;
  21. color: #333;
  22. }
  23. .add-btn {
  24. background-color: #07c160;
  25. color: white;
  26. font-size: 28rpx;
  27. padding: 12rpx 30rpx;
  28. line-height: normal;
  29. border-radius: 40rpx;
  30. margin: 0;
  31. }
  32. /* 筛选栏 */
  33. .filter-bar {
  34. background-color: #fff;
  35. padding: 20rpx 30rpx;
  36. border-bottom: 1rpx solid #f0f0f0;
  37. position: sticky;
  38. top: 120rpx;
  39. z-index: 99;
  40. }
  41. .filter-scroll {
  42. white-space: nowrap;
  43. height: 60rpx;
  44. }
  45. .filter-list {
  46. display: inline-flex;
  47. gap: 30rpx;
  48. }
  49. .filter-item {
  50. padding: 0 20rpx;
  51. height: 60rpx;
  52. line-height: 60rpx;
  53. font-size: 28rpx;
  54. color: #666;
  55. border-radius: 30rpx;
  56. transition: all 0.3s;
  57. }
  58. .filter-item.active {
  59. background-color: rgba(7, 193, 96, 0.1);
  60. color: #07c160;
  61. font-weight: 500;
  62. }
  63. /* 搜索框 */
  64. .search-container {
  65. padding: 20rpx 30rpx;
  66. background-color: #fff;
  67. position: sticky;
  68. top: 200rpx;
  69. z-index: 98;
  70. }
  71. .search-input-wrapper {
  72. display: flex;
  73. align-items: center;
  74. background-color: #f8f8f8;
  75. border-radius: 40rpx;
  76. padding: 0 30rpx;
  77. height: 80rpx;
  78. }
  79. .search-icon {
  80. width: 36rpx;
  81. height: 36rpx;
  82. margin-right: 20rpx;
  83. opacity: 0.5;
  84. }
  85. .search-input {
  86. flex: 1;
  87. font-size: 28rpx;
  88. height: 80rpx;
  89. line-height: 80rpx;
  90. }
  91. .search-clear {
  92. width: 40rpx;
  93. height: 40rpx;
  94. line-height: 40rpx;
  95. text-align: center;
  96. font-size: 36rpx;
  97. color: #999;
  98. border-radius: 50%;
  99. background-color: #e0e0e0;
  100. }
  101. /* 帖子列表容器 */
  102. .post-list-container {
  103. height: calc(100vh - 300rpx);
  104. padding: 20rpx 0;
  105. }
  106. /* 空状态 */
  107. .empty-state {
  108. display: flex;
  109. flex-direction: column;
  110. align-items: center;
  111. justify-content: center;
  112. padding: 120rpx 30rpx;
  113. text-align: center;
  114. }
  115. .empty-image {
  116. width: 300rpx;
  117. height: 300rpx;
  118. margin-bottom: 40rpx;
  119. opacity: 0.6;
  120. }
  121. .empty-text {
  122. font-size: 30rpx;
  123. color: #999;
  124. margin-bottom: 40rpx;
  125. }
  126. .empty-btn {
  127. background-color: #07c160;
  128. color: white;
  129. font-size: 28rpx;
  130. padding: 20rpx 50rpx;
  131. line-height: normal;
  132. border-radius: 40rpx;
  133. margin: 0;
  134. }
  135. /* 帖子列表 */
  136. .post-list {
  137. padding: 0 30rpx;
  138. }
  139. .post-item {
  140. display: flex;
  141. background-color: white;
  142. border-radius: 16rpx;
  143. padding: 30rpx;
  144. margin-bottom: 20rpx;
  145. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
  146. transition: transform 0.3s, box-shadow 0.3s;
  147. }
  148. .post-item:active {
  149. transform: translateY(-2rpx);
  150. box-shadow: 0 6rpx 30rpx rgba(0, 0, 0, 0.1);
  151. }
  152. /* 左侧状态栏 */
  153. .post-status-side {
  154. display: flex;
  155. flex-direction: column;
  156. align-items: center;
  157. margin-right: 30rpx;
  158. min-width: 120rpx;
  159. }
  160. .vote-count,
  161. .reply-count,
  162. .view-count {
  163. display: flex;
  164. flex-direction: column;
  165. align-items: center;
  166. margin-bottom: 20rpx;
  167. }
  168. .vote-count .vote-number,
  169. .reply-count .reply-number,
  170. .view-count .view-number {
  171. font-size: 28rpx;
  172. font-weight: bold;
  173. color: #333;
  174. margin-bottom: 4rpx;
  175. }
  176. .vote-count .vote-label,
  177. .reply-count .reply-label,
  178. .view-count .view-label {
  179. font-size: 22rpx;
  180. color: #999;
  181. }
  182. /* 右侧内容区 */
  183. .post-content-main {
  184. flex: 1;
  185. min-width: 0;
  186. }
  187. /* 帖子标题和状态 */
  188. .post-header {
  189. display: flex;
  190. align-items: center;
  191. margin-bottom: 16rpx;
  192. flex-wrap: wrap;
  193. gap: 12rpx;
  194. }
  195. .post-title {
  196. font-size: 32rpx;
  197. font-weight: bold;
  198. color: #333;
  199. line-height: 1.4;
  200. flex: 1;
  201. min-width: 0;
  202. word-break: break-all;
  203. }
  204. .status-badge {
  205. flex-shrink: 0;
  206. }
  207. .solved-badge {
  208. background-color: #07c160;
  209. color: white;
  210. font-size: 22rpx;
  211. padding: 4rpx 12rpx;
  212. border-radius: 20rpx;
  213. }
  214. .hot-badge {
  215. background-color: #ff6b6b;
  216. color: white;
  217. font-size: 22rpx;
  218. padding: 4rpx 12rpx;
  219. border-radius: 20rpx;
  220. }
  221. /* 帖子内容摘要 */
  222. .post-summary {
  223. font-size: 28rpx;
  224. color: #666;
  225. line-height: 1.5;
  226. margin-bottom: 20rpx;
  227. display: -webkit-box;
  228. -webkit-box-orient: vertical;
  229. -webkit-line-clamp: 2;
  230. overflow: hidden;
  231. text-overflow: ellipsis;
  232. }
  233. /* 帖子元信息 */
  234. .post-meta {
  235. display: flex;
  236. justify-content: space-between;
  237. align-items: center;
  238. margin-bottom: 15rpx;
  239. flex-wrap: wrap;
  240. gap: 15rpx;
  241. }
  242. .user-info {
  243. display: flex;
  244. align-items: center;
  245. font-size: 24rpx;
  246. color: #999;
  247. }
  248. .user-avatar {
  249. width: 40rpx;
  250. height: 40rpx;
  251. border-radius: 50%;
  252. margin-right: 10rpx;
  253. }
  254. .username {
  255. margin-right: 8rpx;
  256. }
  257. .separator {
  258. margin: 0 8rpx;
  259. }
  260. .post-time {
  261. color: #999;
  262. }
  263. /* 标签 */
  264. .post-tags {
  265. display: flex;
  266. align-items: center;
  267. gap: 10rpx;
  268. }
  269. .tag {
  270. font-size: 22rpx;
  271. color: #07c160;
  272. background-color: rgba(7, 193, 96, 0.1);
  273. padding: 4rpx 12rpx;
  274. border-radius: 20rpx;
  275. flex-shrink: 0;
  276. }
  277. .more-tags {
  278. font-size: 22rpx;
  279. color: #999;
  280. margin-left: 4rpx;
  281. }
  282. /* 最后回复信息 */
  283. .last-reply {
  284. font-size: 24rpx;
  285. color: #999;
  286. padding-top: 15rpx;
  287. border-top: 1rpx solid #f0f0f0;
  288. }
  289. .last-reply-label {
  290. color: #666;
  291. }
  292. .last-reply-user {
  293. color: #07c160;
  294. margin: 0 5rpx;
  295. }
  296. /* 加载更多 */
  297. .load-more {
  298. padding: 40rpx 0;
  299. text-align: center;
  300. color: #999;
  301. font-size: 28rpx;
  302. }
  303. .loading-text {
  304. color: #999;
  305. }
  306. .loading-more {
  307. display: flex;
  308. flex-direction: column;
  309. align-items: center;
  310. color: #999;
  311. }
  312. .loading-more .loading-icon {
  313. width: 50rpx;
  314. height: 50rpx;
  315. margin-bottom: 10rpx;
  316. }
  317. /* 没有更多了 */
  318. .no-more {
  319. padding: 40rpx 0;
  320. text-align: center;
  321. color: #999;
  322. font-size: 26rpx;
  323. }
  324. /* 底部占位 */
  325. .bottom-placeholder {
  326. height: 100rpx;
  327. }
  328. /* 加载提示 */
  329. .loading {
  330. display: flex;
  331. flex-direction: column;
  332. align-items: center;
  333. justify-content: center;
  334. padding: 100rpx 0;
  335. color: #999;
  336. font-size: 28rpx;
  337. }
  338. .loading-icon {
  339. width: 60rpx;
  340. height: 60rpx;
  341. margin-bottom: 20rpx;
  342. animation: rotate 1s linear infinite;
  343. }
  344. @keyframes rotate {
  345. 0% { transform: rotate(0deg); }
  346. 100% { transform: rotate(360deg); }
  347. }
  348. /* 浮动按钮 */
  349. .fab-container {
  350. position: fixed;
  351. bottom: 60rpx;
  352. right: 40rpx;
  353. z-index: 1000;
  354. }
  355. .fab {
  356. width: 100rpx;
  357. height: 100rpx;
  358. background-color: #07c160;
  359. border-radius: 50%;
  360. display: flex;
  361. align-items: center;
  362. justify-content: center;
  363. box-shadow: 0 8rpx 30rpx rgba(7, 193, 96, 0.3);
  364. transition: transform 0.3s, box-shadow 0.3s;
  365. }
  366. .fab:active {
  367. transform: scale(0.95);
  368. box-shadow: 0 4rpx 20rpx rgba(7, 193, 96, 0.2);
  369. }
  370. .fab-icon {
  371. width: 44rpx;
  372. height: 44rpx;
  373. }
  374. /* 移除按钮边框 */
  375. button::after {
  376. border: none;
  377. }
  378. /* 滚动条样式 */
  379. ::-webkit-scrollbar {
  380. width: 0;
  381. height: 0;
  382. color: transparent;
  383. }