Skip to content

Commit

Permalink
Merge branch 'main' into nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
AnsellMaximilian committed Nov 21, 2023
2 parents 842f9a0 + 9981f0e commit c1e7832
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,17 @@ export default async function Home() {
<Link
href={`/projects/${project.slug}`}
key={project._id}
className="col-span-12 lg:col-span-6 xl:col-span-4 overflow-hidden rounded shadow-md hover:scale-105 transition-all duration-100 max-w-full"
className="col-span-12 lg:col-span-6 xl:col-span-4 overflow-hidden rounded shadow-md hover:scale-105 transition-all duration-100 max-w-full group relative"
>
{/* <h3>{project.name}</h3> */}
<div className="flex items-center justify-center opacity-0 group-hover:opacity-100 bg-[rgba(0,0,0,0.8)] text-white absolute inset-0 transition-all duration-200">
<div className="p-4 text-center">
<h3 className="font-semibold text-xl">
{project.name}
</h3>
<p>{project.shortDescription}</p>
</div>
</div>
<Image
src={project.image}
alt={project.name}
Expand Down
6 changes: 6 additions & 0 deletions sanity/schemas/project-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type Project = {
slug: string;
content: PortableTextBlock[];
description: string;
shortDescription: string;
skills: Skill[];
screenshots?: ProjectScreenshot[];
};
Expand Down Expand Up @@ -83,6 +84,11 @@ const project = {
title: "Description",
type: "string",
},
{
name: "shortDescription",
title: "Short Description",
type: "string",
},
{
name: "featured",
title: "Featured",
Expand Down
4 changes: 3 additions & 1 deletion sanity/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export async function fetchProjects(): Promise<Project[]> {
videoUrl,
repoUrl,
content,
description
description,
shortDescription
}`
);
}
Expand All @@ -36,6 +37,7 @@ export async function fetchProject(slug: string): Promise<Project> {
videoUrl,
content,
description,
shortDescription,
skills[]->{
name,
"image": image.asset->url,
Expand Down

0 comments on commit c1e7832

Please sign in to comment.