From 76b9dfb8cc4742b2df23679bf824e48cac135bb6 Mon Sep 17 00:00:00 2001 From: bender Date: Sun, 14 Jun 2026 11:09:35 +0000 Subject: [PATCH 1/2] Update src/components/Layout.tsx --- src/components/Layout.tsx | 42 ++++++++++++--------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index a899dda..1241adb 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -2,34 +2,19 @@ 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, Send } from "lucide-react"; import { Outlet } from 'react-router-dom'; import { StyleProvider } from "@/components/ui/StyleProvider"; export default function Layout() { const navItems = [ - { - "name": "Exams", "href": "#calendar" - }, - { - "name": "Levels", "href": "#levels" - }, - { - "name": "Demo", "href": "#demo" - }, - { - "name": "FAQ", "href": "#faq" - }, - { - "name": "Hero", "href": "#hero" - }, - { - "name": "Features", "href": "#features" - }, - { - "name": "Testimonials", "href": "#testimonials" - } -]; + { "name": "Exams", "href": "#calendar" }, + { "name": "Levels", "href": "#levels" }, + { "name": "Demo", "href": "#demo" }, + { "name": "FAQ", "href": "#faq" }, + { "name": "Hero", "href": "#hero" }, + { "name": "Features", "href": "#features" }, + { "name": "Testimonials", "href": "#testimonials" } + ]; return ( @@ -39,8 +24,9 @@ export default function Layout() { logo="Profi Deutsch" logoImageSrc="http://img.b2bpic.net/free-vector/hand-check-mark-logo-business-branding-template-designs-inspiration-isolated-white-background_384344-1465.jpg" ctaButton={{ - text: "Register", href: "#contact"}} - navItems={navItems} + text: "Register", href: "#contact" + }} + navItems={navItems} />
@@ -51,10 +37,8 @@ export default function Layout() { brand="© 2026 Profi Deutsch. All rights reserved." copyright="Official TELC Uzbekistan Representative." socialLinks={[ - { - icon: "Instagram", href: "#"}, - { - icon: "Send", href: "#"}, + { icon: "Instagram", href: "#" }, + { icon: "Send", href: "#" }, ]} /> From 8b183b06eb445b4c9af261d25708b961ea17ff94 Mon Sep 17 00:00:00 2001 From: bender Date: Sun, 14 Jun 2026 11:09:35 +0000 Subject: [PATCH 2/2] Update src/components/sections/hero/HeroVideoExpand.tsx --- .../sections/hero/HeroVideoExpand.tsx | 166 ++++-------------- 1 file changed, 30 insertions(+), 136 deletions(-) diff --git a/src/components/sections/hero/HeroVideoExpand.tsx b/src/components/sections/hero/HeroVideoExpand.tsx index e0e7f08..3c03a38 100644 --- a/src/components/sections/hero/HeroVideoExpand.tsx +++ b/src/components/sections/hero/HeroVideoExpand.tsx @@ -1,146 +1,40 @@ -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 React, { useEffect, useRef } 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 }; - onComplete?: () => void; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); + description: string; + videoSrc: string; + onComplete: () => void; +} -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); useEffect(() => { - const expandTimer = setTimeout(() => setExpanded(true), 600); - const hideTimer = setTimeout(() => { - setShowLoader(false); - onComplete?.(); - }, 1500); + const video = videoRef.current; + if (video) { + video.onended = onComplete; + } return () => { - clearTimeout(expandTimer); - clearTimeout(hideTimer); + if (video) video.onended = null; }; - }, []); + }, [onComplete]); return ( - <> - - {showLoader && ( - - - - - - )} - - -
- - - - -
- -
-
- - {title} - - -
- - - - - - - - - - -
-
-
-
- +
+