From 9968feefb30fcda9852b67226aad5bf756357d57 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Thu, 15 Jan 2026 12:30:13 +0100 Subject: [PATCH] mobile --- index.html | 6 +- src/components/Layout.tsx | 68 ++++-- src/index.css | 431 ++++++++++++++++++++++++++++++++++---- src/pages/AGB.tsx | 4 +- src/pages/About.tsx | 24 +-- src/pages/Contact.tsx | 10 +- src/pages/Home.tsx | 43 ++-- src/pages/Legal.tsx | 8 +- src/pages/Privacy.tsx | 12 +- 9 files changed, 497 insertions(+), 109 deletions(-) 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 && ( + + )} + + +