Compare commits

..

2 Commits

Author SHA1 Message Date
kudinDmitriyUp
dd32fdd16f feat: replace hero carousel with hero scroll 2026-05-07 18:55:49 +00:00
4d17db4411 Merge version_12_1778179386501 into main
Merge version_12_1778179386501 into main
2026-05-07 18:47:12 +00:00
2 changed files with 67 additions and 83 deletions

View File

@@ -1,79 +1,82 @@
import { useRef } from "react"; import { ArrowDown } from 'lucide-react';
import { useScroll, useTransform, motion } from "motion/react";
import Button from "@/components/ui/Button";
import HeroBackgroundSlot from "@/components/ui/HeroBackgroundSlot";
import TextAnimation from "@/components/ui/TextAnimation";
import ImageOrVideo from "@/components/ui/ImageOrVideo";
type HeroBillboardScrollProps = { import { cn } from '@/lib/utils';
tag: string; import { Button } from '@/components/ui/button';
title: string;
description: string;
primaryButton: { text: string; href: string };
secondaryButton: { text: string; href: string };
} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never });
const HeroBillboardScroll = ({ const HeroBillboardScroll = ({
className,
tag, tag,
title, title,
description, description,
primaryButton, primaryButton,
secondaryButton, secondaryButton,
imageSrc, imageSrc,
videoSrc, }: {
}: HeroBillboardScrollProps) => { className?: string;
const containerRef = useRef<HTMLDivElement>(null); tag?: string;
const { scrollYProgress } = useScroll({ target: containerRef }); title?: string;
description?: string;
const rotate = useTransform(scrollYProgress, [0, 1], [20, 0]); primaryButton?: {
const scale = useTransform(scrollYProgress, [0, 1], [1.05, 1]); text: string;
href: string;
};
secondaryButton?: {
text: string;
href: string;
};
imageSrc?: string;
}) => {
return ( return (
<section aria-label="Hero section" className="relative mb-20">
<HeroBackgroundSlot />
<div <div
ref={containerRef} className={cn(
className="pt-25 pb-20 md:py-30 perspective-distant" 'relative flex h-svh w-full flex-col items-center justify-center overflow-hidden',
className,
)}
> >
<div className="w-content-width mx-auto"> <div
<div className="flex flex-col items-center gap-2 text-center"> className="absolute inset-0 z-0"
<span className="px-3 py-1 mb-1 text-sm card rounded">{tag}</span> style={{
backgroundImage: `url(${imageSrc})`,
<TextAnimation backgroundPosition: 'bottom',
text={title} backgroundSize: 'cover',
variant="fade" }}
gradientText={true}
tag="h1"
className="text-6xl font-medium text-balance"
/> />
<div className="absolute inset-0 z-10 bg-gradient-to-t from-black/80 to-transparent" />
<TextAnimation <div
text={description} className="z-20 flex flex-col items-center justify-center gap-4 p-5 text-center text-white"
variant="fade"
gradientText={false}
tag="p"
className="text-base md:text-lg leading-tight text-balance"
/>
<div className="flex flex-wrap justify-center gap-3 mt-3">
<Button text={primaryButton.text} href={primaryButton.href} variant="primary"/>
<Button text={secondaryButton.text} href={secondaryButton.href} variant="secondary"animationDelay={0.1} />
</div>
</div>
</div>
<div className="w-content-width mx-auto mt-8 p-3 card rounded overflow-hidden rotate-x-20 md:hidden">
<ImageOrVideo imageSrc={imageSrc} videoSrc={videoSrc} className="aspect-4/5" />
</div>
<motion.div
style={{ rotateX: rotate, scale }}
className="w-content-width mx-auto mt-5 2xl:mt-2 p-3 xl:p-4 2xl:p-5 card rounded overflow-hidden hidden md:block"
> >
<ImageOrVideo imageSrc={imageSrc} videoSrc={videoSrc} className="aspect-video" /> {tag && (
</motion.div> <div className="inline-block rounded-theme-full bg-white/10 px-3 py-1 text-sm">
{tag}
</div>
)}
{title && (
<h1 className="text-4xl font-bold md:text-6xl">
{title}
</h1>
)}
{description && (
<p className="max-w-prose text-lg text-white/80">{description}</p>
)}
<div className="mt-4 flex gap-2">
{primaryButton && (
<Button as="a" href={primaryButton.href}>
{primaryButton.text}
</Button>
)}
{secondaryButton && (
<Button as="a" href={secondaryButton.href} variant="secondary">
{secondaryButton.text}
</Button>
)}
</div>
</div>
<div
className="absolute bottom-5 z-20"
>
<ArrowDown className="animate-bounce text-white" />
</div>
</div> </div>
</section>
); );
}; };

