From 6535bf37eccbcc99d5fd93ded11e46f7c3c270eb Mon Sep 17 00:00:00 2001 From: Thatsaphorn Atchariyaphap Date: Tue, 8 Apr 2025 22:57:58 +0200 Subject: [PATCH] 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. --- app/(root)/layout.tsx | 2 +- app/contact/layout.tsx | 2 +- app/{(root) => }/globals.css | 0 app/legal/layout.tsx | 2 +- app/services/layout.tsx | 35 ++++++++++++++++++++++++++++++++ app/services/page.tsx | 12 +++++++++++ components/Navbar/DesktopNav.tsx | 9 ++++++-- constant/Constant.ts | 2 +- 8 files changed, 58 insertions(+), 6 deletions(-) rename app/{(root) => }/globals.css (100%) create mode 100644 app/services/layout.tsx create mode 100644 app/services/page.tsx diff --git a/app/(root)/layout.tsx b/app/(root)/layout.tsx index 76a8669..99a74fe 100644 --- a/app/(root)/layout.tsx +++ b/app/(root)/layout.tsx @@ -1,5 +1,5 @@ import type {Metadata} from "next"; -import "./globals.css"; +import "../globals.css"; import Nav from "@/components/Navbar/Nav"; import Footer from "@/components/Home/Footer/Footer"; diff --git a/app/contact/layout.tsx b/app/contact/layout.tsx index b274b97..99a74fe 100644 --- a/app/contact/layout.tsx +++ b/app/contact/layout.tsx @@ -1,5 +1,5 @@ import type {Metadata} from "next"; -import "../(root)/globals.css"; +import "../globals.css"; import Nav from "@/components/Navbar/Nav"; import Footer from "@/components/Home/Footer/Footer"; diff --git a/app/(root)/globals.css b/app/globals.css similarity index 100% rename from app/(root)/globals.css rename to app/globals.css diff --git a/app/legal/layout.tsx b/app/legal/layout.tsx index b274b97..99a74fe 100644 --- a/app/legal/layout.tsx +++ b/app/legal/layout.tsx @@ -1,5 +1,5 @@ import type {Metadata} from "next"; -import "../(root)/globals.css"; +import "../globals.css"; import Nav from "@/components/Navbar/Nav"; import Footer from "@/components/Home/Footer/Footer"; diff --git a/app/services/layout.tsx b/app/services/layout.tsx new file mode 100644 index 0000000..99a74fe --- /dev/null +++ b/app/services/layout.tsx @@ -0,0 +1,35 @@ +import type {Metadata} from "next"; +import "../globals.css"; + +import Nav from "@/components/Navbar/Nav"; +import Footer from "@/components/Home/Footer/Footer"; +import {ThemeProvider} from "@/components/provider/ThemeProvider"; +import React from "react"; +import {cookies} from "next/headers"; + +export const metadata: Metadata = { + title: "Rhein Software", + description: "Rhein Software Development", +}; + +export default async function RootLayout({ + children, + }: Readonly<{ + children: React.ReactNode; +}>) { + const cookieStore = await cookies(); + const theme = cookieStore.get("theme")?.value === "dark" ? "dark" : "light"; + + return ( + + + + +