PlansSection.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <section class="mb-plans">
  3. <div class="mb-plans-list">
  4. <article v-for="plan in plans" :key="plan.name" class="mb-plan-card">
  5. <header class="card-head">
  6. <img width="20" height="20" :src="plan.icon" alt="icon" />
  7. <div class="head-text">
  8. <div class="plan-name">{{ plan.name }}</div>
  9. <div class="plan-desc">{{ plan.desc }}</div>
  10. </div>
  11. </header>
  12. <div class="price-row">
  13. <div class="price">{{ plan.price }}</div>
  14. <div class="price-meta">
  15. <del class="old-price">{{ plan.oldPrice }}</del>
  16. <span class="save-badge">{{ plan.save }}</span>
  17. </div>
  18. </div>
  19. <div class="divider" aria-hidden="true" />
  20. <ul class="features">
  21. <li v-for="(feature, idx) in plan.features" :key="idx" class="feature-item">{{ feature }}</li>
  22. </ul>
  23. </article>
  24. </div>
  25. </section>
  26. </template>
  27. <script setup>
  28. import { plans } from '~/utils/plans'
  29. </script>
  30. <style lang="scss" scoped>
  31. .mb-plans {
  32. width: 100%;
  33. box-sizing: border-box;
  34. }
  35. .mb-plans-list {
  36. display: flex;
  37. flex-direction: column;
  38. gap: 14px;
  39. }
  40. .mb-plan-card {
  41. border-radius: 20px;
  42. border: 1px solid rgba(198, 186, 255, 0.3);
  43. background: linear-gradient(180deg, rgba(165, 101, 255, 0.22) 0%, rgba(3, 0, 20, 0.55) 100%);
  44. backdrop-filter: blur(20px);
  45. padding: 12px;
  46. box-sizing: border-box;
  47. }
  48. .card-head {
  49. display: flex;
  50. align-items: center;
  51. gap: 10px;
  52. }
  53. .head-text {
  54. min-width: 0;
  55. display: flex;
  56. align-items: center;
  57. gap: 6px;
  58. }
  59. .plan-name {
  60. color: #FFF;
  61. font-size: 20px;
  62. font-weight: 700;
  63. line-height: 20px;
  64. }
  65. .plan-desc {
  66. color: #FFF;
  67. font-size: 12px;
  68. font-weight: 400;
  69. line-height: 12px;
  70. white-space: nowrap;
  71. overflow: hidden;
  72. text-overflow: ellipsis;
  73. }
  74. .price-row {
  75. margin-top: 12px;
  76. display: flex;
  77. align-items: flex-end;
  78. justify-content: space-between;
  79. gap: 12px;
  80. }
  81. .price {
  82. font-size: 36px;
  83. font-weight: 700;
  84. line-height: 40px;
  85. color: #ffffff;
  86. letter-spacing: -0.5px;
  87. white-space: nowrap;
  88. }
  89. .price-meta {
  90. display: flex;
  91. align-items: center;
  92. gap: 10px;
  93. min-width: 0;
  94. }
  95. .old-price {
  96. font-size: 12px;
  97. font-weight: 500;
  98. line-height: 12px;
  99. color: rgba(255, 255, 255, 0.45);
  100. white-space: nowrap;
  101. }
  102. .save-badge {
  103. display: inline-flex;
  104. align-items: center;
  105. justify-content: center;
  106. height: 22px;
  107. padding: 0 10px;
  108. border-radius: 999px;
  109. background: #7d46ff;
  110. color: #ffffff;
  111. font-size: 12px;
  112. font-weight: 500;
  113. line-height: 12px;
  114. white-space: nowrap;
  115. }
  116. .divider {
  117. height: 1px;
  118. width: 100%;
  119. background: rgba(198, 186, 255, 0.22);
  120. margin: 12px 0 14px;
  121. }
  122. .features {
  123. margin: 0;
  124. padding: 0;
  125. list-style: none;
  126. display: grid;
  127. grid-template-columns: repeat(2, minmax(0, 1fr));
  128. column-gap: 14px;
  129. row-gap: 10px;
  130. }
  131. .feature-item {
  132. position: relative;
  133. padding-left: 20px;
  134. font-size: 12px;
  135. font-weight: 400;
  136. line-height: 16px;
  137. color: rgba(255, 255, 255, 0.65);
  138. white-space: nowrap;
  139. overflow: hidden;
  140. text-overflow: ellipsis;
  141. &::before {
  142. content: '';
  143. position: absolute;
  144. left: 0;
  145. top: 50%;
  146. transform: translateY(-50%);
  147. width: 14px;
  148. height: 14px;
  149. border-radius: 50%;
  150. background: rgba(163, 157, 255, 1);
  151. }
  152. &::after {
  153. content: '✓';
  154. position: absolute;
  155. left: 4px;
  156. top: 50%;
  157. transform: translateY(-50%);
  158. color: #ffffff;
  159. font-size: 9px;
  160. font-weight: 700;
  161. line-height: 1;
  162. }
  163. }
  164. </style>