This commit is contained in:
parent
ded1c8af22
commit
5f3c4057e7
106
components/HowWorks.vue
Normal file
106
components/HowWorks.vue
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<UPageSection
|
||||||
|
id="how-works"
|
||||||
|
title="Как это работает"
|
||||||
|
description="Простой процесс"
|
||||||
|
:ui="{ container: '!p-0' }"
|
||||||
|
>
|
||||||
|
<template #body>
|
||||||
|
<div class="how-works">
|
||||||
|
<UCard
|
||||||
|
v-for="item in items"
|
||||||
|
:key="item.title"
|
||||||
|
class="how-work"
|
||||||
|
:ui="{ body: 'flex flex-col gap-4 h-[350px] !pb-15' }"
|
||||||
|
>
|
||||||
|
<div class="how-work__number">
|
||||||
|
{{ item.number }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="how-work__icon">
|
||||||
|
{{ item.icon }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="how-work__title">
|
||||||
|
{{ item.title }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="how-work__description">
|
||||||
|
{{ item.description }}
|
||||||
|
</div>
|
||||||
|
</UCard>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</UPageSection>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
const items = [
|
||||||
|
{
|
||||||
|
icon: '💬',
|
||||||
|
number: '01',
|
||||||
|
title: 'Консультация',
|
||||||
|
description: 'Связываетесь с нами и рассказываете о своих требованиях и пожеланиях',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: '🔍',
|
||||||
|
number: '02',
|
||||||
|
title: 'Подбор вариантов',
|
||||||
|
description: 'Мы находим лучшие предложения, соответствующие вашим критериям',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: '📋',
|
||||||
|
number: '03',
|
||||||
|
title: 'Проверка и оформление',
|
||||||
|
description: 'Проводим полную проверку и помогаем с оформлением всех документов',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: '🔑',
|
||||||
|
number: '04',
|
||||||
|
title: 'Получение',
|
||||||
|
description: 'Вы получаете ключи от недвижимости или документы на автомобиль',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.how-works {
|
||||||
|
display: grid;
|
||||||
|
gap: 20px;
|
||||||
|
grid-template-columns: repeat(4, minmax(150px, 350px));
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
@include mobile {
|
||||||
|
gap: 10px;
|
||||||
|
grid-template-columns: repeat(2, minmax(150px, 350px));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.how-work {
|
||||||
|
&__number {
|
||||||
|
font-size: 48px;
|
||||||
|
opacity: 0.1;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__icon {
|
||||||
|
font-size: 24px;
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
background-color: black;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__title {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__description {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -41,9 +41,9 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { TabsItem } from '@nuxt/ui'
|
import type { TabsItem } from '@nuxt/ui'
|
||||||
import useScreen from '~/composables/useScreen'
|
import { useMediaQuery } from '@vueuse/core'
|
||||||
|
|
||||||
const { isMobile } = useScreen()
|
const isMobile = useMediaQuery('(max-width: 1280px)')
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@ -52,7 +52,7 @@ const tabs = computed<TabsItem[]>(() => [
|
|||||||
{
|
{
|
||||||
label: isMobile.value ? '' : 'Главная',
|
label: isMobile.value ? '' : 'Главная',
|
||||||
icon: 'i-lucide-home',
|
icon: 'i-lucide-home',
|
||||||
value: 'index',
|
value: '/',
|
||||||
route: '/',
|
route: '/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -69,10 +69,20 @@ const tabs = computed<TabsItem[]>(() => [
|
|||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
const activeTab = ref(route.path.split('/')[1])
|
const activeTab = ref(route.path.split('/')[1] || '/')
|
||||||
|
|
||||||
watch(() => activeTab.value, () => {
|
watch(() => activeTab.value, () => {
|
||||||
const tab = tabs.value.find(tab => tab.value === activeTab.value)
|
const tab = tabs.value.find(tab => tab.value === activeTab.value)
|
||||||
router.push(tab.route)
|
router.push(tab.route)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(() => route.path, () => {
|
||||||
|
const routerPath = route.path.split('/')[1]
|
||||||
|
|
||||||
|
if (routerPath === activeTab.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
activeTab.value = routerPath
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/content": "^3.7.1",
|
"@nuxt/content": "^3.7.1",
|
||||||
|
"gsap": "3.13",
|
||||||
"@nuxt/fonts": "0.11.4",
|
"@nuxt/fonts": "0.11.4",
|
||||||
"@nuxt/icon": "1.15.0",
|
"@nuxt/icon": "1.15.0",
|
||||||
"@nuxt/image": "1.10.0",
|
"@nuxt/image": "1.10.0",
|
||||||
|
|||||||
@ -11,6 +11,8 @@
|
|||||||
<Services />
|
<Services />
|
||||||
|
|
||||||
<Benefits />
|
<Benefits />
|
||||||
|
|
||||||
|
<HowWorks />
|
||||||
</UContainer>
|
</UContainer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -5244,6 +5244,11 @@ graphemer@^1.4.0:
|
|||||||
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
|
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
|
||||||
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
|
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
|
||||||
|
|
||||||
|
gsap@3.13:
|
||||||
|
version "3.13.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/gsap/-/gsap-3.13.0.tgz#597d4e019a2bb487785387d91296adebf92db9dd"
|
||||||
|
integrity sha512-QL7MJ2WMjm1PHWsoFrAQH/J8wUeqZvMtHO58qdekHpCfhvhSL4gSiz6vJf5EeMP0LOn3ZCprL2ki/gjED8ghVw==
|
||||||
|
|
||||||
gzip-size@^7.0.0:
|
gzip-size@^7.0.0:
|
||||||
version "7.0.0"
|
version "7.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-7.0.0.tgz#9f9644251f15bc78460fccef4055ae5a5562ac60"
|
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-7.0.0.tgz#9f9644251f15bc78460fccef4055ae5a5562ac60"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user