diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 9b9754b..2fad68c 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -36,13 +36,12 @@ html { //swiper .swiper { width: 100%; - height: calc(100dvh - 54px); + height: calc(100dvh); } .swiper-slide { text-align: center; font-size: 18px; - background: #444; /* Center slide text vertically */ display: flex; @@ -53,7 +52,7 @@ html { .swiper-slide img { display: block; width: 100%; - height: calc(100dvh - 54px); + height: calc(100dvh); object-fit: cover; } diff --git a/pages/post/Gallery.vue b/components/Gallery.vue similarity index 57% rename from pages/post/Gallery.vue rename to components/Gallery.vue index 76392e4..0dc6a3c 100644 --- a/pages/post/Gallery.vue +++ b/components/Gallery.vue @@ -1,19 +1,35 @@ diff --git a/layouts/default.vue b/layouts/default.vue index ef98f8f..d7adc7b 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -69,15 +69,15 @@ const tabs = computed(() => [ }, ]) -const activeTab = ref(route.path.split('/')[1] || '/') +const activeTab = ref(route?.path.split('/')[1] || '/') watch(() => 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] +watch(() => route?.path, () => { + const routerPath = route?.path?.split('/')[1] if (routerPath === activeTab.value) { return diff --git a/pages/nedvizhimost.vue b/pages/nedvizhimost.vue index 75e738b..ac980e5 100644 --- a/pages/nedvizhimost.vue +++ b/pages/nedvizhimost.vue @@ -86,40 +86,8 @@ const services = [ }, ] -const previewItems = [ - { - id: 13242314, - img: 'https://picsum.photos/468/468?random=1', - }, - { - id: 123321, - img: 'https://picsum.photos/468/468?random=2', - }, - { - id: 7654567, - img: 'https://picsum.photos/468/468?random=3', - }, - { - id: 3203030, - img: 'https://picsum.photos/468/468?random=4', - }, - { - id: 1818822, - img: 'https://picsum.photos/468/468?random=5', - }, - { - id: 12355432, - img: 'https://picsum.photos/468/468?random=6', - }, - { - id: 3495823, - img: 'https://picsum.photos/468/468?random=7', - }, - { - id: 1123, - img: 'https://picsum.photos/468/468?random=8', - }, -] +const { cartByCategory } = useMock() +const previewItems = computed(() => cartByCategory('transport'))