init
All checks were successful
Deploy / build (push) Successful in 52s

This commit is contained in:
alsaze
2025-12-09 00:09:09 +03:00
parent 38becd5e9b
commit 1a8d15e547
72 changed files with 640 additions and 92 deletions

View File

@@ -36,6 +36,12 @@
</div>
</template>
<script setup lang="ts">
useHead({
title: 'Rental - консьерж-сервис',
})
</script>
<style lang="scss">
.index-page {
display: flex;

View File

@@ -88,6 +88,10 @@ const services = [
const { cartByCategory } = useMock()
const previewItems = computed(() => cartByCategory('nedvizhimost'))
useHead({
title: 'Rental - недвижимость',
})
</script>
<style lang="scss">

View File

@@ -30,7 +30,11 @@
<MapView v-if="cart?.coordinates" :marker="marker" />
<MainCarusel title="Похожие варианты" :preview-items="previewItems" />
<Contacts />
<BaseFooter />
</div>
</template>
</UDrawer>
@@ -43,13 +47,37 @@
<Gallery :preview-image="cart?.previewImage" :images="cart?.images" />
<div>
Описание:
<p class="whitespace-pre-line" v-html="cart?.description" />
<div ref="descriptionRef" class="post-page__description">
<div>
Описание:
<p class="whitespace-pre-line" v-html="cart?.description" />
</div>
<UCard
variant="subtle"
class="post-page__action"
title="Action"
>
<div>
Хотите узнать больше или оформить бронирование?<br>
Напишите нам мы с удовольствием подскажем всё, что нужно.
</div>
<template #footer>
<UButton
class="w-full flex justify-center"
href="#contacts"
size="xl"
label="Свяжитесь с нами"
/>
</template>
</UCard>
</div>
<MapView v-if="cart?.coordinates" :marker="marker" />
<MainCarusel title="Похожие варианты" :preview-items="previewItems" />
<Contacts />
</div>
</UContainer>
@@ -62,6 +90,7 @@ import { computed, shallowRef } from 'vue'
import Gallery from '~/components/Gallery.vue'
const open = ref(false)
const descriptionRef = shallowRef<HTMLElement | null>(null)
const target = shallowRef<HTMLElement | null>(null)
const targetHeight = computed(() => target.value?.offsetHeight)
const targetDrawer = shallowRef<HTMLElement | null>(null)
@@ -69,14 +98,17 @@ const targetDrawerHeight = computed(() => targetDrawer.value?.offsetHeight)
const { y } = useScroll(targetDrawer)
const isMobile = useMediaQuery('(max-width: 1024px)')
const route = useRoute()
const showContactBar = useState('showContactBar')
const { cartById } = useMock()
const { cartById, cartByCategory } = useMock()
const cart = cartById(route.params.id)
const marker = computed(() => ({
coordinates: cart?.coordinates ?? [0, 0],
subtitle: cart?.address,
}))
const previewItems = computed(() => cartByCategory(cart?.category))
const { lengthY } = useSwipe(
target,
{
@@ -106,16 +138,39 @@ definePageMeta({
})
onMounted(() => {
const el = descriptionRef.value
if (!el)
return
const observer = new IntersectionObserver(
(entries) => {
const entry = entries[0]
showContactBar.value = !entry.isIntersecting
},
{
threshold: 0.1,
},
)
observer.observe(el)
if (isMobile.value) {
document.body.style.overflow = 'hidden'
}
})
onUnmounted(() => {
showContactBar.value = false
if (isMobile.value) {
document.body.style.overflow = ''
}
})
useHead({
title: `Rental - ${cart?.title}`,
})
</script>
<style lang="scss">
@@ -159,5 +214,22 @@ onUnmounted(() => {
gap: 16px;
}
}
&__description {
flex-shrink: 1;
position: relative;
display: flex;
flex-direction: row;
gap: 20px;
justify-content: space-between;
}
&__action {
height: fit-content;
flex-shrink: 0;
position: sticky;
top: calc(64px + 26px);
width: 300px;
}
}
</style>

View File

@@ -84,6 +84,10 @@ const services = [
const { cartByCategory } = useMock()
const previewItems = computed(() => cartByCategory('transport'))
useHead({
title: 'Rental - автомобили',
})
</script>
<style lang="scss">