View File

@@ -1,7 +1,7 @@
import ContactCta from '@/components/sections/contact/ContactCta'; import ContactCta from '@/components/sections/contact/ContactCta';
import FaqSplitMedia from '@/components/sections/faq/FaqSplitMedia'; import FaqSplitMedia from '@/components/sections/faq/FaqSplitMedia';
import FeaturesMediaCarousel from '@/components/sections/features/FeaturesMediaCarousel'; import FeaturesMediaCarousel from '@/components/sections/features/FeaturesMediaCarousel';
import HeroBillboardCarousel from '@/components/sections/hero/HeroBillboardCarousel'; import HeroBillboardScroll from '@/components/sections/hero/HeroBillboardScroll';
import MetricsSimpleCards from '@/components/sections/metrics/MetricsSimpleCards'; import MetricsSimpleCards from '@/components/sections/metrics/MetricsSimpleCards';
import PricingMediaCards from '@/components/sections/pricing/PricingMediaCards'; import PricingMediaCards from '@/components/sections/pricing/PricingMediaCards';
import ProductVariantCards from '@/components/sections/product/ProductVariantCards'; import ProductVariantCards from '@/components/sections/product/ProductVariantCards';
@@ -12,7 +12,7 @@ export default function HomePage() {
return ( return (
<> <>
<div id="home" data-section="home"> <div id="home" data-section="home">
<HeroBillboardCarousel <HeroBillboardScroll
tag="Fintech SaaS" tag="Fintech SaaS"
title="Unlock the Future of Financial Management" title="Unlock the Future of Financial Management"
description="Finflow provides cutting-edge solutions for businesses to streamline operations, enhance security, and drive growth in the digital economy." description="Finflow provides cutting-edge solutions for businesses to streamline operations, enhance security, and drive growth in the digital economy."
@@ -24,26 +24,7 @@ export default function HomePage() {
text: "Request a Demo", text: "Request a Demo",
href: "#contact", href: "#contact",
}} }}
items={[ imageSrc="https://storage.googleapis.com/webild/users/user_3AJoeL1kj3KAGCFdKZaVyRTrBRV/a-futuristic-dark-themed-financial-dashb-1778165802560-ef94d27a.png"
{
imageSrc: "https://storage.googleapis.com/webild/users/user_3AJoeL1kj3KAGCFdKZaVyRTrBRV/a-futuristic-dark-themed-financial-dashb-1778165802560-ef94d27a.png",
},
{
imageSrc: "https://storage.googleapis.com/webild/users/user_3AJoeL1kj3KAGCFdKZaVyRTrBRV/another-view-of-a-sleek-dark-fintech-das-1778165802942-0ef804ae.png",
},
{
imageSrc: "https://storage.googleapis.com/webild/users/user_3AJoeL1kj3KAGCFdKZaVyRTrBRV/an-abstract-representation-of-complex-fi-1778165803491-13ee1608.png?_wi=1",
},
{
imageSrc: "https://storage.googleapis.com/webild/users/user_3AJoeL1kj3KAGCFdKZaVyRTrBRV/a-visual-metaphor-for-advanced-financial-1778165802292-f7d22bff.png?_wi=1",
},
{
imageSrc: "https://storage.googleapis.com/webild/users/user_3AJoeL1kj3KAGCFdKZaVyRTrBRV/an-illustration-of-financial-process-aut-1778165804096-d3ea01b2.png?_wi=1",
},
{
imageSrc: "https://storage.googleapis.com/webild/users/user_3AJoeL1kj3KAGCFdKZaVyRTrBRV/a-visual-concept-for-regulatory-complian-1778165802615-1e994baa.png?_wi=1",
},
]}
/> />
</div> </div>