PlansSection.vue 3.3 KB

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