tab1.page.scss 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. :root {
  2. --ion-color-primary: #07C160;
  3. --ion-color-primary-rgb: 7,193,96;
  4. --ion-color-primary-contrast: #ffffff;
  5. --ion-color-primary-contrast-rgb: 255,255,255;
  6. --ion-color-primary-shade: #06aa54;
  7. --ion-color-primary-tint: #20c770;
  8. --ion-color-secondary: #FFCC00;
  9. --ion-color-secondary-rgb: 255,204,0;
  10. --ion-color-secondary-contrast: #000000;
  11. --ion-color-secondary-contrast-rgb: 0,0,0;
  12. --ion-color-secondary-shade: #e0b400;
  13. --ion-color-secondary-tint: #ffd11a;
  14. --ion-color-tertiary: #5260ff;
  15. --ion-color-tertiary-rgb: 82,96,255;
  16. --ion-color-tertiary-contrast: #ffffff;
  17. --ion-color-tertiary-contrast-rgb: 255,255,255;
  18. --ion-color-tertiary-shade: #4854e0;
  19. --ion-color-tertiary-tint: #6370ff;
  20. --ion-color-success: #2dd36f;
  21. --ion-color-success-rgb: 45,211,111;
  22. --ion-color-success-contrast: #ffffff;
  23. --ion-color-success-contrast-rgb: 255,255,255;
  24. --ion-color-success-shade: #28ba62;
  25. --ion-color-success-tint: #42d77d;
  26. --ion-color-warning: #ffc409;
  27. --ion-color-warning-rgb: 255,196,9;
  28. --ion-color-warning-contrast: #000000;
  29. --ion-color-warning-contrast-rgb: 0,0,0;
  30. --ion-color-warning-shade: #e0ac08;
  31. --ion-color-warning-tint: #ffca22;
  32. --ion-color-danger: #eb445a;
  33. --ion-color-danger-rgb: 235,68,90;
  34. --ion-color-danger-contrast: #ffffff;
  35. --ion-color-danger-contrast-rgb: 255,255,255;
  36. --ion-color-danger-shade: #cf3c4f;
  37. --ion-color-danger-tint: #ed576b;
  38. --ion-color-dark: #222428;
  39. --ion-color-dark-rgb: 34,36,40;
  40. --ion-color-dark-contrast: #ffffff;
  41. --ion-color-dark-contrast-rgb: 255,255,255;
  42. --ion-color-dark-shade: #1e2023;
  43. --ion-color-dark-tint: #383a3e;
  44. --ion-color-medium: #92949c;
  45. --ion-color-medium-rgb: 146,148,156;
  46. --ion-color-medium-contrast: #ffffff;
  47. --ion-color-medium-contrast-rgb: 255,255,255;
  48. --ion-color-medium-shade: #808289;
  49. --ion-color-medium-tint: #9d9fa6;
  50. --ion-color-light: #f4f5f8;
  51. --ion-color-light-rgb: 244,245,248;
  52. --ion-color-light-contrast: #000000;
  53. --ion-color-light-contrast-rgb: 0,0,0;
  54. --ion-color-light-shade: #d7d8da;
  55. --ion-color-light-tint: #f5f6f9;
  56. --ion-background-color: #f8f9fa;
  57. --ion-toolbar-background: #ffffff;
  58. --ion-card-background: #ffffff;
  59. --ion-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  60. }
  61. * {
  62. margin: 0;
  63. padding: 0;
  64. box-sizing: border-box;
  65. }
  66. ion-content {
  67. --background: #f8f9fa;
  68. --padding-top: 60px;
  69. --padding-bottom: 60px;
  70. }
  71. /* 顶部工具栏美化 */
  72. .custom-toolbar {
  73. --background: white;
  74. --border-width: 0;
  75. --min-height: 60px;
  76. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  77. }
  78. .avatar-container {
  79. display: flex;
  80. align-items: center;
  81. gap: 8px;
  82. }
  83. .avatar {
  84. width: 36px;
  85. height: 36px;
  86. border-radius: 50%;
  87. border: 2px solid var(--ion-color-primary);
  88. display: flex;
  89. align-items: center;
  90. justify-content: center;
  91. overflow: hidden;
  92. background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  93. }
  94. .streak-badge {
  95. background: linear-gradient(135deg, #FFCC00 0%, #FF9500 100%);
  96. border-radius: 12px;
  97. padding: 3px 8px;
  98. display: flex;
  99. align-items: center;
  100. gap: 4px;
  101. font-size: 12px;
  102. font-weight: 500;
  103. color: white;
  104. box-shadow: 0 2px 4px rgba(255, 153, 0, 0.3);
  105. }
  106. .message-badge {
  107. position: absolute;
  108. top: -5px;
  109. right: -5px;
  110. width: 18px;
  111. height: 18px;
  112. background: var(--ion-color-danger);
  113. border-radius: 50%;
  114. color: white;
  115. font-size: 10px;
  116. display: flex;
  117. align-items: center;
  118. justify-content: center;
  119. font-weight: bold;
  120. box-shadow: 0 2px 4px rgba(235, 68, 90, 0.3);
  121. }
  122. /* 搜索栏美化 */
  123. .search-container {
  124. padding: 10px 16px;
  125. background: white;
  126. }
  127. ion-searchbar {
  128. --background: #f1f3f5;
  129. --border-radius: 12px;
  130. --box-shadow: none;
  131. --icon-color: var(--ion-color-medium);
  132. --placeholder-color: #868e96;
  133. --color: #343a40;
  134. padding: 0;
  135. }
  136. /* 选项卡美化 */
  137. ion-segment {
  138. --background: white;
  139. padding: 8px 16px;
  140. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  141. }
  142. ion-segment-button {
  143. --color: var(--ion-color-medium);
  144. --color-checked: var(--ion-color-primary);
  145. --indicator-color: var(--ion-color-primary);
  146. --indicator-height: 3px;
  147. --border-radius: 0;
  148. --padding-start: 0;
  149. --padding-end: 0;
  150. min-width: 60px;
  151. font-size: 14px;
  152. font-weight: 500;
  153. text-transform: none;
  154. letter-spacing: 0;
  155. position: relative;
  156. overflow: visible;
  157. }
  158. /* 卡片美化 */
  159. .card-grid {
  160. padding: 10px 16px;
  161. display: grid;
  162. grid-template-columns: repeat(2, 1fr);
  163. gap: 12px;
  164. }
  165. ion-card {
  166. border-radius: 12px;
  167. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  168. margin: 0;
  169. transition: transform 0.3s ease, box-shadow 0.3s ease;
  170. }
  171. ion-card:hover {
  172. transform: translateY(-5px);
  173. box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  174. }
  175. .card-image {
  176. width: 100%;
  177. height: 150px;
  178. overflow: hidden;
  179. position: relative;
  180. }
  181. .card-image img {
  182. width: 100%;
  183. height: 100%;
  184. object-fit: cover;
  185. transition: transform 0.5s ease;
  186. }
  187. ion-card:hover .card-image img {
  188. transform: scale(1.05);
  189. }
  190. .card-content {
  191. padding: 12px;
  192. }
  193. .card-desc {
  194. font-size: 14px;
  195. color: #343a40;
  196. line-height: 1.4;
  197. margin-bottom: 10px;
  198. display: -webkit-box;
  199. -webkit-line-clamp: 2;
  200. -webkit-box-orient: vertical;
  201. overflow: hidden;
  202. }
  203. .card-footer {
  204. display: flex;
  205. justify-content: space-between;
  206. align-items: center;
  207. }
  208. .user-info {
  209. display: flex;
  210. align-items: center;
  211. gap: 6px;
  212. }
  213. .user-avatar {
  214. width: 24px;
  215. height: 24px;
  216. border-radius: 50%;
  217. background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  218. display: flex;
  219. align-items: center;
  220. justify-content: center;
  221. color: white;
  222. font-size: 10px;
  223. font-weight: bold;
  224. }
  225. .user-name {
  226. font-size: 12px;
  227. color: #495057;
  228. font-weight: 500;
  229. }
  230. .like-count {
  231. display: flex;
  232. align-items: center;
  233. gap: 4px;
  234. font-size: 12px;
  235. color: #e03131;
  236. font-weight: 500;
  237. }
  238. /* 动画效果 */
  239. @keyframes fadeIn {
  240. from { opacity: 0; transform: translateY(10px); }
  241. to { opacity: 1; transform: translateY(0); }
  242. }
  243. ion-card {
  244. animation: fadeIn 0.5s ease forwards;
  245. }
  246. .card-1 { animation-delay: 0.1s; }
  247. .card-2 { animation-delay: 0.2s; }
  248. .card-3 { animation-delay: 0.3s; }
  249. .card-4 { animation-delay: 0.4s; }
  250. .card-5 { animation-delay: 0.5s; }
  251. .card-6 { animation-delay: 0.6s; }
  252. /* 响应式调整 */
  253. @media (max-width: 350px) {
  254. .card-grid {
  255. grid-template-columns: 1fr;
  256. }
  257. ion-segment-button {
  258. min-width: 50px;
  259. font-size: 12px;
  260. }
  261. }