fix: make home hero static and keep capsule scroll motion

This commit is contained in:
Ruslan Bakiev
2026-03-12 16:05:27 +07:00
parent 3380e407f3
commit fcc22b4051
3 changed files with 12 additions and 45 deletions

View File

@@ -1,34 +1,6 @@
<template>
<div class="absolute inset-0 overflow-hidden bg-slate-900">
<!-- Lottie animation -->
<ClientOnly>
<DotLottieVue
src="/animations/supply-chain.lottie"
autoplay
loop
:layout="{ fit: 'cover', align: [0.5, 0.5] }"
class="absolute top-0 left-0 w-full"
:style="{
height: '100vh',
opacity: 1 - collapseProgress * 0.7,
transform: `scale(${1 + collapseProgress * 0.1})`
}"
/>
</ClientOnly>
<!-- Overlay for text readability - only when hero starts collapsing -->
<div
v-if="collapseProgress > 0.5"
class="absolute inset-0 bg-gradient-to-b from-slate-900/60 via-slate-900/40 to-slate-900/70"
:style="{ opacity: (collapseProgress - 0.5) * 2 }"
/>
<div class="absolute inset-0 overflow-hidden bg-[#0a1533]">
<div class="absolute inset-0 bg-[radial-gradient(70%_50%_at_50%_0%,rgba(36,99,235,0.35),rgba(10,21,51,0)_70%)]" />
<div class="absolute inset-0 bg-gradient-to-b from-[#0d214f] via-[#0b1b45] to-[#091634]" />
</div>
</template>
<script setup lang="ts">
import { DotLottieVue } from '@lottiefiles/dotlottie-vue'
defineProps<{
collapseProgress: number
}>()
</script>