From 835f92f452ceae34164809212013cf8a49617599 Mon Sep 17 00:00:00 2001 From: kudinDmitriyUp Date: Sat, 13 Jun 2026 17:07:59 +0000 Subject: [PATCH] Bob AI: Added scroll-triggered muzzle flash and projectile animation --- src/pages/HomePage.tsx | 279 ++----------------- src/pages/HomePage/sections/Cta.tsx | 27 ++ src/pages/HomePage/sections/Faq.tsx | 34 +++ src/pages/HomePage/sections/Features.tsx | 37 +++ src/pages/HomePage/sections/Hero.tsx | 44 +++ src/pages/HomePage/sections/HowItWorks.tsx | 39 +++ src/pages/HomePage/sections/ScrollFx.tsx | 38 +++ src/pages/HomePage/sections/Showcase.tsx | 64 +++++ src/pages/HomePage/sections/Stats.tsx | 34 +++ src/pages/HomePage/sections/Testimonials.tsx | 52 ++++ 10 files changed, 395 insertions(+), 253 deletions(-) create mode 100644 src/pages/HomePage/sections/Cta.tsx create mode 100644 src/pages/HomePage/sections/Faq.tsx create mode 100644 src/pages/HomePage/sections/Features.tsx create mode 100644 src/pages/HomePage/sections/Hero.tsx create mode 100644 src/pages/HomePage/sections/HowItWorks.tsx create mode 100644 src/pages/HomePage/sections/ScrollFx.tsx create mode 100644 src/pages/HomePage/sections/Showcase.tsx create mode 100644 src/pages/HomePage/sections/Stats.tsx create mode 100644 src/pages/HomePage/sections/Testimonials.tsx diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 2e99762..d1c93b3 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -1,265 +1,38 @@ -import AboutFeaturesSplit from '@/components/sections/about/AboutFeaturesSplit'; -import ContactCta from '@/components/sections/contact/ContactCta'; -import FaqSimple from '@/components/sections/faq/FaqSimple'; -import FeaturesRevealCards from '@/components/sections/features/FeaturesRevealCards'; -import FeaturesRevealCardsBento from '@/components/sections/features/FeaturesRevealCardsBento'; -import HeroOverlayMarquee from '@/components/sections/hero/HeroOverlayMarquee'; -import MetricsSimpleCards from '@/components/sections/metrics/MetricsSimpleCards'; -import TestimonialMarqueeCards from '@/components/sections/testimonial/TestimonialMarqueeCards'; -import { ArrowRight, ShieldCheck, Star, Target, UserPlus } from "lucide-react"; -import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; +// AUTO-GENERATED shell by per-section-migrate. +// Section bodies live in .//sections/.tsx. Edit the section +// files directly. Non-block content (wrappers, non-inlinable sections) is +// preserved inline; extracted section blocks become refs. -export default function HomePage() { +import React from 'react'; +import HeroSection from './HomePage/sections/Hero'; +import FeaturesSection from './HomePage/sections/Features'; +import HowItWorksSection from './HomePage/sections/HowItWorks'; +import ShowcaseSection from './HomePage/sections/Showcase'; +import StatsSection from './HomePage/sections/Stats'; +import TestimonialsSection from './HomePage/sections/Testimonials'; +import FaqSection from './HomePage/sections/Faq'; +import CtaSection from './HomePage/sections/Cta'; + + +import ScrollFxSection from './HomePage/sections/ScrollFx';export default function HomePage(): React.JSX.Element { return ( - <> -
- - - -
+<> + -
- - - -
+ -
- - - -
+ -
- - - -
+ -
- - - -
+ -
- - - -
+ -
- - - -
+ -
- - - -
+ + ); } diff --git a/src/pages/HomePage/sections/Cta.tsx b/src/pages/HomePage/sections/Cta.tsx new file mode 100644 index 0000000..5f1d866 --- /dev/null +++ b/src/pages/HomePage/sections/Cta.tsx @@ -0,0 +1,27 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "cta" section. + +import React from 'react'; +import ContactCta from '@/components/sections/contact/ContactCta'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function CtaSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Faq.tsx b/src/pages/HomePage/sections/Faq.tsx new file mode 100644 index 0000000..5112eed --- /dev/null +++ b/src/pages/HomePage/sections/Faq.tsx @@ -0,0 +1,34 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "faq" section. + +import React from 'react'; +import FaqSimple from '@/components/sections/faq/FaqSimple'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function FaqSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Features.tsx b/src/pages/HomePage/sections/Features.tsx new file mode 100644 index 0000000..7756ba5 --- /dev/null +++ b/src/pages/HomePage/sections/Features.tsx @@ -0,0 +1,37 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "features" section. + +import React from 'react'; +import FeaturesRevealCards from '@/components/sections/features/FeaturesRevealCards'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function FeaturesSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Hero.tsx b/src/pages/HomePage/sections/Hero.tsx new file mode 100644 index 0000000..47b3045 --- /dev/null +++ b/src/pages/HomePage/sections/Hero.tsx @@ -0,0 +1,44 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "hero" section. + +import React from 'react'; +import HeroOverlayMarquee from '@/components/sections/hero/HeroOverlayMarquee'; +import { ArrowRight, ShieldCheck, Star, Target, UserPlus } from "lucide-react"; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function HeroSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/HowItWorks.tsx b/src/pages/HomePage/sections/HowItWorks.tsx new file mode 100644 index 0000000..436d7e0 --- /dev/null +++ b/src/pages/HomePage/sections/HowItWorks.tsx @@ -0,0 +1,39 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "how-it-works" section. + +import React from 'react'; +import AboutFeaturesSplit from '@/components/sections/about/AboutFeaturesSplit'; +import { ArrowRight, ShieldCheck, Star, Target, UserPlus } from "lucide-react"; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function HowItWorksSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/ScrollFx.tsx b/src/pages/HomePage/sections/ScrollFx.tsx new file mode 100644 index 0000000..b4703f9 --- /dev/null +++ b/src/pages/HomePage/sections/ScrollFx.tsx @@ -0,0 +1,38 @@ +import { motion, useScroll, useTransform, useSpring } from "motion/react"; + +export default function ScrollFx() { + const { scrollYProgress } = useScroll(); + const smoothProgress = useSpring(scrollYProgress, { damping: 20, stiffness: 100 }); + + // Flashes + const flash1 = useTransform(smoothProgress, [0.05, 0.1, 0.15], [0, 0.8, 0]); + const flash2 = useTransform(smoothProgress, [0.25, 0.3, 0.35], [0, 0.8, 0]); + const flash3 = useTransform(smoothProgress, [0.45, 0.5, 0.55], [0, 0.8, 0]); + const flash4 = useTransform(smoothProgress, [0.65, 0.7, 0.75], [0, 0.8, 0]); + const flash5 = useTransform(smoothProgress, [0.85, 0.9, 0.95], [0, 0.8, 0]); + + // Projectiles (falling down) + const p1 = useTransform(smoothProgress, [0.05, 0.15], ["-20%", "120%"]); + const p2 = useTransform(smoothProgress, [0.25, 0.35], ["-20%", "120%"]); + const p3 = useTransform(smoothProgress, [0.45, 0.55], ["-20%", "120%"]); + const p4 = useTransform(smoothProgress, [0.65, 0.75], ["-20%", "120%"]); + const p5 = useTransform(smoothProgress, [0.85, 0.95], ["-20%", "120%"]); + + return ( +
+ {/* Flashes */} + + + + + + + {/* Projectiles */} + + + + + +
+ ); +} \ No newline at end of file diff --git a/src/pages/HomePage/sections/Showcase.tsx b/src/pages/HomePage/sections/Showcase.tsx new file mode 100644 index 0000000..b2e2bc0 --- /dev/null +++ b/src/pages/HomePage/sections/Showcase.tsx @@ -0,0 +1,64 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "showcase" section. + +import React from 'react'; +import FeaturesRevealCardsBento from '@/components/sections/features/FeaturesRevealCardsBento'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function ShowcaseSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Stats.tsx b/src/pages/HomePage/sections/Stats.tsx new file mode 100644 index 0000000..bd44274 --- /dev/null +++ b/src/pages/HomePage/sections/Stats.tsx @@ -0,0 +1,34 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "stats" section. + +import React from 'react'; +import MetricsSimpleCards from '@/components/sections/metrics/MetricsSimpleCards'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function StatsSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Testimonials.tsx b/src/pages/HomePage/sections/Testimonials.tsx new file mode 100644 index 0000000..18a8be6 --- /dev/null +++ b/src/pages/HomePage/sections/Testimonials.tsx @@ -0,0 +1,52 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "testimonials" section. + +import React from 'react'; +import TestimonialMarqueeCards from '@/components/sections/testimonial/TestimonialMarqueeCards'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function TestimonialsSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +}