-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9323e6c
commit b161931
Showing
10 changed files
with
455 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default function ProjectCard({ | ||
name, | ||
description, | ||
image, | ||
link, | ||
tags, | ||
...props | ||
}: { name: string; description: string; image: string; link: string; tags: string[] }) { | ||
return ( | ||
<div className="flex flex-col"> | ||
<h2>{name}</h2> | ||
<p>{description}</p> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import Bounded from "@/components/bounded"; | ||
import { Content } from "@prismicio/client"; | ||
import { PrismicNextImage, PrismicNextLink } from "@prismicio/next"; | ||
import { SliceComponentProps } from "@prismicio/react"; | ||
|
||
/** | ||
* Props for `Projects`. | ||
*/ | ||
export type ProjectsProps = SliceComponentProps<Content.ProjectsSlice>; | ||
|
||
/** | ||
* Component for "Projects" Slices. | ||
*/ | ||
const Projects = ({ slice }: ProjectsProps): JSX.Element => { | ||
return ( | ||
<Bounded | ||
data-slice-type={slice.slice_type} | ||
data-slice-variation={slice.variation} | ||
className="py-0 lg:py-0 md:py-0" | ||
> | ||
<h2 className="text-4xl font-bold mb-8">Projects</h2> | ||
<div className="grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-3"> | ||
{slice.items.map((item) => ( | ||
<div | ||
key={item.name} | ||
className="group flex flex-col aspect-[16/9] w-64 bg-slate-200 rounded-md relative overflow-hidden hover:shadow-lg hover:shadow-white/10 transition-shadow duration-300 cursor-pointer" | ||
> | ||
<PrismicNextLink | ||
field={item.link} | ||
className="absolute z-10 p-4 h-full flex flex-col justify-end" | ||
> | ||
<h3 className="text-3xl font-medium">{item.name}</h3> | ||
</PrismicNextLink> | ||
<PrismicNextImage | ||
className="absolute inset-0 w-full h-full object-cover" | ||
field={item.image} | ||
/> | ||
<div className="absolute inset-0 bg-gradient-to-t from-black from-20% to-transparent opacity-60 group-hover:opacity-70 transition-opacity duration-300 h-full" /> | ||
</div> | ||
))} | ||
</div> | ||
</Bounded> | ||
); | ||
}; | ||
|
||
export default Projects; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[ | ||
{ | ||
"__TYPE__": "SharedSliceContent", | ||
"variation": "default", | ||
"primary": {}, | ||
"items": [ | ||
{ | ||
"__TYPE__": "GroupItemContent", | ||
"value": [ | ||
[ | ||
"name", | ||
{ | ||
"__TYPE__": "FieldContent", | ||
"value": "engineer", | ||
"type": "Text" | ||
} | ||
], | ||
[ | ||
"link", | ||
{ | ||
"__TYPE__": "LinkContent", | ||
"value": { | ||
"__TYPE__": "ExternalLink", | ||
"url": "http://google.com" | ||
} | ||
} | ||
], | ||
[ | ||
"image", | ||
{ | ||
"origin": { | ||
"id": "main", | ||
"url": "https://images.unsplash.com/photo-1596195689404-24d8a8d1c6ea", | ||
"width": 5000, | ||
"height": 4613 | ||
}, | ||
"url": "https://images.unsplash.com/photo-1596195689404-24d8a8d1c6ea", | ||
"width": 5000, | ||
"height": 4613, | ||
"edit": { | ||
"zoom": 1, | ||
"crop": { | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"background": "transparent" | ||
}, | ||
"credits": null, | ||
"alt": null, | ||
"__TYPE__": "ImageContent", | ||
"thumbnails": {} | ||
} | ||
] | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"id": "projects", | ||
"type": "SharedSlice", | ||
"name": "Projects", | ||
"description": "Projects", | ||
"variations": [ | ||
{ | ||
"id": "default", | ||
"name": "Default", | ||
"docURL": "...", | ||
"version": "initial", | ||
"description": "Default", | ||
"imageUrl": "", | ||
"primary": {}, | ||
"items": { | ||
"name": { | ||
"type": "Text", | ||
"config": { | ||
"label": "Name", | ||
"placeholder": "" | ||
} | ||
}, | ||
"link": { | ||
"type": "Link", | ||
"config": { | ||
"label": "Link", | ||
"placeholder": "", | ||
"select": null | ||
} | ||
}, | ||
"image": { | ||
"type": "Image", | ||
"config": { | ||
"label": "Image", | ||
"constraint": {}, | ||
"thumbnails": [] | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.