diff --git a/components/ProjectsList.js b/components/ProjectsList.js new file mode 100644 index 0000000..ca323f1 --- /dev/null +++ b/components/ProjectsList.js @@ -0,0 +1,46 @@ +import Link from "next/link"; +import projects from "../db/projects"; +import styles from "./ProjectsList.module.css"; + +export default function ProjectsList() { + const mediaProjects = projects.filter((project) => { + return project.category === "Media"; + }); + const designProjects = projects.filter((project) => { + return project.category === "Design"; + }); + + return ( +
+
+

Media

+
+ {mediaProjects.map((project) => ( +
+

{project.name}

+

{project.description}

+
+ View +
+
+ ))} +
+
+ +
+

Design

+
+ {designProjects.map((project) => ( +
+

{project.name}

+

{project.description}

+
+ View +
+
+ ))} +
+
+
+ ); +} diff --git a/pages/projects.module.css b/components/ProjectsList.module.css similarity index 100% rename from pages/projects.module.css rename to components/ProjectsList.module.css diff --git a/db/projects.js b/db/projects.js index 1b4be3b..3e2b68e 100644 --- a/db/projects.js +++ b/db/projects.js @@ -1,13 +1,21 @@ const projects = [ { - slug: "farmers-market", - name: "Farmer's market", - description: "Buy some fruits and vegetables", + slug: "glass-slide-digitization", + name: "Glass Slide Digitization", + description: "Digitized some glass slides", + category: "Media", }, { - slug: "chess", - name: "Chess", - description: "Play chess online", + slug: "35mm-slide-digitization", + name: "35mm Slide Digitization", + description: "Digitized some 35mm slides", + category: "Media", + }, + { + slug: "neighborhood-organization-logo", + name: "Neighborhood Organization Logo", + description: "Design logo for Neighborhood Organization", + category: "Design", }, ]; diff --git a/pages/index.js b/pages/index.js index 8387fc1..47f5b6f 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,6 +1,7 @@ import Head from "next/head"; import Navigation from "@components/Navigation"; import Footer from "@components/Footer"; +import ProjectsList from "@components/ProjectsList"; export default function Home() { return ( @@ -16,6 +17,8 @@ export default function Home() {

Welcome to my portfolio

This is the home page

+ +