123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- <script setup lang="ts">
- const { locale } = useI18n();
- interface IPropData {
- title: string,
- titleKey: string,
- subTextOne: string,
- subTextTwo: string,
- content: string,
- list: { iconName: string, val: string, langKey: string }[],
- [key:string]: any
- }
- defineProps<{
- direction: "left" | "right",
- data: IPropData,
- position: "top" | "center" | "bottom"
- }>()
- </script>
- <template>
- <div :class="['introduce-card', 'direction-' + direction, position, locale ]">
- <div class="title-wrap">
- <h3 class="title">{{$t(data.titleKey)}}</h3>
- <p class="sub-title">{{$t(data.subTextOneLangKey || '')}}</p>
- <p class="sub-title">{{$t(data.subTextTwoLangKey || '')}}</p>
- </div>
- <!-- :data-aos='"slide-" + direction' -->
- <div class="content-wrap">
- <div class="column-area">
- <div class="img-card" data-aos="fade-up">
- <img :src="data.floatUrl" alt="">
- </div>
- <div class="desc-card">
- <p class="desc-text">{{ $t(data.contentKey) }}</p>
- <div class="line"></div>
- <ul class="desc-list">
- <li :class="
- ['desc-item']
- " v-for="(item, index) in data.list" :key="index">
- <BaseIcon :name="item.iconName" width="22" height="22" />
- <span class="text">{{$t(item.langKey)}}</span>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </template>
- <style scoped lang="scss">
- .introduce-card {
- &:not(:last-child) {
- padding-bottom: 87px;
- }
- .title-wrap {
- max-width: 1080px;
- margin: 0 auto;
- .title {
- display: inline-block;
- padding-bottom: 24px;
- font-size: 36px;
- font-weight: bold;
- line-height: 44px;
- color: $t-color-primary;
- }
- .sub-title {
- font-size: 16px;
- line-height: 28px;
- color: $t-color-sub-text;
- }
- }
- .content-wrap {
- position: relative;
- display: flex;
- justify-content: flex-start;
- margin-top: 53px;
- background-size: 50% 100%;
- font-size: 18px;
- line-height: 30px;
- text-align: justify;
- color: #fff;
- .column-area {
- position: relative;
- width: 1080px;
- margin: 0 auto;
- border-radius: 8px 0px 0px 8px;
- }
- .img-card {
- position: absolute;
- }
- .desc-card {
- display: flex;
- flex-flow: column;
- align-items: flex-start;
- justify-content: center;
- width: 50%;
- height: 388px;
- padding: 0px 50px;
- .desc-list {
- display: grid;
- grid-gap: 16px;
- grid-template-columns: repeat(2, minmax(84px, 1fr));
- .desc-item {
- @include flex(x, center, start);
- .text {
- padding-left: 8px;
- }
- }
- }
- }
- .right {
- flex: 1;
- background: red
- }
- .line {
- width: 64px;
- height: 12px;
- margin: 24px 0 18px 0;
- background: linear-gradient(90deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
- }
- }
- }
- .top {
- .content-wrap {
- background: url("https://static.fuxicarbon.com/newsequoialibra/images/bg-home-fetaure-01.png") right 50% no-repeat;
- background-size: 50% 100%;
- .desc-card {
- background: linear-gradient(121.87deg, #315BFF 16.41%, #3996FF 88.25%);
- }
- .img-card {
- bottom: 0;
- left: 42%;
- width: 628px;
- }
- }
- }
- .center {
- .content-wrap {
- background: url("https://static.fuxicarbon.com/newsequoialibra/images/bg-home-fetaure-02.png") left 50% no-repeat;
- background-size: 50% 100%;
- .desc-card {
- background: linear-gradient(215deg, #25D4FA 16.41%, #2C96F9 88.25%);
- }
- .img-card {
- bottom: 0%;
- left: 17%;
- width: 400px;
- }
- }
- }
- .bottom {
- .content-wrap {
- background: url("https://static.fuxicarbon.com/newsequoialibra/images/bg-home-fetaure-03.png") right 50% no-repeat;
- background-size: 50% 100%;
- .desc-card {
- background: linear-gradient(121.87deg, #9DED98 16.41%, #43C1D2 88.25%);
- }
- .img-card {
- bottom: 0%;
- left: 47%;
- width: 492px;
- }
- }
- }
- .direction-left {
- .content-wrap {
- .desc-card {
- border-top-left-radius: 8px;
- border-bottom-left-radius: 8px;
- overflow: hidden;
- }
- }
- }
- .direction-right {
- .title-wrap {
- text-align: right;
- }
- .content-wrap {
- .column-area {
- display: flex;
- justify-content: flex-end;
- }
- .desc-card {
- border-top-right-radius: 8px;
- border-bottom-right-radius: 8px;
- }
- }
- }
- .en {
- .content-wrap {
- .desc-card {
- justify-content: center;
- padding: 20px;
- font-size: 16px;
- .desc-text {
- text-align: start;
- line-height: 22px;
- }
- .desc-list {
- font-size: 12px;
- }
- }
- }
- &.direction-right {
- .content-wrap {
- .desc-card {
- padding-left: 50px;
- }
- }
- }
- }
- @media screen and (max-width: 768px) {
- .direction-left, .direction-right {
- .title-wrap {
- padding: 10px;
- text-align: center;
- }
- .content-wrap {
- font-size: 16px;
- .column-area {
- width: 100%;
- .img-card {
- display: none;
- }
- .desc-card {
- width: 100%;
- height: auto;
- padding: 14px;
- .desc-list {
- .desc-item {
- font-size: 14px;
- }
- }
- }
- }
- }
- }
- }
- </style>
|