fix: make home hero static and keep capsule scroll motion
This commit is contained in:
@@ -10,14 +10,14 @@
|
||||
<!-- Fixed Header Container -->
|
||||
<div class="header-glass fixed inset-x-0 top-0 z-50 border-0" :style="headerContainerStyle">
|
||||
<div class="header-glass-backdrop" aria-hidden="true" />
|
||||
<!-- Animated background for home page -->
|
||||
<HeroBackground v-if="isHomePage" :collapse-progress="collapseProgress" />
|
||||
<!-- Static hero background for home page -->
|
||||
<HeroBackground v-if="isHomePage" />
|
||||
|
||||
<!-- MainNavigation - dynamic height on home page -->
|
||||
<!-- MainNavigation -->
|
||||
<MainNavigation
|
||||
class="relative z-10"
|
||||
:height="isHomePage ? heroHeight : 100"
|
||||
:collapse-progress="isHomePage ? collapseProgress : 1"
|
||||
:height="isHomePage ? heroBaseHeight : 100"
|
||||
:collapse-progress="isHomePage ? 0 : 1"
|
||||
:hero-scroll-y="isHomePage ? heroScrollY : 0"
|
||||
:hero-base-height="isHomePage ? heroBaseHeight : 0"
|
||||
:session-checked="sessionChecked"
|
||||
@@ -41,7 +41,7 @@
|
||||
:can-search="canSearch"
|
||||
:show-mode-toggle="true"
|
||||
:show-active-mode="isCatalogSection"
|
||||
:is-collapsed="isHomePage ? heroIsCollapsed : (isCatalogSection || isClientArea)"
|
||||
:is-collapsed="isHomePage ? false : (isCatalogSection || isClientArea)"
|
||||
:is-home-page="isHomePage"
|
||||
:is-client-area="isClientArea"
|
||||
:chat-open="isChatOpen"
|
||||
@@ -61,10 +61,9 @@
|
||||
@search="onSearch"
|
||||
>
|
||||
<!-- Hero content for home page -->
|
||||
<template v-if="isHomePage && collapseProgress < 1" #hero>
|
||||
<template v-if="isHomePage" #hero>
|
||||
<h1
|
||||
class="text-3xl lg:text-5xl font-black tracking-tight text-white mb-4"
|
||||
:style="{ opacity: 1 - collapseProgress }"
|
||||
>
|
||||
{{ $t('hero.tagline', 'Make trade easy') }}
|
||||
</h1>
|
||||
@@ -129,11 +128,7 @@ const { headerOffset, isCollapsed } = useScrollCollapse(100)
|
||||
// Hero scroll for home page
|
||||
const {
|
||||
scrollY: heroScrollY,
|
||||
heroHeight,
|
||||
heroBaseHeight,
|
||||
collapseProgress,
|
||||
isCollapsed: heroIsCollapsed,
|
||||
collapsedHeight
|
||||
} = useHeroScroll()
|
||||
|
||||
// Theme state
|
||||
|
||||
Reference in New Issue
Block a user