Improve project structure.
New Project Structure: - Created reusable UI components (ServiceCard, AnimatedSection, SectionTitle) - Split large components into smaller, focused ones - Extracted shared hooks for common functionality - Organized constants into separate files Key Improvements: - Hooks: useScrollNavigation, useScrollToSection, useCookieSettings - UI Components: Modular components for consistent styling and behavior - Constants: Centralized data management (ServicesData, NavigationData) - Component Split: Navbar, Hero, and Footer broken into logical sub-components
This commit is contained in:
@@ -4,7 +4,8 @@
|
|||||||
"Bash(find:*)",
|
"Bash(find:*)",
|
||||||
"Bash(mvn clean:*)",
|
"Bash(mvn clean:*)",
|
||||||
"Bash(mvn test:*)",
|
"Bash(mvn test:*)",
|
||||||
"Bash(npm run build:*)"
|
"Bash(npm run build:*)",
|
||||||
|
"Bash(npm run lint)"
|
||||||
],
|
],
|
||||||
"deny": []
|
"deny": []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,18 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import React, {useEffect} from "react";
|
import React from "react";
|
||||||
import HomeServices from "@/app/(root)/sections/HomeServices";
|
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
import { useScrollToSection } from "@/hooks/useScrollToSection";
|
||||||
import Hero from "@/app/(root)/sections/Hero";
|
import Hero from "@/app/(root)/sections/Hero";
|
||||||
|
import HomeServices from "@/app/(root)/sections/HomeServices";
|
||||||
import About from "@/app/(root)/sections/About";
|
import About from "@/app/(root)/sections/About";
|
||||||
import ProcessSection from "@/app/(root)/sections/ProcessSection";
|
import ProcessSection from "@/app/(root)/sections/ProcessSection";
|
||||||
import WhyUs from "@/app/(root)/sections/WhyUs";
|
import WhyUs from "@/app/(root)/sections/WhyUs";
|
||||||
import Faq from "@/app/(root)/sections/Faq";
|
|
||||||
import ReferralSection from "@/app/(root)/sections/ReferralSection";
|
import ReferralSection from "@/app/(root)/sections/ReferralSection";
|
||||||
|
import Faq from "@/app/(root)/sections/Faq";
|
||||||
|
|
||||||
const Home = () => {
|
const Home = () => {
|
||||||
useEffect(() => {
|
useScrollToSection();
|
||||||
const scrollToId = localStorage.getItem('scrollToId')
|
|
||||||
if (scrollToId) {
|
|
||||||
localStorage.removeItem('scrollToId')
|
|
||||||
const el = document.getElementById(scrollToId)
|
|
||||||
if (el) {
|
|
||||||
setTimeout(() => {
|
|
||||||
el.scrollIntoView({behavior: 'smooth', block: 'start'})
|
|
||||||
}, 200)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
|
import { SectionTitle } from '@/components/ui/SectionTitle';
|
||||||
|
|
||||||
const About = () => {
|
const About = () => {
|
||||||
return (
|
return (
|
||||||
@@ -9,23 +10,9 @@ const About = () => {
|
|||||||
className="relative w-full py-24 bg-background text-foreground transition-colors duration-700 ease-in-out">
|
className="relative w-full py-24 bg-background text-foreground transition-colors duration-700 ease-in-out">
|
||||||
<div className="w-full max-w-6xl px-6 md:px-10 mx-auto">
|
<div className="w-full max-w-6xl px-6 md:px-10 mx-auto">
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
{/* Title */}
|
<SectionTitle
|
||||||
<motion.h2
|
title="Über uns"
|
||||||
className="text-3xl md:text-4xl font-bold mb-1 text-left"
|
className="mb-6"
|
||||||
initial={{opacity: 0, y: 10}}
|
|
||||||
whileInView={{opacity: 1, y: 0}}
|
|
||||||
viewport={{once: true}}
|
|
||||||
transition={{duration: 0.4}}
|
|
||||||
>
|
|
||||||
Über uns
|
|
||||||
</motion.h2>
|
|
||||||
|
|
||||||
<motion.div
|
|
||||||
className="w-12 h-[2px] mt-2 mb-6 bg-amber-500"
|
|
||||||
initial={{opacity: 0, x: -20}}
|
|
||||||
whileInView={{opacity: 1, x: 0}}
|
|
||||||
viewport={{once: true}}
|
|
||||||
transition={{duration: 0.4, delay: 0.1}}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Text */}
|
{/* Text */}
|
||||||
|
|||||||
@@ -1,74 +1,16 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import {motion} from 'framer-motion';
|
import { HeroBackground } from '@/components/Hero/HeroBackground';
|
||||||
import Image from 'next/image';
|
import { HeroContent } from '@/components/Hero/HeroContent';
|
||||||
import {Typewriter} from 'react-simple-typewriter';
|
|
||||||
import PulsatingButton from "@/components/PulsatingButton";
|
|
||||||
|
|
||||||
const Hero = () => {
|
const Hero = () => {
|
||||||
return (
|
return (
|
||||||
<section id="start" className="relative w-full h-screen overflow-hidden">
|
<section id="start" className="relative w-full h-screen overflow-hidden">
|
||||||
{/* Background */}
|
<HeroBackground
|
||||||
<div className="absolute inset-0 z-0">
|
imageSrc="/images/home_hero.jpg"
|
||||||
<Image
|
imageAlt="Rhein river aerial view"
|
||||||
src="/images/home_hero.jpg"
|
|
||||||
alt="Rhein river aerial view"
|
|
||||||
fill
|
|
||||||
className="object-cover scale-105 blur-sm"
|
|
||||||
priority
|
|
||||||
/>
|
/>
|
||||||
<div className="absolute inset-0 bg-black/60"/>
|
<HeroContent />
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Content */}
|
|
||||||
<div
|
|
||||||
className="relative z-10 flex flex-col justify-center items-start h-full w-[90%] sm:w-[80%] max-w-6xl mx-auto text-white">
|
|
||||||
<motion.h1
|
|
||||||
className="text-3xl sm:text-5xl font-bold mb-6 leading-tight"
|
|
||||||
initial={{opacity: 0, y: 40}}
|
|
||||||
animate={{opacity: 1, y: 0}}
|
|
||||||
transition={{duration: 0.6}}
|
|
||||||
>
|
|
||||||
Digitale Lösungen, <br/> die wirklich passen.
|
|
||||||
</motion.h1>
|
|
||||||
|
|
||||||
<motion.p
|
|
||||||
className="text-lg sm:text-xl text-gray-300 mb-6 max-w-2xl"
|
|
||||||
initial={{opacity: 0, y: 20}}
|
|
||||||
animate={{opacity: 1, y: 0}}
|
|
||||||
transition={{duration: 0.6, delay: 0.2}}
|
|
||||||
>
|
|
||||||
Wir entwickeln individuelle Softwarelösungen für Unternehmen und Startups.
|
|
||||||
</motion.p>
|
|
||||||
|
|
||||||
<motion.div
|
|
||||||
className="text-xl font-semibold text-white"
|
|
||||||
initial={{opacity: 0}}
|
|
||||||
animate={{opacity: 1}}
|
|
||||||
transition={{delay: 0.6}}
|
|
||||||
>
|
|
||||||
<Typewriter
|
|
||||||
words={['Webdesign', 'App-Entwicklung', 'Interne Tools']}
|
|
||||||
loop={true}
|
|
||||||
cursor
|
|
||||||
cursorStyle="_"
|
|
||||||
typeSpeed={60}
|
|
||||||
deleteSpeed={40}
|
|
||||||
delaySpeed={2000}
|
|
||||||
/>
|
|
||||||
</motion.div>
|
|
||||||
|
|
||||||
<div className="mt-10 relative flex items-center justify-center">
|
|
||||||
<PulsatingButton
|
|
||||||
label="Jetzt Kontakt aufnehmen"
|
|
||||||
href="/contact"
|
|
||||||
color="#2563eb" // Tailwind blue-600
|
|
||||||
width={256}
|
|
||||||
pulse
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,92 +1,26 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import {ChevronRight} from 'lucide-react';
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
import { SectionTitle } from '@/components/ui/SectionTitle';
|
||||||
const services = [
|
import { ServiceCard } from '@/components/ui/ServiceCard';
|
||||||
{
|
import { servicesData } from '@/constant/ServicesData';
|
||||||
title: 'Webdesign',
|
|
||||||
description: 'Moderne Websites, die Vertrauen schaffen und verkaufen.',
|
|
||||||
bullets: [
|
|
||||||
'Maßgeschneidertes Design',
|
|
||||||
'Klare Struktur & überzeugende Inhalte',
|
|
||||||
'Nutzerführung mit System & Strategie',
|
|
||||||
'Für alle Geräte optimiert',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'App-Entwicklung',
|
|
||||||
description: 'Skalierbare Apps für Web und Mobile – von der Idee bis zum Launch.',
|
|
||||||
bullets: [
|
|
||||||
'Plattformübergreifend mit modernen Technologien',
|
|
||||||
'Backend & API-Entwicklung inklusive',
|
|
||||||
'Individuelle Funktionen & Logik',
|
|
||||||
'Stabil, performant & wartbar',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Interne Tools',
|
|
||||||
description: 'Digitale Werkzeuge, die Prozesse vereinfachen und Zeit sparen.',
|
|
||||||
bullets: [
|
|
||||||
'Prozessdigitalisierung & Automatisierung',
|
|
||||||
'Zugeschnitten auf eure Workflows',
|
|
||||||
'Skalierbar & zukunftssicher',
|
|
||||||
'Intuitiv & effizient bedienbar',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const HomeServices = () => {
|
const HomeServices = () => {
|
||||||
return (
|
return (
|
||||||
<section id="services"
|
<section id="services" className="w-full py-24 bg-background text-foreground">
|
||||||
className="w-full py-24 bg-background text-foreground">
|
|
||||||
<div className="w-full max-w-6xl px-6 md:px-10 mx-auto">
|
<div className="w-full max-w-6xl px-6 md:px-10 mx-auto">
|
||||||
<motion.h2
|
<SectionTitle title="Leistungen" />
|
||||||
className="text-3xl md:text-4xl font-bold mb-1 text-left"
|
|
||||||
initial={{opacity: 0, y: 10}}
|
|
||||||
whileInView={{opacity: 1, y: 0}}
|
|
||||||
viewport={{once: true}}
|
|
||||||
transition={{duration: 0.4}}
|
|
||||||
>
|
|
||||||
Leistungen
|
|
||||||
</motion.h2>
|
|
||||||
|
|
||||||
<motion.div
|
|
||||||
className="w-12 h-[2px] mt-2 mb-10 bg-amber-500"
|
|
||||||
initial={{opacity: 0, x: -20}}
|
|
||||||
whileInView={{opacity: 1, x: 0}}
|
|
||||||
viewport={{once: true}}
|
|
||||||
transition={{duration: 0.4, delay: 0.1}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||||
{services.map((service, index) => (
|
{servicesData.map((service, index) => (
|
||||||
<motion.div
|
<ServiceCard
|
||||||
key={service.title}
|
key={service.title}
|
||||||
className="flex flex-col justify-between h-full p-6 rounded-3xl border bg-muted text-foreground"
|
title={service.title}
|
||||||
initial={{opacity: 0, y: 20}}
|
description={service.description}
|
||||||
whileInView={{opacity: 1, y: 0}}
|
bullets={service.bullets}
|
||||||
viewport={{once: true}}
|
index={index}
|
||||||
transition={{duration: 0.4, delay: index * 0.1}}
|
/>
|
||||||
whileHover={{
|
|
||||||
scale: 1.03,
|
|
||||||
boxShadow: '0px 12px 30px rgba(0, 0, 0, 0.08)',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<h3 className="text-xl font-semibold mb-2">{service.title}</h3>
|
|
||||||
<p className="text-muted-foreground mb-4">{service.description}</p>
|
|
||||||
<ul className="space-y-3">
|
|
||||||
{service.bullets.map((point, i) => (
|
|
||||||
<li key={i} className="flex items-start gap-2">
|
|
||||||
<ChevronRight className="w-4 h-4 text-primary mt-1"/>
|
|
||||||
<span className="text-sm text-foreground">{point}</span>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</motion.div>
|
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import React from 'react';
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { Mail, Gavel, ShieldCheck, Cookie } from 'lucide-react';
|
import { Mail, Gavel, ShieldCheck, Cookie } from 'lucide-react';
|
||||||
|
import { FooterSection } from './FooterSection';
|
||||||
|
import { useCookieSettings } from '@/hooks/useCookieSettings';
|
||||||
|
|
||||||
const Footer = () => {
|
const Footer = () => {
|
||||||
const openCookieSettings = () => {
|
const { openCookieSettings } = useCookieSettings();
|
||||||
window.dispatchEvent(new Event('show-cookie-banner'));
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.footer
|
<motion.footer
|
||||||
@@ -42,33 +42,16 @@ const Footer = () => {
|
|||||||
</p>
|
</p>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
{/* Informationen */}
|
<FooterSection title="Informationen" delay={0.4}>
|
||||||
<motion.div
|
|
||||||
initial={{opacity: 0, y: 10}}
|
|
||||||
whileInView={{opacity: 1, y: 0}}
|
|
||||||
viewport={{once: true}}
|
|
||||||
transition={{duration: 0.5, delay: 0.4}}
|
|
||||||
>
|
|
||||||
<h3 className="text-lg font-semibold mb-4">Informationen</h3>
|
|
||||||
<ul className="space-y-3 text-sm text-gray-300">
|
|
||||||
<li className="flex items-center gap-2">
|
<li className="flex items-center gap-2">
|
||||||
<Mail className="w-4 h-4" />
|
<Mail className="w-4 h-4" />
|
||||||
<Link href="/contact" className="hover:underline">
|
<Link href="/contact" className="hover:underline">
|
||||||
Kontakt
|
Kontakt
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</FooterSection>
|
||||||
</motion.div>
|
|
||||||
|
|
||||||
{/* Rechtliches */}
|
<FooterSection title="Rechtliches" delay={0.5}>
|
||||||
<motion.div
|
|
||||||
initial={{opacity: 0, y: 10}}
|
|
||||||
whileInView={{opacity: 1, y: 0}}
|
|
||||||
viewport={{once: true}}
|
|
||||||
transition={{duration: 0.5, delay: 0.5}}
|
|
||||||
>
|
|
||||||
<h3 className="text-lg font-semibold mb-4">Rechtliches</h3>
|
|
||||||
<ul className="space-y-3 text-sm text-gray-300">
|
|
||||||
<li className="flex items-center gap-2">
|
<li className="flex items-center gap-2">
|
||||||
<ShieldCheck className="w-4 h-4" />
|
<ShieldCheck className="w-4 h-4" />
|
||||||
<Link href="/legal/privacy" className="hover:underline">
|
<Link href="/legal/privacy" className="hover:underline">
|
||||||
@@ -90,8 +73,7 @@ const Footer = () => {
|
|||||||
Cookie-Einstellungen
|
Cookie-Einstellungen
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</FooterSection>
|
||||||
</motion.div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
26
frontend/components/Footer/FooterSection.tsx
Normal file
26
frontend/components/Footer/FooterSection.tsx
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
|
import { ReactNode } from 'react';
|
||||||
|
|
||||||
|
interface FooterSectionProps {
|
||||||
|
title: string;
|
||||||
|
children: ReactNode;
|
||||||
|
delay: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const FooterSection = ({ title, children, delay }: FooterSectionProps) => {
|
||||||
|
return (
|
||||||
|
<motion.div
|
||||||
|
initial={{ opacity: 0, y: 10 }}
|
||||||
|
whileInView={{ opacity: 1, y: 0 }}
|
||||||
|
viewport={{ once: true }}
|
||||||
|
transition={{ duration: 0.5, delay }}
|
||||||
|
>
|
||||||
|
<h3 className="text-lg font-semibold mb-4">{title}</h3>
|
||||||
|
<ul className="space-y-3 text-sm text-gray-300">
|
||||||
|
{children}
|
||||||
|
</ul>
|
||||||
|
</motion.div>
|
||||||
|
);
|
||||||
|
};
|
||||||
23
frontend/components/Hero/HeroBackground.tsx
Normal file
23
frontend/components/Hero/HeroBackground.tsx
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import Image from 'next/image';
|
||||||
|
|
||||||
|
interface HeroBackgroundProps {
|
||||||
|
imageSrc: string;
|
||||||
|
imageAlt: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const HeroBackground = ({ imageSrc, imageAlt }: HeroBackgroundProps) => {
|
||||||
|
return (
|
||||||
|
<div className="absolute inset-0 z-0">
|
||||||
|
<Image
|
||||||
|
src={imageSrc}
|
||||||
|
alt={imageAlt}
|
||||||
|
fill
|
||||||
|
className="object-cover scale-105 blur-sm"
|
||||||
|
priority
|
||||||
|
/>
|
||||||
|
<div className="absolute inset-0 bg-black/60" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
58
frontend/components/Hero/HeroContent.tsx
Normal file
58
frontend/components/Hero/HeroContent.tsx
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
|
import { Typewriter } from 'react-simple-typewriter';
|
||||||
|
import PulsatingButton from '@/components/PulsatingButton';
|
||||||
|
|
||||||
|
const typewriterWords = ['Webdesign', 'App-Entwicklung', 'Interne Tools'];
|
||||||
|
|
||||||
|
export const HeroContent = () => {
|
||||||
|
return (
|
||||||
|
<div className="relative z-10 flex flex-col justify-center items-start h-full w-[90%] sm:w-[80%] max-w-6xl mx-auto text-white">
|
||||||
|
<motion.h1
|
||||||
|
className="text-3xl sm:text-5xl font-bold mb-6 leading-tight"
|
||||||
|
initial={{ opacity: 0, y: 40 }}
|
||||||
|
animate={{ opacity: 1, y: 0 }}
|
||||||
|
transition={{ duration: 0.6 }}
|
||||||
|
>
|
||||||
|
Digitale Lösungen, <br /> die wirklich passen.
|
||||||
|
</motion.h1>
|
||||||
|
|
||||||
|
<motion.p
|
||||||
|
className="text-lg sm:text-xl text-gray-300 mb-6 max-w-2xl"
|
||||||
|
initial={{ opacity: 0, y: 20 }}
|
||||||
|
animate={{ opacity: 1, y: 0 }}
|
||||||
|
transition={{ duration: 0.6, delay: 0.2 }}
|
||||||
|
>
|
||||||
|
Wir entwickeln individuelle Softwarelösungen für Unternehmen und Startups.
|
||||||
|
</motion.p>
|
||||||
|
|
||||||
|
<motion.div
|
||||||
|
className="text-xl font-semibold text-white"
|
||||||
|
initial={{ opacity: 0 }}
|
||||||
|
animate={{ opacity: 1 }}
|
||||||
|
transition={{ delay: 0.6 }}
|
||||||
|
>
|
||||||
|
<Typewriter
|
||||||
|
words={typewriterWords}
|
||||||
|
loop={true}
|
||||||
|
cursor
|
||||||
|
cursorStyle="_"
|
||||||
|
typeSpeed={60}
|
||||||
|
deleteSpeed={40}
|
||||||
|
delaySpeed={2000}
|
||||||
|
/>
|
||||||
|
</motion.div>
|
||||||
|
|
||||||
|
<div className="mt-10 relative flex items-center justify-center">
|
||||||
|
<PulsatingButton
|
||||||
|
label="Jetzt Kontakt aufnehmen"
|
||||||
|
href="/contact"
|
||||||
|
color="#2563eb"
|
||||||
|
width={256}
|
||||||
|
pulse
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
32
frontend/components/Navbar/DesktopNav.tsx
Normal file
32
frontend/components/Navbar/DesktopNav.tsx
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import Link from 'next/link';
|
||||||
|
import { Button } from '@/components/ui/button';
|
||||||
|
import { ThemeToggle } from '@/components/theme-toggle';
|
||||||
|
import { navLinks } from '@/constant/NavigationData';
|
||||||
|
|
||||||
|
interface DesktopNavProps {
|
||||||
|
onNavClick: (id: string) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const DesktopNav = ({ onNavClick }: DesktopNavProps) => {
|
||||||
|
return (
|
||||||
|
<nav className="hidden lg:flex items-center gap-6">
|
||||||
|
{navLinks.map((link) => (
|
||||||
|
<button
|
||||||
|
key={link.id}
|
||||||
|
onClick={() => onNavClick(link.id)}
|
||||||
|
className="cursor-pointer text-sm font-medium text-muted-foreground hover:text-primary transition-colors"
|
||||||
|
>
|
||||||
|
{link.label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
|
||||||
|
<Button asChild>
|
||||||
|
<Link href="/contact">Kontakt</Link>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<ThemeToggle />
|
||||||
|
</nav>
|
||||||
|
);
|
||||||
|
};
|
||||||
43
frontend/components/Navbar/MobileNav.tsx
Normal file
43
frontend/components/Navbar/MobileNav.tsx
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import Link from 'next/link';
|
||||||
|
import { Button } from '@/components/ui/button';
|
||||||
|
import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet';
|
||||||
|
import { Menu } from 'lucide-react';
|
||||||
|
import { ThemeToggle } from '@/components/theme-toggle';
|
||||||
|
import { navLinks } from '@/constant/NavigationData';
|
||||||
|
|
||||||
|
interface MobileNavProps {
|
||||||
|
onNavClick: (id: string) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const MobileNav = ({ onNavClick }: MobileNavProps) => {
|
||||||
|
return (
|
||||||
|
<div className="lg:hidden flex items-center gap-3">
|
||||||
|
<ThemeToggle />
|
||||||
|
<Sheet>
|
||||||
|
<SheetTrigger asChild>
|
||||||
|
<Button variant="outline" size="icon">
|
||||||
|
<Menu className="h-5 w-5" />
|
||||||
|
</Button>
|
||||||
|
</SheetTrigger>
|
||||||
|
<SheetContent side="top" className="pt-10">
|
||||||
|
<div className="flex flex-col space-y-4 text-center">
|
||||||
|
{navLinks.map((link) => (
|
||||||
|
<button
|
||||||
|
key={link.id}
|
||||||
|
onClick={() => onNavClick(link.id)}
|
||||||
|
className="cursor-pointer text-base font-semibold text-muted-foreground hover:text-primary transition-colors"
|
||||||
|
>
|
||||||
|
{link.label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
<Button asChild className="mt-4 w-full">
|
||||||
|
<Link href="/contact">Kontakt</Link>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</SheetContent>
|
||||||
|
</Sheet>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
16
frontend/components/Navbar/NavLogo.tsx
Normal file
16
frontend/components/Navbar/NavLogo.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
interface NavLogoProps {
|
||||||
|
onLogoClick: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const NavLogo = ({ onLogoClick }: NavLogoProps) => {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
onClick={onLogoClick}
|
||||||
|
className="text-xl font-bold cursor-pointer"
|
||||||
|
>
|
||||||
|
<span className="text-pink-600">R</span>hein Software
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -1,98 +1,21 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Link from 'next/link';
|
import { useScrollNavigation } from '@/hooks/useScrollNavigation';
|
||||||
import {usePathname, useRouter} from 'next/navigation';
|
import { NavLogo } from './NavLogo';
|
||||||
import {Button} from '@/components/ui/button';
|
import { DesktopNav } from './DesktopNav';
|
||||||
import {Sheet, SheetContent, SheetTrigger} from '@/components/ui/sheet';
|
import { MobileNav } from './MobileNav';
|
||||||
import {Menu} from 'lucide-react';
|
|
||||||
import {ThemeToggle} from '@/components/theme-toggle';
|
|
||||||
|
|
||||||
const navLinks = [
|
|
||||||
{id: 'services', label: 'Leistungen'},
|
|
||||||
{id: 'about', label: 'Über uns'},
|
|
||||||
{id: 'process', label: 'Ablauf'},
|
|
||||||
{id: 'whyus', label: 'Warum wir'},
|
|
||||||
{id: 'referral', label: 'Empfehlung'},
|
|
||||||
{id: 'faq', label: 'FAQ'},
|
|
||||||
];
|
|
||||||
|
|
||||||
const Navbar = () => {
|
const Navbar = () => {
|
||||||
const pathname = usePathname();
|
const { handleNavClick } = useScrollNavigation();
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
const handleNavClick = (id: string) => {
|
|
||||||
if (typeof window === 'undefined') return
|
|
||||||
|
|
||||||
if (pathname === '/') {
|
|
||||||
const el = document.getElementById(id)
|
|
||||||
if (el) {
|
|
||||||
el.scrollIntoView({behavior: 'smooth', block: 'start'})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
localStorage.setItem('scrollToId', id)
|
|
||||||
router.push('/')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full px-4 sm:px-6 lg:px-8 flex justify-center mt-4 z-50 fixed">
|
<div className="w-full px-4 sm:px-6 lg:px-8 flex justify-center mt-4 z-50 fixed">
|
||||||
<header
|
<header className="bg-background/50 backdrop-blur-md border shadow-lg rounded-xl w-full max-w-screen-xl py-3 px-4 sm:px-6 lg:px-8">
|
||||||
className="bg-background/50 backdrop-blur-md border shadow-lg rounded-xl w-full max-w-screen-xl py-3 px-4 sm:px-6 lg:px-8">
|
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<button
|
<NavLogo onLogoClick={() => handleNavClick('start')} />
|
||||||
onClick={() => handleNavClick('start')}
|
<DesktopNav onNavClick={handleNavClick} />
|
||||||
className="text-xl font-bold cursor-pointer"
|
<MobileNav onNavClick={handleNavClick} />
|
||||||
>
|
|
||||||
<span className="text-pink-600">R</span>hein Software
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{/* Desktop nav */}
|
|
||||||
<nav className="hidden lg:flex items-center gap-6">
|
|
||||||
{navLinks.map((link) => (
|
|
||||||
<button
|
|
||||||
key={link.id}
|
|
||||||
onClick={() => handleNavClick(link.id)}
|
|
||||||
className="cursor-pointer text-sm font-medium text-muted-foreground hover:text-primary transition-colors"
|
|
||||||
>
|
|
||||||
{link.label}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
|
|
||||||
<Button asChild>
|
|
||||||
<Link href="/contact">Kontakt</Link>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<ThemeToggle/>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
{/* Mobile nav */}
|
|
||||||
<div className="lg:hidden flex items-center gap-3">
|
|
||||||
<ThemeToggle/>
|
|
||||||
<Sheet>
|
|
||||||
<SheetTrigger asChild>
|
|
||||||
<Button variant="outline" size="icon">
|
|
||||||
<Menu className="h-5 w-5"/>
|
|
||||||
</Button>
|
|
||||||
</SheetTrigger>
|
|
||||||
<SheetContent side="top" className="pt-10">
|
|
||||||
<div className="flex flex-col space-y-4 text-center">
|
|
||||||
{navLinks.map((link) => (
|
|
||||||
<button
|
|
||||||
key={link.id}
|
|
||||||
onClick={() => handleNavClick(link.id)}
|
|
||||||
className="cursor-pointer text-base font-semibold text-muted-foreground hover:text-primary transition-colors"
|
|
||||||
>
|
|
||||||
{link.label}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
<Button asChild className="mt-4 w-full">
|
|
||||||
<Link href="/contact">Kontakt</Link>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</SheetContent>
|
|
||||||
</Sheet>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
55
frontend/components/ui/SectionTitle.tsx
Normal file
55
frontend/components/ui/SectionTitle.tsx
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
|
|
||||||
|
interface SectionTitleProps {
|
||||||
|
title: string;
|
||||||
|
subtitle?: string;
|
||||||
|
className?: string;
|
||||||
|
showUnderline?: boolean;
|
||||||
|
underlineColor?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const SectionTitle = ({
|
||||||
|
title,
|
||||||
|
subtitle,
|
||||||
|
className = "",
|
||||||
|
showUnderline = true,
|
||||||
|
underlineColor = "bg-amber-500"
|
||||||
|
}: SectionTitleProps) => {
|
||||||
|
return (
|
||||||
|
<div className={className}>
|
||||||
|
<motion.h2
|
||||||
|
className="text-3xl md:text-4xl font-bold mb-1 text-left"
|
||||||
|
initial={{ opacity: 0, y: 10 }}
|
||||||
|
whileInView={{ opacity: 1, y: 0 }}
|
||||||
|
viewport={{ once: true }}
|
||||||
|
transition={{ duration: 0.4 }}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</motion.h2>
|
||||||
|
|
||||||
|
{showUnderline && (
|
||||||
|
<motion.div
|
||||||
|
className={`w-12 h-[2px] mt-2 mb-10 ${underlineColor}`}
|
||||||
|
initial={{ opacity: 0, x: -20 }}
|
||||||
|
whileInView={{ opacity: 1, x: 0 }}
|
||||||
|
viewport={{ once: true }}
|
||||||
|
transition={{ duration: 0.4, delay: 0.1 }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{subtitle && (
|
||||||
|
<motion.p
|
||||||
|
className="text-lg text-muted-foreground mt-4"
|
||||||
|
initial={{ opacity: 0, y: 10 }}
|
||||||
|
whileInView={{ opacity: 1, y: 0 }}
|
||||||
|
viewport={{ once: true }}
|
||||||
|
transition={{ duration: 0.4, delay: 0.2 }}
|
||||||
|
>
|
||||||
|
{subtitle}
|
||||||
|
</motion.p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
43
frontend/components/ui/ServiceCard.tsx
Normal file
43
frontend/components/ui/ServiceCard.tsx
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
|
import { ChevronRight } from 'lucide-react';
|
||||||
|
import { ReactNode } from 'react';
|
||||||
|
|
||||||
|
interface ServiceCardProps {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
bullets: string[];
|
||||||
|
index: number;
|
||||||
|
children?: ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ServiceCard = ({ title, description, bullets, index, children }: ServiceCardProps) => {
|
||||||
|
return (
|
||||||
|
<motion.div
|
||||||
|
className="flex flex-col justify-between h-full p-6 rounded-3xl border bg-muted text-foreground"
|
||||||
|
initial={{ opacity: 0, y: 20 }}
|
||||||
|
whileInView={{ opacity: 1, y: 0 }}
|
||||||
|
viewport={{ once: true }}
|
||||||
|
transition={{ duration: 0.4, delay: index * 0.1 }}
|
||||||
|
whileHover={{
|
||||||
|
scale: 1.03,
|
||||||
|
boxShadow: '0px 12px 30px rgba(0, 0, 0, 0.08)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<h3 className="text-xl font-semibold mb-2">{title}</h3>
|
||||||
|
<p className="text-muted-foreground mb-4">{description}</p>
|
||||||
|
<ul className="space-y-3">
|
||||||
|
{bullets.map((point, i) => (
|
||||||
|
<li key={i} className="flex items-start gap-2">
|
||||||
|
<ChevronRight className="w-4 h-4 text-primary mt-1" />
|
||||||
|
<span className="text-sm text-foreground">{point}</span>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
{children && <div className="mt-4">{children}</div>}
|
||||||
|
</div>
|
||||||
|
</motion.div>
|
||||||
|
);
|
||||||
|
};
|
||||||
13
frontend/constant/NavigationData.ts
Normal file
13
frontend/constant/NavigationData.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
export interface NavLink {
|
||||||
|
id: string;
|
||||||
|
label: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const navLinks: NavLink[] = [
|
||||||
|
{ id: 'services', label: 'Leistungen' },
|
||||||
|
{ id: 'about', label: 'Über uns' },
|
||||||
|
{ id: 'process', label: 'Ablauf' },
|
||||||
|
{ id: 'whyus', label: 'Warum wir' },
|
||||||
|
{ id: 'referral', label: 'Empfehlung' },
|
||||||
|
{ id: 'faq', label: 'FAQ' },
|
||||||
|
];
|
||||||
38
frontend/constant/ServicesData.ts
Normal file
38
frontend/constant/ServicesData.ts
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
export interface ServiceData {
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
bullets: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const servicesData: ServiceData[] = [
|
||||||
|
{
|
||||||
|
title: 'Webdesign',
|
||||||
|
description: 'Moderne Websites, die Vertrauen schaffen und verkaufen.',
|
||||||
|
bullets: [
|
||||||
|
'Maßgeschneidertes Design',
|
||||||
|
'Klare Struktur & überzeugende Inhalte',
|
||||||
|
'Nutzerführung mit System & Strategie',
|
||||||
|
'Für alle Geräte optimiert',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'App-Entwicklung',
|
||||||
|
description: 'Skalierbare Apps für Web und Mobile – von der Idee bis zum Launch.',
|
||||||
|
bullets: [
|
||||||
|
'Plattformübergreifend mit modernen Technologien',
|
||||||
|
'Backend & API-Entwicklung inklusive',
|
||||||
|
'Individuelle Funktionen & Logik',
|
||||||
|
'Stabil, performant & wartbar',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Interne Tools',
|
||||||
|
description: 'Digitale Werkzeuge, die Prozesse vereinfachen und Zeit sparen.',
|
||||||
|
bullets: [
|
||||||
|
'Prozessdigitalisierung & Automatisierung',
|
||||||
|
'Zugeschnitten auf eure Workflows',
|
||||||
|
'Skalierbar & zukunftssicher',
|
||||||
|
'Intuitiv & effizient bedienbar',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
11
frontend/hooks/useCookieSettings.ts
Normal file
11
frontend/hooks/useCookieSettings.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
|
export const useCookieSettings = () => {
|
||||||
|
const openCookieSettings = useCallback(() => {
|
||||||
|
window.dispatchEvent(new Event('show-cookie-banner'));
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return { openCookieSettings };
|
||||||
|
};
|
||||||
32
frontend/hooks/useScrollNavigation.ts
Normal file
32
frontend/hooks/useScrollNavigation.ts
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { usePathname, useRouter } from 'next/navigation';
|
||||||
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
|
export const useScrollNavigation = () => {
|
||||||
|
const pathname = usePathname();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const handleNavClick = useCallback((id: string) => {
|
||||||
|
if (typeof window === 'undefined') return;
|
||||||
|
|
||||||
|
if (pathname === '/') {
|
||||||
|
const el = document.getElementById(id);
|
||||||
|
if (el) {
|
||||||
|
el.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
localStorage.setItem('scrollToId', id);
|
||||||
|
router.push('/');
|
||||||
|
}
|
||||||
|
}, [pathname, router]);
|
||||||
|
|
||||||
|
const scrollToSection = useCallback((id: string) => {
|
||||||
|
const el = document.getElementById(id);
|
||||||
|
if (el) {
|
||||||
|
el.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return { handleNavClick, scrollToSection };
|
||||||
|
};
|
||||||
18
frontend/hooks/useScrollToSection.ts
Normal file
18
frontend/hooks/useScrollToSection.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
|
export const useScrollToSection = () => {
|
||||||
|
useEffect(() => {
|
||||||
|
const scrollToId = localStorage.getItem('scrollToId');
|
||||||
|
if (scrollToId) {
|
||||||
|
localStorage.removeItem('scrollToId');
|
||||||
|
const el = document.getElementById(scrollToId);
|
||||||
|
if (el) {
|
||||||
|
setTimeout(() => {
|
||||||
|
el.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user