From a16fca25d9d77230dcc8406edcac645bcd9b8cc2 Mon Sep 17 00:00:00 2001 From: Guus van Meerveld Date: Sat, 9 Mar 2024 22:07:16 +0100 Subject: [PATCH] added projects to landing page --- data/landing.json | 20 +++++++++++++ src/app/(landing)/Header.tsx | 1 + src/app/(landing)/Projects.tsx | 55 ++++++++++++++++++++++++++++++++++ src/app/(landing)/page.tsx | 2 ++ src/app/Footer.tsx | 3 +- src/models/landing.ts | 2 ++ src/models/project.ts | 12 ++++++++ 7 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 src/app/(landing)/Projects.tsx create mode 100644 src/models/project.ts diff --git a/data/landing.json b/data/landing.json index ed60279..f7df63a 100644 --- a/data/landing.json +++ b/data/landing.json @@ -9,6 +9,26 @@ "linkedin": "https://linkedin.com/in/guus-van-meerveld-038357210" } }, + "projects": [ + { + "name": "Dust-Mail", + "avatarUrl": "https://avatars.githubusercontent.com/u/130915639?s=200&v=4", + "description": "Dust-Mail is a free and open source project that aims to replace all desktop and web email clients by providing a fast and simple experience.", + "url": "https://github.com/Dust-Mail/" + }, + { + "name": "Argo-Client", + "avatarUrl": "https://avatars.githubusercontent.com/u/71986232?s=200&v=4", + "description": "Argo is a modern client for Magister 6 that is available for Android and IOS.", + "url": "https://argo-magister.nl" + }, + { + "name": "MaterialTube", + "avatarUrl": "https://raw.githubusercontent.com/Guusvanmeerveld/MaterialTube/master/src/svg/logo.svg", + "description": "MaterialTube is a beautiful and elegant web client for Invidious servers, built using Next.js and MUI.", + "url": "https://github.com/Guusvanmeerveld/MaterialTube" + } + ], "footer": { "columns": [ { diff --git a/src/app/(landing)/Header.tsx b/src/app/(landing)/Header.tsx index 5872cf2..7740c86 100644 --- a/src/app/(landing)/Header.tsx +++ b/src/app/(landing)/Header.tsx @@ -67,6 +67,7 @@ export const Header: Component<{ data: HeaderProps; avatar: string }> = ({ as={Link} className="text-2xl mr-4" color="primary" + variant="shadow" isIconOnly aria-label={social.name} > diff --git a/src/app/(landing)/Projects.tsx b/src/app/(landing)/Projects.tsx new file mode 100644 index 0000000..86c49ba --- /dev/null +++ b/src/app/(landing)/Projects.tsx @@ -0,0 +1,55 @@ +"use client"; + +import { Card, CardHeader, CardBody, CardFooter } from "@nextui-org/card"; +import { Divider } from "@nextui-org/divider"; +import { Image } from "@nextui-org/image"; +import { Link } from "@nextui-org/link"; +import { Spacer } from "@nextui-org/spacer"; +import { Component } from "@typings/component"; + +import ProjectProps from "@models/project"; + +export const Projects: Component<{ data: ProjectProps[] }> = ({ data }) => { + return ( + <> +
+

Projects

+ +
+ {data.map((project) => { + const url = new URL(project.url); + + return ( + + + {`${project.name} +
+

{project.name}

+

{url.host}

+
+
+ + +

{project.description}

+
+ + + + Visit the project. + + +
+ ); + })} +
+
+ + + ); +}; diff --git a/src/app/(landing)/page.tsx b/src/app/(landing)/page.tsx index 7e18f06..9d7dd0d 100644 --- a/src/app/(landing)/page.tsx +++ b/src/app/(landing)/page.tsx @@ -1,5 +1,6 @@ import { Footer } from "../Footer"; import { Header } from "./Header"; +import { Projects } from "./Projects"; import { dataDirLocation } from "@utils/constants"; import { readAvatarFile, readLandingJson } from "@utils/landing"; @@ -12,6 +13,7 @@ export default async function Page() { return ( <>
+