Added "Services" page & refactor layout structure

- Introduced a new Services component with basic setup.
- Updated layout files to ensure consistent global styling references.
- Enhanced Navbar with pathname detection for active link styling.
- Fixed navigation link URL for "Leistungen" in constants.
This commit is contained in:
2025-04-08 22:57:58 +02:00
parent 493d5bcfa2
commit 6535bf37ec
8 changed files with 58 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
"use client";
import {usePathname} from "next/navigation";
import {navLinks} from "@/constant/Constant";
import Link from "next/link";
import React, {useContext, useEffect, useState} from "react";
@@ -18,6 +19,7 @@ const Nav = ({openNav}: Props) => {
const [buttonSize, setButtonSize] = useState("md:px-6 md:py-2 px-4 py-1 text-sm");
const {theme, toggleTheme} = useContext(ThemeContext);
const colors = themeColors[theme];
const pathname = usePathname();
const navColorClass = theme === "dark" || !navBg ? "text-white" : "text-black";
@@ -61,8 +63,11 @@ const Nav = ({openNav}: Props) => {
{navLinks.map((link) => (
<Link href={link.url} key={link.id}>
<p
className={`nav_link ${contentSize} ${navColorClass} transition-all duration-300 ease-in-out uppercase font-semibold`}
>
className={`nav_link ${contentSize} uppercase transition-all duration-300 ease-in-out ${
pathname === link.url
? "text-white font-bold"
: "text-gray-300 font-medium"
}`}>
{link.label}
</p>
</Link>