IntroduceCard.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <script setup lang="ts">
  2. const { locale } = useI18n();
  3. interface IPropData {
  4. title: string,
  5. titleKey: string,
  6. subTextOne: string,
  7. subTextTwo: string,
  8. content: string,
  9. list: { iconName: string, val: string, langKey: string }[],
  10. [key:string]: any
  11. }
  12. defineProps<{
  13. direction: "left" | "right",
  14. data: IPropData,
  15. position: "top" | "center" | "bottom"
  16. }>()
  17. </script>
  18. <template>
  19. <div :class="['introduce-card', 'direction-' + direction, position, locale ]">
  20. <div class="title-wrap">
  21. <h3 class="title">{{$t(data.titleKey)}}</h3>
  22. <p class="sub-title">{{$t(data.subTextOneLangKey || '')}}</p>
  23. <p class="sub-title">{{$t(data.subTextTwoLangKey || '')}}</p>
  24. </div>
  25. <!-- :data-aos='"slide-" + direction' -->
  26. <div class="content-wrap">
  27. <div class="column-area">
  28. <div class="img-card" data-aos="fade-up">
  29. <img :src="data.floatUrl" alt="">
  30. </div>
  31. <div class="desc-card">
  32. <p class="desc-text">{{ $t(data.contentKey) }}</p>
  33. <div class="line"></div>
  34. <ul class="desc-list">
  35. <li :class="
  36. ['desc-item']
  37. " v-for="(item, index) in data.list" :key="index">
  38. <BaseIcon :name="item.iconName" width="22" height="22" />
  39. <span class="text">{{$t(item.langKey)}}</span>
  40. </li>
  41. </ul>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </template>
  47. <style scoped lang="scss">
  48. .introduce-card {
  49. &:not(:last-child) {
  50. padding-bottom: 87px;
  51. }
  52. .title-wrap {
  53. max-width: 1080px;
  54. margin: 0 auto;
  55. .title {
  56. display: inline-block;
  57. padding-bottom: 24px;
  58. font-size: 36px;
  59. font-weight: bold;
  60. line-height: 44px;
  61. color: $t-color-primary;
  62. }
  63. .sub-title {
  64. font-size: 16px;
  65. line-height: 28px;
  66. color: $t-color-sub-text;
  67. }
  68. }
  69. .content-wrap {
  70. position: relative;
  71. display: flex;
  72. justify-content: flex-start;
  73. margin-top: 53px;
  74. background-size: 50% 100%;
  75. font-size: 18px;
  76. line-height: 30px;
  77. text-align: justify;
  78. color: #fff;
  79. .column-area {
  80. position: relative;
  81. width: 1080px;
  82. margin: 0 auto;
  83. border-radius: 8px 0px 0px 8px;
  84. }
  85. .img-card {
  86. position: absolute;
  87. }
  88. .desc-card {
  89. display: flex;
  90. flex-flow: column;
  91. align-items: flex-start;
  92. justify-content: center;
  93. width: 50%;
  94. height: 388px;
  95. padding: 0px 50px;
  96. .desc-list {
  97. display: grid;
  98. grid-gap: 16px;
  99. grid-template-columns: repeat(2, minmax(84px, 1fr));
  100. .desc-item {
  101. @include flex(x, center, start);
  102. .text {
  103. padding-left: 8px;
  104. }
  105. }
  106. }
  107. }
  108. .right {
  109. flex: 1;
  110. background: red
  111. }
  112. .line {
  113. width: 64px;
  114. height: 12px;
  115. margin: 24px 0 18px 0;
  116. background: linear-gradient(90deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
  117. }
  118. }
  119. }
  120. .top {
  121. .content-wrap {
  122. background: url("https://static.fuxicarbon.com/newsequoialibra/images/bg-home-fetaure-01.png") right 50% no-repeat;
  123. background-size: 50% 100%;
  124. .desc-card {
  125. background: linear-gradient(121.87deg, #315BFF 16.41%, #3996FF 88.25%);
  126. }
  127. .img-card {
  128. bottom: 0;
  129. left: 42%;
  130. width: 628px;
  131. }
  132. }
  133. }
  134. .center {
  135. .content-wrap {
  136. background: url("https://static.fuxicarbon.com/newsequoialibra/images/bg-home-fetaure-02.png") left 50% no-repeat;
  137. background-size: 50% 100%;
  138. .desc-card {
  139. background: linear-gradient(215deg, #25D4FA 16.41%, #2C96F9 88.25%);
  140. }
  141. .img-card {
  142. bottom: 0%;
  143. left: 17%;
  144. width: 400px;
  145. }
  146. }
  147. }
  148. .bottom {
  149. .content-wrap {
  150. background: url("https://static.fuxicarbon.com/newsequoialibra/images/bg-home-fetaure-03.png") right 50% no-repeat;
  151. background-size: 50% 100%;
  152. .desc-card {
  153. background: linear-gradient(121.87deg, #9DED98 16.41%, #43C1D2 88.25%);
  154. }
  155. .img-card {
  156. bottom: 0%;
  157. left: 47%;
  158. width: 492px;
  159. }
  160. }
  161. }
  162. .direction-left {
  163. .content-wrap {
  164. .desc-card {
  165. border-top-left-radius: 8px;
  166. border-bottom-left-radius: 8px;
  167. overflow: hidden;
  168. }
  169. }
  170. }
  171. .direction-right {
  172. .title-wrap {
  173. text-align: right;
  174. }
  175. .content-wrap {
  176. .column-area {
  177. display: flex;
  178. justify-content: flex-end;
  179. }
  180. .desc-card {
  181. border-top-right-radius: 8px;
  182. border-bottom-right-radius: 8px;
  183. }
  184. }
  185. }
  186. .en {
  187. .content-wrap {
  188. .desc-card {
  189. justify-content: center;
  190. padding: 20px;
  191. font-size: 16px;
  192. .desc-text {
  193. text-align: start;
  194. line-height: 22px;
  195. }
  196. .desc-list {
  197. font-size: 12px;
  198. }
  199. }
  200. }
  201. &.direction-right {
  202. .content-wrap {
  203. .desc-card {
  204. padding-left: 50px;
  205. }
  206. }
  207. }
  208. }
  209. @media screen and (max-width: 768px) {
  210. .direction-left, .direction-right {
  211. .title-wrap {
  212. padding: 10px;
  213. text-align: center;
  214. }
  215. .content-wrap {
  216. font-size: 16px;
  217. .column-area {
  218. width: 100%;
  219. .img-card {
  220. display: none;
  221. }
  222. .desc-card {
  223. width: 100%;
  224. height: auto;
  225. padding: 14px;
  226. .desc-list {
  227. .desc-item {
  228. font-size: 14px;
  229. }
  230. }
  231. }
  232. }
  233. }
  234. }
  235. }
  236. </style>