PlansSection.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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. position: relative;
  35. z-index: 2;
  36. }
  37. .mb-plans-list {
  38. display: flex;
  39. flex-direction: column;
  40. gap: 14px;
  41. }
  42. .mb-plan-card {
  43. border-radius: 20px;
  44. border: 2px solid #9579FF;
  45. background: #1F1543;
  46. backdrop-filter: blur(20px);
  47. padding: 12px;
  48. box-sizing: border-box;
  49. }
  50. .card-head {
  51. display: flex;
  52. align-items: center;
  53. gap: 10px;
  54. }
  55. .head-text {
  56. display: flex;
  57. align-items: center;
  58. gap: 6px;
  59. }
  60. .plan-name {
  61. color: #FFF;
  62. font-size: 20px;
  63. font-weight: 700;
  64. line-height: 20px;
  65. }
  66. .plan-desc {
  67. color: #FFF;
  68. font-size: 12px;
  69. font-weight: 400;
  70. line-height: 12px;
  71. white-space: nowrap;
  72. overflow: hidden;
  73. text-overflow: ellipsis;
  74. }
  75. .price-row {
  76. margin-top: 12px;
  77. display: flex;
  78. align-items: center;
  79. justify-content: center;
  80. gap: 12px;
  81. }
  82. .price {
  83. font-size: 36px;
  84. font-weight: 700;
  85. line-height: 40px;
  86. color: #ffffff;
  87. letter-spacing: -0.5px;
  88. white-space: nowrap;
  89. }
  90. .price-meta {
  91. display: flex;
  92. align-items: center;
  93. gap: 10px;
  94. min-width: 0;
  95. }
  96. .old-price {
  97. font-size: 12px;
  98. font-weight: 500;
  99. line-height: 12px;
  100. color: rgba(255, 255, 255, 0.45);
  101. white-space: nowrap;
  102. }
  103. .save-badge {
  104. display: inline-flex;
  105. align-items: center;
  106. justify-content: center;
  107. height: 22px;
  108. padding: 0 10px;
  109. border-radius: 999px;
  110. background: #7d46ff;
  111. color: #ffffff;
  112. font-size: 12px;
  113. font-weight: 500;
  114. line-height: 12px;
  115. white-space: nowrap;
  116. }
  117. .divider {
  118. height: 1px;
  119. width: 100%;
  120. background: rgba(204, 213, 234, 0.50);
  121. margin: 12px 0 14px;
  122. }
  123. .features {
  124. margin: 0;
  125. padding: 0;
  126. list-style: none;
  127. display: grid;
  128. grid-template-columns: repeat(2, minmax(0, 1fr));
  129. column-gap: 14px;
  130. row-gap: 10px;
  131. }
  132. .feature-item {
  133. position: relative;
  134. padding-left: 20px;
  135. font-size: 12px;
  136. font-weight: 400;
  137. line-height: 16px;
  138. color: rgba(255, 255, 255, 0.65);
  139. white-space: nowrap;
  140. overflow: hidden;
  141. text-overflow: ellipsis;
  142. &::before {
  143. content: '';
  144. position: absolute;
  145. left: 0;
  146. top: 50%;
  147. transform: translateY(-50%);
  148. width: 14px;
  149. height: 14px;
  150. border-radius: 50%;
  151. background: rgba(163, 157, 255, 1);
  152. }
  153. &::after {
  154. content: '✓';
  155. position: absolute;
  156. left: 4px;
  157. top: 50%;
  158. transform: translateY(-50%);
  159. color: #ffffff;
  160. font-size: 9px;
  161. font-weight: 700;
  162. line-height: 1;
  163. }
  164. }
  165. </style>