diff --git a/index.html b/index.html index 50ab491..7956a8a 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,11 @@ - + + + + + MB Grid Solutions | Energiekabelprojekte bis 110 kV diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 7a995d5..27a76d3 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -1,25 +1,40 @@ -import React from 'react'; -import { Link } from 'react-router-dom'; +import React, { useState, useEffect } from 'react'; +import { Link, useLocation, NavLink } from 'react-router-dom'; +import { Home, Info, Mail, ArrowUp } from 'lucide-react'; const Layout = ({ children }: { children: React.ReactNode }) => { + const location = useLocation(); + const [showScrollTop, setShowScrollTop] = useState(false); + + useEffect(() => { + const handleScroll = () => { + setShowScrollTop(window.scrollY > 400); + }; + window.addEventListener('scroll', handleScroll); + return () => window.removeEventListener('scroll', handleScroll); + }, []); + + const scrollToTop = () => { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }; + return (
-
-
+
+
MB Grid Solutions
@@ -28,6 +43,31 @@ const Layout = ({ children }: { children: React.ReactNode }) => { {children} + {showScrollTop && ( + + )} + + +