From 946bc5f6e65fad245cb62af709bd9ff6ad7170db Mon Sep 17 00:00:00 2001 From: Guus van Meerveld Date: Sat, 9 Mar 2024 17:24:56 +0100 Subject: [PATCH] started work on page footer --- data/landing.json | 23 ++++++++++--------- src/app/(landing)/Header.tsx | 24 +++++++++---------- src/app/(landing)/page.tsx | 4 +++- src/app/Footer.tsx | 12 ++++++++++ src/app/ThemeSwitcher.tsx | 37 ++++++++++++++++++++++++++++++ src/app/error.tsx | 14 ++++++----- src/app/layout.tsx | 3 ++- src/app/providers.tsx | 14 ++++++++--- src/models/footer.ts | 7 ++++++ src/models/{owner.ts => header.ts} | 6 ++--- src/models/landing.ts | 6 +++-- src/styles/global.scss | 20 ---------------- src/typings/component.ts | 2 +- src/utils/constants.ts | 2 -- 14 files changed, 112 insertions(+), 62 deletions(-) create mode 100644 src/app/Footer.tsx create mode 100644 src/app/ThemeSwitcher.tsx create mode 100644 src/models/footer.ts rename src/models/{owner.ts => header.ts} (64%) diff --git a/data/landing.json b/data/landing.json index 1561195..ea1644d 100644 --- a/data/landing.json +++ b/data/landing.json @@ -1,12 +1,13 @@ { - "owner": { - "fullName": "Guus van Meerveld", - "name": "guus", - "description": "AI student at Radboud University. Creating software as a hobby.", - "contact": { - "email": "contact@guusvanmeerveld.dev", - "git": "https://github.com/Guusvanmeerveld", - "linkedin": "https://linkedin.com/in/guus-van-meerveld-038357210" - } - } -} \ No newline at end of file + "header": { + "fullName": "Guus van Meerveld", + "name": "guus", + "description": "AI student at Radboud University. Creating software as a hobby.", + "contact": { + "email": "contact@guusvanmeerveld.dev", + "git": "https://github.com/Guusvanmeerveld", + "linkedin": "https://linkedin.com/in/guus-van-meerveld-038357210" + } + }, + "footer": {} +} diff --git a/src/app/(landing)/Header.tsx b/src/app/(landing)/Header.tsx index 8b8736e..7da1795 100644 --- a/src/app/(landing)/Header.tsx +++ b/src/app/(landing)/Header.tsx @@ -10,45 +10,45 @@ import Link from "next/link"; import { useMemo } from "react"; import { FiGithub, FiMail, FiLinkedin } from "react-icons/fi"; -import Owner from "@models/owner"; +import HeaderProps from "@models/header"; -export const Header: Component<{ owner: Owner }> = ({ owner }) => { +export const Header: Component<{ header: HeaderProps }> = ({ header }) => { const socials = useMemo( () => [ { - link: `mailto:${owner.contact.email}`, + link: `mailto:${header.contact.email}`, name: "Email address", icon: }, { - link: owner.contact.git, + link: header.contact.git, name: "Github", icon: }, { - link: owner.contact.linkedin, + link: header.contact.linkedin, name: "LinkedIn", icon: } ], - [owner.contact] + [header.contact] ); return ( -
+
- {owner.avatar !== undefined && ( + {header.avatar !== undefined && ( {`A )} -

{owner.fullName}

+

{header.fullName}

-

{owner.description}

+

{header.description}

{socials.map((social) => ( diff --git a/src/app/(landing)/page.tsx b/src/app/(landing)/page.tsx index 5633c0e..167ed91 100644 --- a/src/app/(landing)/page.tsx +++ b/src/app/(landing)/page.tsx @@ -1,3 +1,4 @@ +import { Footer } from "../Footer"; import { Header } from "./Header"; import Landing from "@models/landing"; @@ -15,7 +16,8 @@ export default async function Page() { return ( <> -
+
+