project pages created and populated automatically

This commit is contained in:
2026-04-16 10:15:14 +02:00
parent 82e6e3dc01
commit 5e1368f790
17 changed files with 2320 additions and 101 deletions
+31
View File
@@ -0,0 +1,31 @@
type PreviewItem = {
title: string;
image: string;
};
type props = {
items?: PreviewItem[];
};
export function ProjectPreviewGrid({ items = [] }: props) {
return (
<div className="grid gap-6 md:grid-cols-2">
{items.map((item) => (
<div
key={item.title}
className="rounded-2xl overflow-hidden bg-[#2b160f] text-white min-h-[260px] flex items-center justify-center"
>
{item.image ? (
<img
src={item.image}
alt={item.title}
className="h-full w-full object-cover"
/>
) : (
<span className="text-2xl">{item.title}</span>
)}
</div>
))}
</div>
);
}
+18
View File
@@ -0,0 +1,18 @@
type VisitButtonProps = {
href: string;
};
export function ProjectVisitButton({ href }: VisitButtonProps) {
return (
<div className="flex justify-center">
<a
href={href}
target="_blank"
rel="noreferrer"
className="rounded-full bg-[#2b160f] px-4 py-2 text-white text-sm"
>
Visiter le site
</a>
</div>
);
}
+11
View File
@@ -0,0 +1,11 @@
type props = {
children: React.ReactNode;
};
export function ProjectsColumns({ children }: props) {
return (
<div className="grid gap-6 md:grid-cols-2">
{children}
</div>
);
}
+9
View File
@@ -0,0 +1,9 @@
import { ProjectsColumns } from "@/components/mdx/ProjectsColumns";
import { ProjectPreviewGrid } from "@/components/mdx/ProjectPreviewGrid";
import { ProjectVisitButton } from "@/components/mdx/ProjectVisitButton";
export const mdxComponents = {
ProjectsColumns: ProjectsColumns,
ProjectPreviewGrid,
ProjectVisitButton,
};