diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b617ff2..7d9533b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,20 +4,11 @@ - - - - - - - - + - - - + @@ -125,7 +116,7 @@ - + @@ -151,7 +142,15 @@ 1742461342755 - + + + 1743068701470 + + + + 1743068701470 + + @@ -160,6 +159,7 @@ - + + \ No newline at end of file diff --git a/src/app/layout.js b/src/app/layout.js index 0c1e1f1..1d5218e 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -5,9 +5,35 @@ import Link from "next/link"; import {ThemeProvider} from "@/components/theme-provider"; import {ModeToggle} from "@/components/mode-toggle"; import Burger from "@/components/burger"; +import {usePathname} from "next/navigation"; export default function RootLayout({children}) { + const pathname = usePathname(); + const getTitle = () => { + switch (pathname) { + case "/": + return "Kristians Portfolio"; + case "/about": + return "About"; + case "/projects": + return "Projects"; + case "/me": + return "About me"; + case "/contact": + return "Contact"; + case "/projects/roboxers": + return "Roboxers"; + case "/projects/nuclear-age": + return "Nuclear Age Mod"; + case "/projects/porsche": + return "Wirtschaftsgeschichte von Porsche"; + case "/privacy": + return "Privacy Policy"; + default: + return "Kristians Portfolio"; + } + }; return ( - + - Kristians Portfolio + {getTitle()} - + {children}