From 13ecf379c3ba46a195d6cc78a520d9af15660652 Mon Sep 17 00:00:00 2001 From: bender Date: Tue, 16 Jun 2026 15:44:35 +0000 Subject: [PATCH 1/2] Update src/components/Layout.tsx --- src/components/Layout.tsx | 61 ++++++++++++++------------------------- 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 4ce0acd..7a1693d 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -2,62 +2,45 @@ 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 { Facebook, Instagram, Linkedin } from "lucide-react"; import { Outlet } from 'react-router-dom'; import { StyleProvider } from "@/components/ui/StyleProvider"; export default function Layout() { const navItems = [ - { - "name": "Leistungen", "href": "#about" - }, - { - "name": "Produkte", "href": "#products" - }, - { - "name": "Referenzen", "href": "#testimonials" - }, - { - "name": "Kontakt", "href": "#contact" - }, - { - "name": "Hero", "href": "#hero" - }, - { - "name": "Features", "href": "#features" - }, - { - "name": "Metrics", "href": "#metrics" - } -]; + { "name": "Leistungen", "href": "#about" }, + { "name": "Produkte", "href": "#products" }, + { "name": "Referenzen", "href": "#testimonials" }, + { "name": "Kontakt", "href": "#contact" }, + { "name": "Hero", "href": "#hero" }, + { "name": "Features", "href": "#features" }, + { "name": "Metrics", "href": "#metrics" } + ]; return ( + logo="Klingelwerk" + logoImageSrc="http://img.b2bpic.net/free-vector/letter-bird-gradient-logo-design_474888-4706.jpg" + ctaButton={{ + text: "Anfrage", href: "#contact" + }} + navItems={navItems} />
+ brand="Klingelwerk GmbH" + copyright="© 2024 Klingelwerk GmbH. Alle Rechte vorbehalten." + socialLinks={[ + { icon: "Instagram", href: "#" }, + { icon: "Facebook", href: "#" }, + { icon: "Linkedin", href: "#" }, + ]} + />
); From 42e9cfb6d80de90bba85015016bafd6d6255bc81 Mon Sep 17 00:00:00 2001 From: bender Date: Tue, 16 Jun 2026 15:44:35 +0000 Subject: [PATCH 2/2] Update src/components/sections/hero/HeroVideoExpand.tsx --- .../sections/hero/HeroVideoExpand.tsx | 189 ++++++------------ 1 file changed, 59 insertions(+), 130 deletions(-) diff --git a/src/components/sections/hero/HeroVideoExpand.tsx b/src/components/sections/hero/HeroVideoExpand.tsx index e0e7f08..9e47478 100644 --- a/src/components/sections/hero/HeroVideoExpand.tsx +++ b/src/components/sections/hero/HeroVideoExpand.tsx @@ -1,146 +1,75 @@ -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 { useState, useEffect, useRef } from 'react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { X } from 'lucide-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; + thumbnailSrc: 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, thumbnailSrc, onComplete }: HeroVideoExpandProps) { + const [isOpen, setIsOpen] = useState(false); + const videoRef = useRef(null); useEffect(() => { - const expandTimer = setTimeout(() => setExpanded(true), 600); - const hideTimer = setTimeout(() => { - setShowLoader(false); - onComplete?.(); - }, 1500); + if (isOpen && videoRef.current) { + videoRef.current.play().catch(console.error); + } return () => { - clearTimeout(expandTimer); - clearTimeout(hideTimer); + if (onComplete) onComplete(); }; - }, []); + }, [isOpen, onComplete]); return ( - <> - - {showLoader && ( - - - - - - )} - +
+
+
+

{title}

+

{description}

+
-
- - + Video thumbnail setIsOpen(true)} /> - - -
- -
-
- - {title} - - -
- - - - - - - - - - +
setIsOpen(true)} + > +
+
-
- - ); -}; +
-export default HeroVideoExpand; + + {isOpen && ( + + + + )} + +
+ ); +} \ No newline at end of file