tab2.page.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. /* Tab2 页面美化 */
  2. ion-content.content-bg {
  3. --background: #f8f9fa;
  4. background: linear-gradient(180deg, #e3f2fd 0%, #f8f9fa 100%);
  5. }
  6. /* 工具栏渐变样式 */
  7. .toolbar-gradient {
  8. --background: linear-gradient(to right, #3a7bd5, #00d2ff);
  9. --color: white;
  10. ion-title.header-title {
  11. font-weight: 600;
  12. letter-spacing: 0.5px;
  13. text-align: center;
  14. }
  15. .icon-btn {
  16. --padding-end: 0;
  17. --padding-start: 0;
  18. }
  19. }
  20. /* 卡片玻璃效果 */
  21. .glass-card {
  22. border-radius: 16px;
  23. box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
  24. background: rgba(255, 255, 255, 0.9);
  25. backdrop-filter: blur(10px);
  26. border: 1px solid rgba(255, 255, 255, 0.5);
  27. overflow: visible;
  28. }
  29. /* 加载状态美化 */
  30. .loading-container {
  31. padding: 16px;
  32. .skeleton-card {
  33. background: white;
  34. border-radius: 16px;
  35. padding: 16px;
  36. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  37. margin-bottom: 16px;
  38. }
  39. .skeleton-item {
  40. --padding-start: 0;
  41. --inner-padding-end: 0;
  42. .skeleton-avatar {
  43. width: 50px;
  44. height: 50px;
  45. border-radius: 12px;
  46. }
  47. }
  48. }
  49. /* 内容区域统一间距 */
  50. .content-area {
  51. padding: 12px;
  52. }
  53. /* 本周训练卡片 */
  54. .weekly-card {
  55. margin-bottom: 24px;
  56. background: rgba(255, 255, 255, 0.92); // 半透明白色背景
  57. .card-header-primary {
  58. background: linear-gradient(to right, #4b6cb7, #182848);
  59. color: white;
  60. border-radius: 16px 16px 0 0;
  61. padding: 16px;
  62. .card-title {
  63. display: flex;
  64. align-items: center;
  65. font-size: 1.3rem;
  66. font-weight: 600;
  67. letter-spacing: 0.5px;
  68. }
  69. .card-icon {
  70. margin-right: 10px;
  71. font-size: 1.6rem;
  72. }
  73. ion-card-subtitle {
  74. color: rgba(255, 255, 255, 0.8);
  75. font-size: 0.9rem;
  76. }
  77. }
  78. .progress-container {
  79. margin-bottom: 20px;
  80. .progress-header {
  81. display: flex;
  82. justify-content: space-between;
  83. margin-bottom: 6px;
  84. font-size: 0.9rem;
  85. color: #5a5a5a;
  86. font-weight: 500;
  87. }
  88. .progress-text {
  89. margin-top: 8px;
  90. text-align: right;
  91. font-size: 0.85rem;
  92. font-weight: 500;
  93. color: #3a7bd5;
  94. }
  95. }
  96. .day-grid {
  97. margin-top: 15px;
  98. .day-row {
  99. justify-content: space-between;
  100. }
  101. .day-col {
  102. display: flex;
  103. flex-direction: column;
  104. align-items: center;
  105. padding: 8px 5px;
  106. &.active {
  107. background: rgba(58, 123, 213, 0.1);
  108. border-radius: 12px;
  109. }
  110. .day-name {
  111. font-size: 1rem;
  112. font-weight: 500;
  113. margin-bottom: 8px;
  114. color: #3a3a3a;
  115. }
  116. ion-badge {
  117. padding: 8px;
  118. border-radius: 50%;
  119. ion-icon {
  120. font-size: 1.4rem;
  121. }
  122. }
  123. ion-icon {
  124. font-size: 1.5rem;
  125. }
  126. }
  127. }
  128. }
  129. /* 节标题美化 */
  130. .section-header {
  131. margin: 24px 0 16px;
  132. .section-label {
  133. font-size: 1.2rem;
  134. font-weight: 600;
  135. color: #1a237e; // 深蓝色
  136. font-weight: 600;
  137. display: block;
  138. margin-bottom: 4px;
  139. }
  140. .header-content {
  141. display: flex;
  142. justify-content: space-between;
  143. align-items: center;
  144. width: 100%;
  145. }
  146. ion-note {
  147. font-size: 0.9rem;
  148. color: #455a64; // 深灰蓝色
  149. }
  150. .refresh-btn {
  151. --color: #3a7bd5;
  152. --background-hover: rgba(58, 123, 213, 0.1);
  153. }
  154. }
  155. /* 计划列表美化 */
  156. .plan-list {
  157. background: transparent;
  158. .plan-item {
  159. --padding-start: 0;
  160. --inner-padding-end: 0;
  161. --inner-padding-top: 16px;
  162. --inner-padding-bottom: 16px;
  163. margin-bottom: 16px;
  164. background: rgba(58, 123, 213, 0.15);;
  165. border-radius: 16px;
  166. overflow: visible;
  167. .plan-icon {
  168. width: 50px;
  169. height: 50px;
  170. border-radius: 12px;
  171. display: flex;
  172. align-items: center;
  173. justify-content: center;
  174. margin-left: 16px;
  175. margin-right: 16px;
  176. ion-icon {
  177. font-size: 1.5rem;
  178. }
  179. }
  180. .plan-details {
  181. padding-right: 8px;
  182. .plan-header {
  183. display: flex;
  184. align-items: center;
  185. margin-bottom: 8px;
  186. h3 {
  187. font-size: 1.1rem;
  188. font-weight: 600;
  189. margin-right: 10px;
  190. margin-top: 0;
  191. margin-bottom: 0;
  192. color: #00a0fd;
  193. font-weight: 700; // 加粗增强可读性
  194. }
  195. .difficulty-badge {
  196. font-size: 0.7rem;
  197. font-weight: 600;
  198. letter-spacing: 0.5px;
  199. padding: 4px 8px;
  200. }
  201. }
  202. .plan-stats {
  203. display: flex;
  204. margin-bottom: 8px;
  205. .progress-tag, .next-tag {
  206. display: flex;
  207. align-items: center;
  208. font-weight: 500;
  209. background: rgba(58, 123, 213, 0.15); // 更明显的背景色
  210. border-radius: 12px;
  211. padding: 4px 8px;
  212. font-size: 0.85rem;
  213. color: #444; // 深灰色
  214. margin-right: 10px;
  215. ion-icon {
  216. margin-right: 4px;
  217. font-size: 0.9rem;
  218. }
  219. }
  220. }
  221. .plan-description {
  222. color: #555; // 加深描述文字颜色
  223. font-size: 0.95rem;
  224. line-height: 1.4;
  225. margin-top: 8px;
  226. margin-bottom: 8px;
  227. }
  228. .plan-details > * {
  229. text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  230. .task-summary {
  231. margin-top: 10px;
  232. ion-chip {
  233. margin: 0 6px 6px 0;
  234. font-size: 0.8rem;
  235. padding: 4px 12px;
  236. border-radius: 50px;
  237. --color: #333; // 芯片文字颜色加深
  238. font-weight: 500; // 加粗
  239. ion-icon {
  240. font-size: 0.9rem;
  241. margin-right: 4px;
  242. }
  243. }
  244. }
  245. }
  246. }
  247. .days-badge {
  248. margin-right: 16px;
  249. font-weight: 600;
  250. font-size: 1rem;
  251. padding: 8px 12px;
  252. border-radius: 50px;
  253. min-width: 50px;
  254. text-align: center;
  255. --color: white; // 文字改为白色确保可读
  256. font-weight: 600;
  257. }
  258. }
  259. }
  260. /* 空状态美化 */
  261. .empty-state {
  262. text-align: center;
  263. padding: 40px 20px;
  264. .empty-icon {
  265. width: 80px;
  266. height: 80px;
  267. background: rgba(58, 123, 213, 0.1);
  268. border-radius: 50%;
  269. display: flex;
  270. align-items: center;
  271. justify-content: center;
  272. margin: 0 auto 20px;
  273. ion-icon {
  274. font-size: 2.5rem;
  275. color: #3a7bd5;
  276. }
  277. }
  278. h3 {
  279. font-size: 1.3rem;
  280. color: #212121; // 加深标题
  281. margin-bottom: 8px;
  282. }
  283. p {
  284. color: #555; // 加深描述
  285. font-size: 1rem;
  286. margin-bottom: 20px;
  287. max-width: 300px;
  288. margin-left: auto;
  289. margin-right: auto;
  290. }
  291. .create-btn {
  292. max-width: 280px;
  293. margin: 0 auto;
  294. font-weight: 600;
  295. border-radius: 12px;
  296. --box-shadow: 0 4px 16px rgba(58, 123, 213, 0.3);
  297. }
  298. }
  299. /* 教练卡片美化 */
  300. .coach-card.running-theme {
  301. background: linear-gradient(to bottom right, #4b6cb7, #182848);
  302. color: white;
  303. border-radius: 16px;
  304. .avatar-container {
  305. position: relative;
  306. .coach-avatar {
  307. width: 100%;
  308. height: 160px;
  309. object-fit: cover;
  310. border-radius: 16px 16px 0 0;
  311. }
  312. .sport-badge {
  313. position: absolute;
  314. top: 16px;
  315. right: 16px;
  316. background: rgba(255, 255, 255, 0.9);
  317. color: #3a7bd5;
  318. padding: 4px 12px;
  319. border-radius: 30px;
  320. font-weight: 600;
  321. font-size: 0.9rem;
  322. }
  323. .rating-badge {
  324. position: absolute;
  325. bottom: 16px;
  326. right: 16px;
  327. display: flex;
  328. align-items: center;
  329. background: rgba(255, 255, 255, 0.9);
  330. color: #f39c12;
  331. padding: 4px 12px;
  332. border-radius: 30px;
  333. font-weight: 600;
  334. font-size: 0.9rem;
  335. ion-icon {
  336. margin-right: 4px;
  337. }
  338. }
  339. }
  340. ion-card-header {
  341. padding: 16px;
  342. .coach-name {
  343. font-size: 1.4rem;
  344. font-weight: 700;
  345. }
  346. .coach-title {
  347. font-size: 1rem;
  348. color: #ddd;
  349. font-weight: 500;
  350. }
  351. }
  352. ion-card-content {
  353. padding: 0 16px 20px;
  354. .stats-grid {
  355. display: flex;
  356. justify-content: space-between;
  357. margin: 20px 0;
  358. .stat-item {
  359. text-align: center;
  360. flex: 1;
  361. .stat-value {
  362. font-size: 1.5rem;
  363. font-weight: 700;
  364. margin-bottom: 4px;
  365. }
  366. .stat-label {
  367. font-size: 0.85rem;
  368. opacity: 0.9;
  369. }
  370. }
  371. }
  372. .specialties-section {
  373. margin: 20px 0;
  374. .section-title {
  375. font-size: 1rem;
  376. display: block;
  377. margin-bottom: 10px;
  378. opacity: 0.8;
  379. }
  380. .specialties-container {
  381. display: flex;
  382. flex-wrap: wrap;
  383. gap: 8px;
  384. .specialty-chip {
  385. background: rgba(255, 255, 255, 0.2);
  386. color: white;
  387. font-size: 0.85rem;
  388. ion-icon {
  389. color: #00d2ff;
  390. }
  391. }
  392. }
  393. }
  394. .consult-btn {
  395. --background: white;
  396. --color: #3a7bd5;
  397. --box-shadow: none;
  398. font-weight: 600;
  399. margin-top: 10px;
  400. --padding-top: 15px;
  401. --padding-bottom: 15px;
  402. --border-radius: 12px;
  403. ion-icon {
  404. color: #3a7bd5;
  405. }
  406. }
  407. }
  408. }
  409. /* 添加新的卡片样式类 */
  410. .card-content-box {
  411. background: #ffffff; // 纯白背景确保对比度
  412. border-radius: 16px;
  413. padding: 16px;
  414. margin-bottom: 16px;
  415. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  416. .plan-header h3 {
  417. color: #1a237e; // 深蓝色标题
  418. font-size: 1.2rem;
  419. font-weight: 700;
  420. margin-bottom: 8px;
  421. }
  422. }
  423. /* FAB 按钮美化 */
  424. .fab-container {
  425. margin-bottom: 20px;
  426. margin-right: 20px;
  427. .main-fab {
  428. --background: linear-gradient(to right, #3a7bd5, #00d2ff);
  429. --background-activated: linear-gradient(to right, #2a5ba5, #00b2e0);
  430. --border-radius: 16px;
  431. width: 60px;
  432. height: 60px;
  433. box-shadow: 0 6px 20px rgba(58, 123, 213, 0.4);
  434. .fab-icon {
  435. font-size: 1.8rem;
  436. }
  437. }
  438. }
  439. /* 不同难度等级的颜色 */
  440. .plan-item .difficulty-badge {
  441. &.beginner-badge {
  442. --background: #27ae60;
  443. --color: white;
  444. }
  445. &.intermediate-badge {
  446. --background: #f39c12;
  447. --color: white;
  448. }
  449. &.advanced-badge {
  450. --background: #e74c3c;
  451. --color: white;
  452. }
  453. }
  454. /* 删除按钮样式 */
  455. .delete-btn {
  456. --padding-start: 8px;
  457. --padding-end: 8px;
  458. .delete-icon {
  459. font-size: 1.25rem;
  460. transition: all 0.3s ease;
  461. color: #666;
  462. }
  463. &:hover {
  464. .delete-icon {
  465. color: #e74c3c;
  466. transform: scale(1.1);
  467. }
  468. }
  469. &:active {
  470. .delete-icon {
  471. transform: scale(0.9);
  472. }
  473. }
  474. }
  475. /* 确认删除弹窗样式 */
  476. .delete-confirm-alert {
  477. --backdrop-opacity: 0.7;
  478. .alert-wrapper {
  479. border-radius: 16px;
  480. background: linear-gradient(to bottom, #fff, #f8f9fa);
  481. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  482. border: 1px solid #e0e0e0;
  483. overflow: hidden;
  484. }
  485. .alert-head {
  486. background: linear-gradient(to right, #e74c3c, #c0392b);
  487. color: white;
  488. padding: 15px 16px;
  489. .alert-title {
  490. font-size: 1.3rem;
  491. font-weight: 600;
  492. }
  493. }
  494. .alert-message {
  495. padding: 20px 16px;
  496. color: #444;
  497. font-size: 1rem;
  498. line-height: 1.5;
  499. }
  500. .alert-button-group {
  501. padding: 10px 16px 16px;
  502. flex-direction: row-reverse;
  503. justify-content: flex-start;
  504. button:last-child {
  505. margin-right: 10px;
  506. }
  507. }
  508. .cancel-btn {
  509. --background: #f1f2f6;
  510. --background-hover: #e0e0e0;
  511. --color: #444;
  512. --background-activated: #e0e0e0;
  513. border-radius: 50px;
  514. padding: 12px 20px;
  515. margin: 0;
  516. }
  517. .delete-btn {
  518. --background: linear-gradient(to right, #e74c3c, #c0392b);
  519. --background-activated: rgba(231, 76, 60, 0.9);
  520. --color: white;
  521. border-radius: 50px;
  522. padding: 12px 20px;
  523. margin: 0;
  524. box-shadow: 0 3px 8px rgba(192, 57, 43, 0.3);
  525. }
  526. }
  527. /* 删除加载中提示 */
  528. .deleting-alert {
  529. .alert-wrapper {
  530. background: transparent;
  531. box-shadow: none;
  532. }
  533. .alert-message {
  534. color: white;
  535. text-align: center;
  536. font-size: 1.1rem;
  537. background: rgba(231, 76, 60, 0.8);
  538. border-radius: 50px;
  539. padding: 15px 20px;
  540. }
  541. }
  542. /* 删除成功提示 */
  543. .delete-success-toast {
  544. --backdrop-opacity: 0;
  545. .alert-wrapper {
  546. background: linear-gradient(to right, #27ae60, #2ecc71);
  547. color: white;
  548. border-radius: 50px;
  549. padding: 12px 24px;
  550. max-width: 300px;
  551. box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
  552. }
  553. .alert-message {
  554. font-size: 1.1rem;
  555. font-weight: 500;
  556. }
  557. }
  558. /* 删除成功提示 */
  559. .delete-success-toast {
  560. --background: linear-gradient(to right, #27ae60, #2ecc71);
  561. --color: white;
  562. --border-radius: 50px;
  563. --box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
  564. --height: auto;
  565. padding: 12px 24px;
  566. font-weight: 500;
  567. }
  568. /* 删除错误提示 */
  569. .delete-error-alert {
  570. .alert-wrapper {
  571. border-radius: 16px;
  572. background: white;
  573. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  574. overflow: hidden;
  575. }
  576. .alert-head {
  577. background: linear-gradient(to right, #e74c3c, #c0392b);
  578. color: white;
  579. padding: 15px 16px;
  580. .alert-title {
  581. font-size: 1.3rem;
  582. font-weight: 600;
  583. }
  584. }
  585. .alert-message {
  586. padding: 20px 16px;
  587. color: #444;
  588. font-size: 1rem;
  589. line-height: 1.5;
  590. }
  591. }