fix: keep header fixed to viewport on landing

This commit is contained in:
Ruslan Bakiev
2026-03-12 17:32:48 +07:00
parent 5a8ef3bea9
commit 10b72a19e4

View File

@@ -87,9 +87,9 @@ const switchLocalePath = useSwitchLocalePath()
const isChatOpen = useState('ai-chat-open', () => false) const isChatOpen = useState('ai-chat-open', () => false)
const chatWidth = computed(() => (isChatOpen.value ? 'clamp(240px, 15vw, 360px)' : '0px')) const chatWidth = computed(() => (isChatOpen.value ? 'clamp(240px, 15vw, 360px)' : '0px'))
const contentStyle = computed(() => ({ const contentStyle = computed(() => ({
transform: isChatOpen.value ? `translateX(${chatWidth.value})` : 'translateX(0)', marginLeft: isChatOpen.value ? chatWidth.value : '0px',
width: isChatOpen.value ? `calc(100% - ${chatWidth.value})` : '100%', width: isChatOpen.value ? `calc(100% - ${chatWidth.value})` : '100%',
transition: 'transform 250ms ease, width 250ms ease' transition: 'margin-left 250ms ease, width 250ms ease'
})) }))
// Catalog search state // Catalog search state
@@ -222,7 +222,7 @@ const headerContainerStyle = computed(() => {
// Main content padding-top to compensate for fixed header // Main content padding-top to compensate for fixed header
const mainStyle = computed(() => { const mainStyle = computed(() => {
if (isCatalogSection.value) return { paddingTop: '0' } if (isCatalogSection.value) return { paddingTop: '0' }
if (isHomePage.value) return { paddingTop: '100px' } if (isHomePage.value) return { paddingTop: '0' }
if (isClientArea.value) return { paddingTop: '116px' } // Header only, no SubNav if (isClientArea.value) return { paddingTop: '116px' } // Header only, no SubNav
return { paddingTop: '154px' } return { paddingTop: '154px' }
}) })