From 75ce64b46ea67ecd45d932a39443150dd8217bb2 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev Date: Tue, 27 Jan 2026 09:14:20 +0700 Subject: [PATCH] Fix hero animation: object-fit cover + conditional blur + glass on collapse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - HeroBackground.vue: - Add object-cover class to Lottie animation (fills container) - Make dark overlay conditional (v-if collapseProgress > 0.5) - Overlay fades in during collapse (opacity 0→1) - MainNavigation.vue: - Replace glassStyle prop with isCollapsed - Glass effect (backdrop-blur-md) applies only when collapsed - topnav.vue: - Pass isCollapsed instead of glass-style - Home page: isCollapsed from useHeroScroll - Other pages: always true (always collapsed) Result: - Animation covers full viewport without crop - No blur overlay when hero is expanded - Glass effect appears only when header collapses to 100px --- app/components/hero/HeroBackground.vue | 10 ++++--- app/components/navigation/MainNavigation.vue | 28 ++++++++++---------- app/layouts/topnav.vue | 2 +- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/app/components/hero/HeroBackground.vue b/app/components/hero/HeroBackground.vue index a6adfef..5cffb66 100644 --- a/app/components/hero/HeroBackground.vue +++ b/app/components/hero/HeroBackground.vue @@ -6,7 +6,7 @@ src="/animations/supply-chain.lottie" autoplay loop - class="absolute inset-0 w-full h-full" + class="absolute inset-0 w-full h-full object-cover" :style="{ opacity: 1 - collapseProgress * 0.7, transform: `scale(${1 + collapseProgress * 0.1})` @@ -14,8 +14,12 @@ /> - -
+ +
diff --git a/app/components/navigation/MainNavigation.vue b/app/components/navigation/MainNavigation.vue index 177ca5f..d9cd90e 100644 --- a/app/components/navigation/MainNavigation.vue +++ b/app/components/navigation/MainNavigation.vue @@ -1,7 +1,7 @@