diff --git a/.prettierrc b/.prettierrc index 17ec621..5fe2828 100644 --- a/.prettierrc +++ b/.prettierrc @@ -11,7 +11,6 @@ "requirePragma": false, "insertPragma": false, "proseWrap": "preserve", - "parser": "babel", "overrides": [ { "files": "*.js", diff --git a/components/FeaturedProject.module.scss b/components/FeaturedProject.module.scss new file mode 100644 index 0000000..e69de29 diff --git a/components/FeaturedProject.tsx b/components/FeaturedProject.tsx new file mode 100644 index 0000000..0055697 --- /dev/null +++ b/components/FeaturedProject.tsx @@ -0,0 +1,28 @@ +import { Image } from './Image'; +import styles from '@components/FeaturedProject.module.scss'; + +export interface FeaturedProjectProps { + title: string; + image: any; //to do create a global image type that can be reused + href: string; + caption: string; +} + +function FeaturedProject({ title, image, href, caption }: FeaturedProjectProps) { + console.log(image); + return ( +
+ +

{title}

+

+ + Source + +

+ +

{caption}

+
+ ); +} + +export default FeaturedProject; diff --git a/components/Image.tsx b/components/Image.tsx new file mode 100644 index 0000000..ade32f0 --- /dev/null +++ b/components/Image.tsx @@ -0,0 +1,19 @@ +import NextImage from 'next/image'; + +export function Image({ image, layout, props }: any) { + //to do : add a placeholder image if src is undefined + const { altText, height, src, width } = image; + + return ( + + ); +} diff --git a/components/Video.tsx b/components/Video.tsx new file mode 100644 index 0000000..c927082 --- /dev/null +++ b/components/Video.tsx @@ -0,0 +1,44 @@ +import * as React from 'react'; + +export const enum VIDEO_FORMAT_ENUM { + IFRAME = 'iframe', + VIDEO = 'video', +} + +export default function Video({ src, title, format }) { + switch (format) { + case VIDEO_FORMAT_ENUM.VIDEO: + return ( + + ); + // case VIDEO_FORMAT_ENUM.IFRAME: + // return ( + //