From cd3726063c387066a7f3df400412c8f31d0b852b Mon Sep 17 00:00:00 2001 From: denshooter Date: Mon, 16 Feb 2026 01:03:36 +0100 Subject: [PATCH] style: refined bento layout and bio structure Improved About section with side-by-side bio and photo, removed row constraints to prevent text overlap, and added consistent spacing. --- app/components/About.tsx | 225 +++++++++++++++------------------------ 1 file changed, 83 insertions(+), 142 deletions(-) diff --git a/app/components/About.tsx b/app/components/About.tsx index e608fbe..f0633f5 100644 --- a/app/components/About.tsx +++ b/app/components/About.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import { BentoGrid, BentoGridItem } from "./ui/BentoGrid"; -import { Globe, Server, Wrench, Shield, Gamepad2, Code, Activity, Lightbulb, MapPin, User, BookOpen } from "lucide-react"; +import { Globe, Server, Wrench, Shield, Gamepad2, Code, Activity, Lightbulb, MapPin, User, BookOpen, ExternalLink } from "lucide-react"; import { useLocale, useTranslations } from "next-intl"; import type { JSONContent } from "@tiptap/react"; import RichTextClient from "./RichTextClient"; @@ -10,8 +10,8 @@ import CurrentlyReading from "./CurrentlyReading"; import ReadBooks from "./ReadBooks"; import { motion } from "framer-motion"; import { TechStackCategory, Hobby } from "@/lib/directus"; +import Image from "next/image"; -// Map icon names from Directus to Lucide components const iconMap: Record = { Globe, Server, Code, Wrench, Shield, Activity, Lightbulb, Gamepad2 }; @@ -20,191 +20,132 @@ const About = () => { const locale = useLocale(); const t = useTranslations("home.about"); const [cmsDoc, setCmsDoc] = useState(null); - - // Data State const [techStack, setTechStack] = useState([]); const [hobbies, setHobbies] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { const fetchData = async () => { - setLoading(true); try { const [cmsRes, techRes, hobbiesRes] = await Promise.all([ fetch(`/api/content/page?key=home-about&locale=${locale}`), fetch(`/api/tech-stack?locale=${locale}`), fetch(`/api/hobbies?locale=${locale}`) ]); - const cmsData = await cmsRes.json(); if (cmsData?.content?.content) setCmsDoc(cmsData.content.content as JSONContent); - const techData = await techRes.json(); if (techData?.techStack) setTechStack(techData.techStack); - const hobbiesData = await hobbiesRes.json(); if (hobbiesData?.hobbies) setHobbies(hobbiesData.hobbies); } catch (error) { - console.error("Error fetching about data:", error); + console.error(error); } finally { setLoading(false); } }; - fetchData(); }, [locale]); return ( -
- {/* Background Decor */} -
-
- -
- - {t("title")} - -
- - - - {/* 1. Bio (2x2) */} - - - Dennis Konkol +
+
+
+ + {/* 1. Main Bio & Photo - The big anchor */} +
+
+
+
+ Dennis Konkol +
- } - description={ -
- {cmsDoc ? ( - - ) : ( -

- {t("p1")} {t("p2")} {t("p3")} -

- )} +
+
+ Who am I +
+

+ Hi, I'm Dennis. +

+
+ {cmsDoc ? :

{t("p1")} {t("p2")}

} +
- } - header={ -
- -
-
-
- Available for hire -
-
-
- } - /> +
- {/* 2. Tech Stack */} - - {techStack && techStack.length > 0 ? ( + {/* 2. Status & Location */} +
+
+ +
+
+

Osnabrück

+

Germany, UTC+1

+
+
+
+ Available Now +
+
+ + {/* 3. Tech Stack - Bento wide */} +
+
+

+ {t("techStackTitle")} +

+
+
+ {techStack.length > 0 ? ( techStack.flatMap(cat => cat.items?.map((item: any) => ( - + {item.name} - + ))) ) : ( -
- {[1,2,3,4,5,6].map(i =>
)} -
+
)}
- } - icon={} - /> +
- {/* 3. Location */} - } - header={ -
-
-
-
-
- 52.27° N, 8.04° E -
-
+ {/* 4. Reading Log - Compact but visual */} +
+
+ +

Reading

- } - /> - - {/* 4. Currently Reading & Reviews (Long) */} - -
- Reading Log -
-
- -
- -
-
+
+ +
- } - /> +
- {/* 5. Hobbies (Wide) */} - - {hobbies && hobbies.length > 0 ? hobbies.map((hobby, i) => { + {/* 5. Hobbies - Small box */} +
+
+ {hobbies.slice(0, 4).map((hobby) => { const Icon = iconMap[hobby.icon] || Lightbulb; return ( - - - {hobby.title} - +
+ +
) - }) : ( - [1,2,3,4].map(i =>
) - )} + })}
- } - icon={} - /> +
+

{t("hobbiesTitle")}

+

Exploration & Fun

+
+
- +
+
); };