From 4f6238be535aa76d734fdd13c610c79b0bd0810d Mon Sep 17 00:00:00 2001 From: bender Date: Sun, 14 Jun 2026 21:18:04 +0000 Subject: [PATCH 1/2] Update src/components/Layout.tsx --- src/components/Layout.tsx | 60 ++++++++++++++------------------------- 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 41f24cf..05609fd 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -2,62 +2,44 @@ import FooterMinimal from '@/components/sections/footer/FooterMinimal'; import NavbarFloatingLogo from '@/components/ui/NavbarFloatingLogo'; import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; import SiteBackgroundSlot from "@/components/ui/SiteBackgroundSlot"; -import { Instagram, Linkedin, Twitter } from "lucide-react"; import { Outlet } from 'react-router-dom'; import { StyleProvider } from "@/components/ui/StyleProvider"; export default function Layout() { const navItems = [ - { - "name": "About", "href": "#about" - }, - { - "name": "Process", "href": "#process" - }, - { - "name": "Projects", "href": "#projects" - }, - { - "name": "Testimonials", "href": "#testimonials" - }, - { - "name": "Hero", "href": "#hero" - }, - { - "name": "Metrics", "href": "#metrics" - }, - { - "name": "Faq", "href": "#faq" - } -]; + { "name": "About", "href": "#about" }, + { "name": "Process", "href": "#process" }, + { "name": "Projects", "href": "#projects" }, + { "name": "Testimonials", "href": "#testimonials" }, + { "name": "Hero", "href": "#hero" }, + { "name": "Metrics", "href": "#metrics" }, + { "name": "Faq", "href": "#faq" } + ]; return ( + logo="ARC" + logoImageSrc="http://img.b2bpic.net/free-photo/isolated-white-house-silhouette-minimal-black-landscape_1194-641505.jpg" + ctaButton={{ text: "Book Consultation", href: "#contact" }} + navItems={navItems} + />
+ brand="Arc Architecture Firm" + copyright="© 2024 Arc Architecture. All rights reserved." + socialLinks={[ + { icon: "Instagram", href: "#" }, + { icon: "Linkedin", href: "#" }, + { icon: "Twitter", href: "#" }, + ]} + />
); From 2cb84222503c6289e6a609addc32d3a75631748a Mon Sep 17 00:00:00 2001 From: bender Date: Sun, 14 Jun 2026 21:18:04 +0000 Subject: [PATCH 2/2] Update src/components/sections/hero/HeroVideoExpand.tsx --- .../sections/hero/HeroVideoExpand.tsx | 171 ++++-------------- 1 file changed, 36 insertions(+), 135 deletions(-) diff --git a/src/components/sections/hero/HeroVideoExpand.tsx b/src/components/sections/hero/HeroVideoExpand.tsx index e0e7f08..ab77022 100644 --- a/src/components/sections/hero/HeroVideoExpand.tsx +++ b/src/components/sections/hero/HeroVideoExpand.tsx @@ -1,146 +1,47 @@ -import { useEffect, useRef, useState } from "react"; -import { AnimatePresence, motion, useScroll, useTransform } from "motion/react"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; -import AutoFillText from "@/components/ui/AutoFillText"; -import { useButtonClick } from "@/hooks/useButtonClick"; +import { useEffect, useRef, useState } from 'react'; -const StaggerText = ({ text }: { text: string }) => ( - - {[...text].map((char, index) => ( - - {char} - - ))} - -); - -type HeroVideoExpandProps = { +interface HeroVideoExpandProps { title: string; - primaryButton: { text: string; href: string }; - secondaryButton: { text: string; href: string }; + description: string; + videoSrc: string; onComplete?: () => void; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); +} -const HeroVideoExpand = ({ - title, - videoSrc, - imageSrc, - primaryButton, - secondaryButton, - onComplete, -}: HeroVideoExpandProps) => { - const [showLoader, setShowLoader] = useState(true); - const [expanded, setExpanded] = useState(false); - const handlePrimaryClick = useButtonClick(primaryButton.href); - const handleSecondaryClick = useButtonClick(secondaryButton.href); - - const sectionRef = useRef(null); - const { scrollYProgress } = useScroll({ - target: sectionRef, - offset: ["start start", "end start"], - }); - const videoY = useTransform(scrollYProgress, [0, 1], ["0px", "150px"]); - const videoScale = useTransform(scrollYProgress, [0, 1], [1, 1.1]); +export default function HeroVideoExpand({ title, description, videoSrc, onComplete }: HeroVideoExpandProps) { + const videoRef = useRef(null); + const [isExpanded, setIsExpanded] = useState(false); useEffect(() => { - const expandTimer = setTimeout(() => setExpanded(true), 600); - const hideTimer = setTimeout(() => { - setShowLoader(false); - onComplete?.(); - }, 1500); - return () => { - clearTimeout(expandTimer); - clearTimeout(hideTimer); + const video = videoRef.current; + if (!video) return; + + const handleEnded = () => { + setIsExpanded(true); + if (onComplete) onComplete(); }; - }, []); + + video.addEventListener('ended', handleEnded); + return () => { + video.removeEventListener('ended', handleEnded); + }; + }, [onComplete]); return ( - <> - - {showLoader && ( - - - - - - )} - - -
- - - - -
- -
-
- - {title} - - -
- - - - - - - - - - -
-
+
+
- + + ); -}; - -export default HeroVideoExpand; +}