From 3c020928b3ee688eb27ab40dda345b330c9baa9d Mon Sep 17 00:00:00 2001 From: Space-Banane Date: Sun, 12 Apr 2026 17:04:49 +0200 Subject: [PATCH] feat: add TypingRoomIntro component and integrate it into Home page --- src/app/page.tsx | 179 ++++++++++++----------- src/components/TypingRoomIntro.tsx | 220 +++++++++++++++++++++++++++++ src/context/ProfileContext.tsx | 23 ++- 3 files changed, 328 insertions(+), 94 deletions(-) create mode 100644 src/components/TypingRoomIntro.tsx diff --git a/src/app/page.tsx b/src/app/page.tsx index 36246d7..c4f56c7 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,7 +11,8 @@ import { MiniProjectModal } from "../components/MiniProjectModal"; import { Navbar } from "../components/Navbar"; import { Footer } from "../sections/Footer"; import { TechStack } from "../sections/TechStack"; -import { useState } from "react"; +import { TypingRoomIntro } from "../components/TypingRoomIntro"; +import { useCallback, useEffect, useState } from "react"; import type { Experience } from "../types"; export default function Home() { @@ -24,12 +25,21 @@ export default function Home() { } = useProfile(); const [showOldNames, setShowOldNames] = useState(false); + const [showTypingIntro, setShowTypingIntro] = useState(true); const oldUsernames = [ "getspaced (ingame)", "Space (alternative)", "Space-Banane (2022-2024)", ]; + useEffect(() => { + // keep intro visible on every full page load; no-op here + }, []); + + const handleIntroFinish = useCallback(() => { + setShowTypingIntro(false); + }, []); + const groupedExperiences = experiences.reduce( (acc, exp) => { if (!acc[exp.type]) acc[exp.type] = []; @@ -41,95 +51,100 @@ export default function Home() { return ( <> - -
- + + {!showTypingIntro && ( + <> + +
+ - + - + -
-
-

- Featured Projects -

-

- A selection of my personal favorites. Many more on my GitHub. -

-
-
- {projects.map((project, index) => ( - - ))} -
-
- -
-
-

More Projects

-

Smaller projects or tools I've built.

-
-
- {miniProjects.map((project, index) => ( - setSelectedMiniProject(project)} - /> - ))} -
-
- -
-
-

Skills & Experience

-

Things I've worked with over the years.

-
-
- {Object.entries(groupedExperiences).map(([type, items]) => ( -
-

- {type} -

-
- {items.map((exp, index) => ( - setSelectedExperience(exp)} - /> - ))} -
+
+
+

+ Featured Projects +

+

+ A selection of my personal favorites. Many more on my GitHub. +

- ))} +
+ {projects.map((project, index) => ( + + ))} +
+
+ +
+
+

More Projects

+

Smaller projects or tools I've built.

+
+
+ {miniProjects.map((project, index) => ( + setSelectedMiniProject(project)} + /> + ))} +
+
+ +
+
+

Skills & Experience

+

Things I've worked with over the years.

+
+
+ {Object.entries(groupedExperiences).map(([type, items]) => ( +
+

+ {type} +

+
+ {items.map((exp, index) => ( + setSelectedExperience(exp)} + /> + ))} +
+
+ ))} +
+
-
-
-