Add dynamic page titles and update project routing

This commit is contained in:
IM23a-cernik
2025-05-22 10:51:07 +02:00
parent 56ec7bad98
commit f4d2165ef7
3 changed files with 23 additions and 7 deletions
+14 -6
View File
@@ -4,9 +4,8 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="15d653a3-00a9-440e-a365-0d5dba6a77a9" name="Changes" comment="Added new project links for Stalinium Mod and Portfolio; updated About page content"> <list default="true" id="15d653a3-00a9-440e-a365-0d5dba6a77a9" name="Changes" comment="Added Kotlin">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/app/layout.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/layout.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/app/page.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/page.js" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -144,7 +143,7 @@
<workItem from="1747212060956" duration="11000" /> <workItem from="1747212060956" duration="11000" />
<workItem from="1747212107053" duration="3000" /> <workItem from="1747212107053" duration="3000" />
<workItem from="1747290521182" duration="4840000" /> <workItem from="1747290521182" duration="4840000" />
<workItem from="1747895515224" duration="6418000" /> <workItem from="1747895515224" duration="6714000" />
</task> </task>
<task id="LOCAL-00001" summary="created a base layout"> <task id="LOCAL-00001" summary="created a base layout">
<option name="closed" value="true" /> <option name="closed" value="true" />
@@ -258,7 +257,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1747900931361</updated> <updated>1747900931361</updated>
</task> </task>
<option name="localTasksCounter" value="15" /> <task id="LOCAL-00015" summary="Added Kotlin">
<option name="closed" value="true" />
<created>1747903299068</created>
<option name="number" value="00015" />
<option name="presentableId" value="LOCAL-00015" />
<option name="project" value="LOCAL" />
<updated>1747903299068</updated>
</task>
<option name="localTasksCounter" value="16" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@@ -278,6 +285,7 @@
<MESSAGE value="Fixed a mobile sizing issue" /> <MESSAGE value="Fixed a mobile sizing issue" />
<MESSAGE value="Changed a project name" /> <MESSAGE value="Changed a project name" />
<MESSAGE value="Added new project links for Stalinium Mod and Portfolio; updated About page content" /> <MESSAGE value="Added new project links for Stalinium Mod and Portfolio; updated About page content" />
<option name="LAST_COMMIT_MESSAGE" value="Added new project links for Stalinium Mod and Portfolio; updated About page content" /> <MESSAGE value="Added Kotlin" />
<option name="LAST_COMMIT_MESSAGE" value="Added Kotlin" />
</component> </component>
</project> </project>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+9 -1
View File
@@ -6,6 +6,7 @@ import {ThemeProvider} from "@/components/theme-provider";
import {ModeToggle} from "@/components/mode-toggle"; import {ModeToggle} from "@/components/mode-toggle";
import Burger from "@/components/burger"; import Burger from "@/components/burger";
import {usePathname} from "next/navigation"; import {usePathname} from "next/navigation";
import Head from "next/head";
export default function RootLayout({children}) { export default function RootLayout({children}) {
@@ -23,7 +24,11 @@ export default function RootLayout({children}) {
case "/contact": case "/contact":
return "Contact"; return "Contact";
case "/projects/gambling": case "/projects/gambling":
return "Roboxers"; return "Gambling API";
case "/projects/stalinium":
return "Stalinium";
case "/projects/portfolio":
return "Portfolio";
case "/projects/nuclear-age": case "/projects/nuclear-age":
return "Nuclear Age Mod"; return "Nuclear Age Mod";
case "/projects/porsche": case "/projects/porsche":
@@ -36,6 +41,9 @@ export default function RootLayout({children}) {
}; };
return ( return (
<html lang="en" suppressHydrationWarning> <html lang="en" suppressHydrationWarning>
<Head>
<title>{getTitle()}</title>
</Head>
<body <body
className={"text-emerald-800 dark:text-emerald-300 bg-gradient-to-tr dark:from-black dark:via-emerald-800 dark:to-black from-gray-300 via-emerald-100 to-gray-300"}> className={"text-emerald-800 dark:text-emerald-300 bg-gradient-to-tr dark:from-black dark:via-emerald-800 dark:to-black from-gray-300 via-emerald-100 to-gray-300"}>
<ThemeProvider <ThemeProvider