TOPVERSE_Official/pages/index.vue

227 lines
9.0 KiB
Vue
Raw Normal View History

2023-04-23 14:19:03 +08:00
<script setup lang="ts">
2023-05-04 17:42:22 +08:00
import { useSectionEight } from '~/config/pages/home/use-section-eight'
2023-05-04 00:47:08 +08:00
import { useSectionFive } from '~/config/pages/home/use-section-five'
import { useSectionFour } from '~/config/pages/home/use-section-four'
2023-05-04 17:42:22 +08:00
import { useSectionNine } from '~/config/pages/home/use-section-nine'
2023-04-27 13:58:47 +08:00
import { useSectionOne } from '~/config/pages/home/use-section-one'
2023-05-04 17:42:22 +08:00
import { useSectionSeven } from '~/config/pages/home/use-section-seven'
2023-05-04 00:47:08 +08:00
import { useSectionSix } from '~/config/pages/home/use-section-six'
2023-04-27 13:58:47 +08:00
import { useSectionThree } from '~/config/pages/home/use-section-three'
import { useSectionTwo } from '~/config/pages/home/use-section-two'
const sectionOne = useSectionOne()
2023-05-19 19:45:34 +08:00
const sectionOneEl = ref(null)
const sectionOneVis = useElementVisibility(sectionOneEl)
2023-04-27 13:58:47 +08:00
const sectionTwo = useSectionTwo()
2023-05-19 19:45:34 +08:00
const sectionTwoEl = ref(null)
const sectionTwoVis = useElementVisibility(sectionTwoEl)
2023-04-27 13:58:47 +08:00
const sectionThree = useSectionThree()
2023-05-19 19:45:34 +08:00
const sectionThreeEl = ref(null)
const sectionThreeVis = useElementVisibility(sectionThreeEl)
2023-05-04 00:47:08 +08:00
const sectionFour = useSectionFour()
const sectionFive = useSectionFive()
const sectionSix = useSectionSix()
2023-05-04 17:42:22 +08:00
const sectionSeven = useSectionSeven()
const sectionEight = useSectionEight()
const sectionNine = useSectionNine()
2023-04-23 14:19:03 +08:00
</script>
<template>
2023-06-01 15:36:34 +08:00
<Carousel class="mb-25" />
2023-04-23 23:14:52 +08:00
<Divider />
2023-04-27 13:58:47 +08:00
<!-- Section One -->
<SectionGradientCard :content="sectionOne.content" :topic="sectionOne.topic" />
2023-04-27 13:58:47 +08:00
<!-- Section Two -->
2023-05-19 19:45:34 +08:00
<Section ref="sectionTwoEl" class="border-b-2 border-dark/40 border-b-solid from-dark/30 bg-gradient-to-t dark:(border-light-50/10 from-light/5)">
2023-05-26 19:53:05 +08:00
<div v-for="(item, i) in sectionTwo.content" :key="i" class="pb-8">
<Typography :title=" $t(item.title) " />
2023-06-09 02:04:28 +08:00
<div class="flex flex-wrap justify-center md:(grid-cols-3 gap-x-5 gap-y-1) lg:gap-x-42 sm:(gap-x-5 gap-y-5)">
2023-05-26 19:53:05 +08:00
<!-- <Typography :title=" $t(item.title) " /> -->
2023-05-25 18:00:00 +08:00
<a
v-for="(img, j) in item.imgs"
:key="j"
2023-06-09 02:04:28 +08:00
class="h-180px w-200px flex justify-center md:h-200px"
2023-05-25 18:00:00 +08:00
:class="[`animated-delay-${j * 100}ms`, {
'animated animated-fade-in-up animated-faster': sectionTwoVis,
}]"
:href="img.href"
:title="$t(img.title)"
>
2023-05-31 20:43:27 +08:00
<!-- <NuxtImg :src="img.img" height="200" fit="cover" loading="lazy"/> -->
2023-06-02 20:04:25 +08:00
<ImageLoading :src="img.img" height="200" width="200" fit="cover" loading="lazy" />
2023-05-25 18:00:00 +08:00
</a>
</div>
2023-04-26 19:45:54 +08:00
</div>
</Section>
2023-04-27 13:58:47 +08:00
<!-- Section Three -->
2023-05-04 17:42:22 +08:00
<Section text-center class="section-three">
<Typography :title=" $t(sectionThree.title) " :topic=" $t(sectionThree.topic) " :description=" $t(sectionThree.description) " />
2023-04-26 19:45:54 +08:00
2023-05-19 19:45:34 +08:00
<div ref="sectionThreeEl">
<div
2024-05-25 14:39:34 +08:00
class="grid py-10 gap-4 md:(grid-cols-2)" :class="`lg:grid-cols-${sectionThree.contentPrimary.length}`"
2023-05-19 19:45:34 +08:00
>
<ImageHover
2023-05-04 00:47:08 +08:00
v-for="(content, i) in sectionThree.contentPrimary"
2023-04-27 13:58:47 +08:00
:key="i"
:href="content.href" :img="content.img" :topic="content.topic"
2023-06-08 10:42:29 +08:00
class="min-h-200px"
2023-05-19 19:45:34 +08:00
:class="[`animated-delay-${i * 100}ms`, {
'animated animated-fade-in-up animated-faster': sectionThreeVis,
}]"
/>
2023-04-26 19:45:54 +08:00
</div>
2024-05-25 14:39:34 +08:00
<div class="grid gap-4 pb-10 md:(grid-cols-2)" :class="`lg:grid-cols-${sectionThree.contentSecondary.length}`">
<ImageHover
2023-04-27 13:58:47 +08:00
v-for="(content, i) in sectionThree.contentSecondary"
:key="i"
:href="content.href" :img="content.img" :topic="content.topic"
2023-06-08 10:42:29 +08:00
class="min-h-200px"
2023-05-19 19:45:34 +08:00
:class="[`animated-delay-${i * 100}ms`, {
'animated animated-fade-in-up animated-faster': sectionThreeVis,
}]"
/>
2023-04-26 19:45:54 +08:00
</div>
2024-05-25 14:39:34 +08:00
<div class="grid gap-4 pb-20 md:(grid-cols-2)" :class="`lg:grid-cols-${sectionThree.contentThird.length}`">
<ImageHover
2023-04-27 13:58:47 +08:00
v-for="(content, i) in sectionThree.contentThird"
:key="i"
:href="content.href" :img="content.img" :topic="content.topic"
2023-06-08 10:42:29 +08:00
class="min-h-200px"
2023-05-19 19:45:34 +08:00
:class="[`animated-delay-${i * 100}ms`, {
'animated animated-fade-in-up': sectionThreeVis,
}]"
/>
2023-04-26 19:45:54 +08:00
</div>
</div>
2023-05-07 16:38:23 +08:00
<LocaleNuxtLink :href="sectionThree.link.href">
2023-05-16 21:18:46 +08:00
<ABtn variant="light">
{{ $t(sectionThree.link.name) }}
</ABtn>
2023-05-07 16:38:23 +08:00
</LocaleNuxtLink>
2023-04-26 19:45:54 +08:00
</Section>
2023-05-04 00:47:08 +08:00
<!-- Section Four -->
<SectionBanner
2023-05-05 17:23:07 +08:00
:img="$t(sectionFour.img)" :topic="$t(sectionFour.topic)" :description="$t(sectionFour.description)" :link="{
href: sectionFour.link.href,
name: $t(sectionFour.link.name),
}" mask="bottom"
/>
2023-05-04 00:47:08 +08:00
<!-- Section Five -->
<Section class="bg-gradient-blue text-white">
<Typography :title=" $t(sectionFive.title) " :topic=" $t(sectionFive.topic) " :description=" $t(sectionFive.description) " class="pb-20 text-start" />
2024-05-25 14:39:34 +08:00
<div class="grid gap-26 pb-10 lg:(grid-cols-3) md:(grid-cols-2)">
2023-04-26 19:45:54 +08:00
<div
2023-05-04 00:47:08 +08:00
v-for="(content, i) in sectionFive.content"
:key="i"
class="w-full"
>
<h4 text-h4 class="break-words text-start font-bold text-white !line-clamp-2">
{{ $t(content.topic) }}
2023-05-04 00:47:08 +08:00
</h4>
2023-05-04 17:42:22 +08:00
<p text-h7 class="break-words text-start !line-clamp-3">
{{ $t(content.description) }}
2023-05-04 00:47:08 +08:00
</p>
</div>
2023-04-26 19:45:54 +08:00
</div>
</Section>
2023-05-04 00:47:08 +08:00
<!-- Section Six -->
2023-04-26 19:45:54 +08:00
<Section>
<Typography :topic=" $t(sectionSix.topic) " :description=" $t(sectionSix.description) " />
2023-04-26 19:45:54 +08:00
2023-05-04 00:47:08 +08:00
<div v-for="(item, i) in sectionSix.content" :key="i" class="flex flex-wrap gap-6 py-10 md:flex-nowrap" :class="{ 'flex-row-reverse': i % 2 === 0 }">
2023-05-04 17:42:22 +08:00
<div class="w-45% flex-grow">
<div class="relative h-full w-full flex items-center justify-center overflow-hidden border-6px border-dark-50/10 rounded-xl dark:border-light-50/10" style="mask-image:linear-gradient(0deg, transparent, #000);-webkit-mask-image:linear-gradient(0deg, transparent, #000 60%);">
2023-06-01 15:36:34 +08:00
<ImageLoading quality="20" :src="item.img" :err-src="item.errImg" class="h-full w-full" fit="cover" height="300" width="600" loading="lazy" />
2023-05-31 20:43:27 +08:00
<!-- <NuxtImg quality="20" :src="item.img" class="h-full w-full" fit="cover" height="300" width="600" loading="lazy"/> -->
2023-04-23 14:19:03 +08:00
</div>
2023-04-26 19:45:54 +08:00
</div>
2023-05-04 17:42:22 +08:00
<div class="w-55% flex-grow">
2023-06-02 20:04:25 +08:00
<div class="h-full w-full flex flex-col items-center justify-center px-2 md:(items-start px-16)">
2023-04-26 19:45:54 +08:00
<p class="text-title">
{{ $t(item.title) }}
2023-04-26 19:45:54 +08:00
</p>
2023-05-04 00:47:08 +08:00
<h4 class="text-h4 font-bold">
{{ $t(item.topic) }}
2023-04-26 19:45:54 +08:00
</h4>
2023-06-01 15:36:34 +08:00
<p class="text-h6 text-center md:text-left">
{{ $t(item.description) }}
2023-04-26 19:45:54 +08:00
</p>
2023-06-01 15:36:34 +08:00
<div v-if="item.link" class="w-full py-10 text-center md:text-left">
2023-05-07 16:38:23 +08:00
<LocaleNuxtLink :href="item.link.href">
2023-05-04 17:42:22 +08:00
<ABtn variant="light" class="group">
{{ $t(item.link.name) }} <div i-solar-arrow-right-linear class="transition-all group-hover:px-4" />
2023-04-26 19:45:54 +08:00
</ABtn>
2023-05-07 16:38:23 +08:00
</LocaleNuxtLink>
2023-04-26 19:45:54 +08:00
</div>
</div>
</div>
</div>
</Section>
2023-05-04 00:47:08 +08:00
<!-- Section Seven -->
<SectionBanner :img="$t(sectionSeven.img)" :title="$t(sectionSeven.title)" :topic="$t(sectionSeven.topic)" mask="bottom" />
2023-05-04 17:42:22 +08:00
<!-- Section Eight -->
2023-04-26 19:45:54 +08:00
<Section>
2024-05-25 14:39:34 +08:00
<div class="grid grid-cols-2 gap-20 pb-20 lg:(grid-cols-4)">
2023-04-26 19:45:54 +08:00
<div
2023-05-04 17:42:22 +08:00
v-for="(content, i) in sectionEight.content"
:key="i"
class="w-full text-center"
2023-05-04 17:42:22 +08:00
>
2023-06-01 15:36:34 +08:00
<div :class="content.icon" mb-5 h-60px w-full />
2023-08-02 15:09:56 +08:00
<h4 text-h4 mb-1 font-bold>
{{ $t(content.title) }}
2023-05-04 17:42:22 +08:00
</h4>
<p text-h7>
{{ $t(content.description) }}
2023-05-04 17:42:22 +08:00
</p>
</div>
2023-04-26 19:45:54 +08:00
</div>
2024-05-25 14:39:34 +08:00
<!-- <div class="grid rounded-lg from-violet-500 to-fuchsia-500 bg-gradient-to-r p-5 text-white shadow-lg lg:(grid-cols-2)">
2023-04-26 19:45:54 +08:00
<ATypography
2023-05-04 17:42:22 +08:00
class="text-white"
2023-04-26 19:45:54 +08:00
title="Awesome mobile"
subtitle="Biscuit liquorice apple pie candy canes"
:text="['Donut jelly beans cake lollipop sweet biscuit. Pie apple pie powder apple pie gummi bears. Jelly apple pie croissant candy canes liquorice halvah.', 'text-sm']"
/>
<div h-full w-full flex flex-col items-center justify-center gap-3>
<div flex items-center gap-3>
<AInput class="col-start-1 w-full text-sm" input-wrapper-classes="bg-light-50" />
<ABtn>test</ABtn>
2023-04-23 14:19:03 +08:00
</div>
2023-04-26 19:45:54 +08:00
<ACheckbox>
<span>I am agreed to terms and conditions</span>
</ACheckbox>
</div>
2023-05-04 17:42:22 +08:00
</div> -->
2023-04-26 19:45:54 +08:00
</Section>
2023-06-01 15:36:34 +08:00
<!-- <Divider /> -->
2023-04-26 19:45:54 +08:00
2023-05-04 17:42:22 +08:00
<!-- Section Nine -->
2023-06-09 02:04:28 +08:00
<Section class="my-10 flex flex-col items-center justify-center bg-gradient-pink md:flex-row">
<Typography :title="$t(sectionNine.title)" :topic=" $t(sectionNine.topic)" :description=" $t(sectionNine.description)" class="pt-5 text-start" />
2023-05-26 19:53:05 +08:00
2023-06-01 15:36:34 +08:00
<ModelContent src="/model/house/Night-City.gltf" :width="300" />
2023-04-26 19:45:54 +08:00
</Section>
2023-06-01 15:36:34 +08:00
<!-- <Divider /> -->
2023-04-23 14:19:03 +08:00
</template>
2023-05-04 17:42:22 +08:00
<style scoped lang="scss">
.section-three{
.mask-img{
--uno:'absolute bottom-0 left-0 z-1 flex h-50px w-full items-center justify-center border-t-2px border-dark-50/10 bg-black/15 p-2 px-10 backdrop-blur-md transition ';
box-shadow: 0 -5px 25px rgba(0,0,0,0.4);
}
}
</style>