From 3a7e7f4ec30d4bb2cad22afcc7a731a4161a197e Mon Sep 17 00:00:00 2001 From: bender Date: Tue, 3 Mar 2026 19:19:53 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 91 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 75 insertions(+), 16 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 8742b71..8068079 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,8 +11,41 @@ import TestimonialCardFifteen from "@/components/sections/testimonial/Testimonia import ContactFaq from "@/components/sections/contact/ContactFaq"; import FooterLogoReveal from "@/components/sections/footer/FooterLogoReveal"; import { BookOpen, Brush, Calendar, Heart, Mountain, Palette, Sparkles, Target, Users, Zap } from "lucide-react"; +import { useEffect, useRef } from "react"; export default function LandingPage() { + const marqueeRef = useRef(null); + + useEffect(() => { + if (!marqueeRef.current) return; + + const marquee = marqueeRef.current; + const scrollContainer = marquee.querySelector(".marquee-scroll") as HTMLElement; + if (!scrollContainer) return; + + // Clone items for infinite scroll + const items = Array.from(scrollContainer.children); + items.forEach((item) => { + const clone = item.cloneNode(true); + scrollContainer.appendChild(clone); + }); + + let scrollPosition = 0; + const itemWidth = (items[0] as HTMLElement).offsetWidth + 16; // 16px gap + const totalWidth = itemWidth * items.length; + + const animate = () => { + scrollPosition += 1; + if (scrollPosition >= totalWidth) { + scrollPosition = 0; + } + scrollContainer.style.transform = `translateX(-${scrollPosition}px)`; + requestAnimationFrame(animate); + }; + + animate(); + }, []); + return (
- +
+ + + {/* Infinite Horizontal Scroll Gallery */} +
+
+ {[ + { src: "http://img.b2bpic.net/free-photo/little-boy-home-painting_23-2148902417.jpg", alt: "Colorful Expression" }, + { src: "http://img.b2bpic.net/free-photo/side-view-woman-doing-creative-journaling_23-2150561834.jpg", alt: "Digital Art" }, + { src: "http://img.b2bpic.net/free-photo/curly-redhead-girl-is-focused-covering-pottery-vase-before-baking_8353-10819.jpg", alt: "3D Creations" }, + { src: "http://img.b2bpic.net/free-photo/full-shot-kids-painting-school_23-2150385331.jpg", alt: "Kids Painting" }, + { src: "http://img.b2bpic.net/free-photo/joyful-artist-her-apprentice-applying-watercolor-paint-canvas_482257-118557.jpg", alt: "Watercolor Art" } + ].map((item, idx) => ( +
+ {item.alt} +
+ ))} +
+
+
-- 2.49.1