From 7bd5000dc488de0fac63050b893fe1b30fea0801 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Wed, 14 Jan 2026 12:50:57 +0700 Subject: [PATCH] Fix map positioning when search bar is present Use dynamic mapTopClass/mapHeightClass based on searchBar slot: - With searchBar: top-44 (176px), height calc(100vh-12rem) - Without searchBar: top-32 (128px), height calc(100vh-9rem) --- app/components/page/CatalogPage.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/components/page/CatalogPage.vue b/app/components/page/CatalogPage.vue index f72358d..e2d6da6 100644 --- a/app/components/page/CatalogPage.vue +++ b/app/components/page/CatalogPage.vue @@ -213,9 +213,11 @@ const props = withDefaults(defineProps<{ totalCount: 0 }) -// Map positioning - unified height for all pages with map -const mapTopClass = 'top-32' -const mapHeightClass = 'h-[calc(100vh-9rem)]' +// Map positioning - dynamic based on search bar presence +const slots = useSlots() +const hasSearchBar = computed(() => !!slots.searchBar) +const mapTopClass = computed(() => hasSearchBar.value ? 'top-44' : 'top-32') +const mapHeightClass = computed(() => hasSearchBar.value ? 'h-[calc(100vh-12rem)]' : 'h-[calc(100vh-9rem)]') const emit = defineEmits<{ 'select': [item: MapItem]