From 8f738b0ad249cd8dd673ad58ba58742f8882bb55 Mon Sep 17 00:00:00 2001 From: Zeke Abshire Date: Thu, 11 May 2023 12:28:16 -0500 Subject: [PATCH] Partially implemented the projects section --- next.config.mjs | 10 ++++++++ src/components/Polaroid.tsx | 27 +++++++++++++++++++++ src/components/ProjectDescription.tsx | 26 ++++++++++++++++++++ src/constants/projects.ts | 29 +++++++++++++++++++++++ src/pages/index.tsx | 34 +++++++++++++++++++++++++-- 5 files changed, 124 insertions(+), 2 deletions(-) create mode 100644 src/components/Polaroid.tsx create mode 100644 src/components/ProjectDescription.tsx create mode 100644 src/constants/projects.ts diff --git a/next.config.mjs b/next.config.mjs index d921057..4753f8f 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -7,6 +7,16 @@ await import("./src/env.mjs"); /** @type {import("next").NextConfig} */ const config = { reactStrictMode: true, + images: { + remotePatterns: [ + { + protocol: "https", + hostname: "picsum.photos", + port: "", + pathname: "/**", + }, + ], + }, /** * If you have `experimental: { appDir: true }` set, then you must comment the below `i18n` config diff --git a/src/components/Polaroid.tsx b/src/components/Polaroid.tsx new file mode 100644 index 0000000..6b2aa07 --- /dev/null +++ b/src/components/Polaroid.tsx @@ -0,0 +1,27 @@ +import Image from "next/image"; + +export interface Props { + title: string; + imageSrc: string; + rotation: string; +} + +export const Polaroid: React.FC = ({ title, imageSrc, rotation }) => { + return ( +
+
+
+ {`Showcase +
+ {title} +
+
+ ); +}; diff --git a/src/components/ProjectDescription.tsx b/src/components/ProjectDescription.tsx new file mode 100644 index 0000000..c04dda8 --- /dev/null +++ b/src/components/ProjectDescription.tsx @@ -0,0 +1,26 @@ +import * as Separator from "@radix-ui/react-separator"; + +export interface Props { + title: string; + color: string; + children?: React.ReactNode; +} + +export const ProjectDescription: React.FC = ({ + title, + color, + children, +}) => { + return ( +
+

{title}

+ +

+ {children} +

+
+ ); +}; diff --git a/src/constants/projects.ts b/src/constants/projects.ts new file mode 100644 index 0000000..a3b6419 --- /dev/null +++ b/src/constants/projects.ts @@ -0,0 +1,29 @@ +import type { Props as PolaroidProps } from "~/components/Polaroid"; +import type { Props as ProjectDescriptionProps } from "~/components/ProjectDescription"; + +export const projects: Array = [ + { + title: "Parallel", + color: "bg-orange", + imageSrc: "https://unsplash.com/photos/OqtafYT5kTw", + rotation: "-rotate-12", + children: + "We started Parallel to help connect educators with content creators to make it easier to create high-quality educational content for platforms like YouTube. We built the platform with high performance, scalability, and accessibility in mind. That's why we chose powerful tools like Next.js, TailwindCSS, RadixUI, Prisma, PlanetScale, and Vercel's hosting platform. ", + }, + { + title: "DropNote", + color: "bg-yellow", + imageSrc: "", + rotation: "rotate-6", + children: + "We started Parallel to help connect educators with content creators to make it easier to create high-quality educational content for platforms like YouTube. We built the platform with high performance, scalability, and accessibility in mind. That's why we chose powerful tools like Next.js, TailwindCSS, RadixUI, Prisma, PlanetScale, and Vercel's hosting platform. ", + }, + { + title: "Flurry", + color: "bg-green", + imageSrc: "", + rotation: "-rotate-3", + children: + "We started Parallel to help connect educators with content creators to make it easier to create high-quality educational content for platforms like YouTube. We built the platform with high performance, scalability, and accessibility in mind. That's why we chose powerful tools like Next.js, TailwindCSS, RadixUI, Prisma, PlanetScale, and Vercel's hosting platform. ", + }, +]; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index b9a6781..f3731fe 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,5 +1,8 @@ import { type NextPage } from "next"; import Head from "next/head"; +import { Polaroid } from "~/components/Polaroid"; +import { ProjectDescription } from "~/components/ProjectDescription"; +import { projects } from "~/constants/projects"; const Home: NextPage = () => { return ( @@ -12,7 +15,7 @@ const Home: NextPage = () => { <> {/* */} - {/* */} + {/* */} {/* */} @@ -35,7 +38,34 @@ const Hero = () => { ); }; + // const Services = () => {} -// const Projects = () => {} + +const Projects = () => { + return ( +
+ {projects.map((p) => ( +
+
+ +
+
+ + {p.children} + +
+
+ ))} +
+ ); +}; + // const About = () => {} // const Contact = () => {}