Skip to content

Commit 136554a

Browse files
committed
fix
1 parent 911b5cf commit 136554a

File tree

2 files changed

+46
-71
lines changed

2 files changed

+46
-71
lines changed

src/app/layout.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function RootLayout({
2424
enableSystem
2525
disableTransitionOnChange
2626
>
27+
2728
{children}
2829
<Toaster />
2930
</ThemeProvider>

src/app/projects/page.tsx

+45-71
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,56 @@
11
"use client";
2-
3-
import { ArrowLeftIcon, CaretSortIcon, CopyIcon } from "@radix-ui/react-icons";
4-
import { Button } from "~/components/ui/button";
5-
6-
import {
7-
Collapsible,
8-
CollapsibleContent,
9-
CollapsibleTrigger,
10-
} from "~/components/ui/collapsible";
112
import React from "react";
12-
import { Label } from "~/components/ui/label";
133
import Link from "next/link";
14-
15-
16-
4+
import { Badge } from "~/components/ui/badge";
175

186
export default function Index() {
19-
const [isOpen, setIsOpen] = React.useState<number | null>(null);
20-
21-
const handleCollapsibleOpen = (collapsibleIndex: number) => {
22-
setIsOpen((prevIndex) =>
23-
prevIndex === collapsibleIndex ? null : collapsibleIndex
24-
);
25-
};
26-
27-
7+
const progetti = [
8+
{
9+
name: "project-martina",
10+
url: "/projects/casellario-alfanumerico",
11+
description: "casellario alfanumerico",
12+
label: "WIP",
13+
},
14+
{
15+
name: "project-arianna",
16+
url: "/projects/paroliere",
17+
description: "paroliere",
18+
label: "WIP",
19+
},
20+
{
21+
name: "project-martina",
22+
url: "/projects/casellario_10",
23+
description: "Casellario alfanumerico 10x10",
24+
label: "WIP",
25+
},
26+
{
27+
name: "project-puddu",
28+
url: "/projects/test",
29+
description: "Test Landigpage fullbread.dev",
30+
label: "Done",
31+
},
32+
];
2833

2934
return (
30-
<div className="flex place-items-center min-h-svh">
31-
<Link href="/" className="place-self-start absolute">
32-
<Button className="p-2 m-2" size="icon">
33-
<ArrowLeftIcon className=" size-12 " />
34-
</Button>
35-
</Link>
36-
37-
<div className="mx-auto min-w-fit border rounded-lg p-5s">
38-
<Collapsible
39-
open={isOpen === 1}
40-
onOpenChange={() => handleCollapsibleOpen(1)}
41-
className="w-[350px] space-y-2"
42-
>
43-
<div className="flex items-center justify-between space-x-4 px-4">
44-
<h4 className="text-sm font-semibold">project-martina</h4>
45-
<CollapsibleTrigger asChild>
46-
<Button variant="ghost" size="sm">
47-
<CaretSortIcon className="h-4 w-4" />
48-
<span className="sr-only">Toggle</span>
49-
</Button>
50-
</CollapsibleTrigger>
51-
</div>
52-
<CollapsibleContent className="space-y-2">
53-
<div className="flex rounded-md border px-4 py-2 font-mono text-sm shadow-sm ">
54-
<Link className="p-2" href={"/projects/casellario-alfanumerico"}><Button>1x3x3</Button></Link>
55-
<Link className="p-2" href={"/projects/casellario_10"}><Button>10x3x3</Button></Link>
56-
</div>
57-
</CollapsibleContent>
58-
</Collapsible>
59-
<Collapsible
60-
open={isOpen === 2}
61-
onOpenChange={() => handleCollapsibleOpen(2)}
62-
className="w-[350px] space-y-2"
63-
>
64-
<div className="flex items-center justify-between space-x-4 px-4">
65-
<h4 className="text-sm font-semibold">project-arianna</h4>
66-
<CollapsibleTrigger asChild>
67-
<Button variant="ghost" size="sm">
68-
<CaretSortIcon className="h-4 w-4" />
69-
<span className="sr-only">Toggle</span>
70-
</Button>
71-
</CollapsibleTrigger>
72-
</div>
73-
<CollapsibleContent className="space-y-2">
74-
<div className="flex items-center justify-between rounded-md border px-4 py-2 font-mono text-sm shadow-sm ">
75-
<Link className="p-2" href={"/projects/paroliere"}><Button>test-paroliere-wip</Button></Link>
76-
<Label>work in progress</Label>
35+
<div className="flex min-h-dvh items-center justify-center p-4">
36+
<div className="grid w-full max-w-6xl grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4">
37+
{progetti.map((progetto) => (
38+
<Link key={progetto.name} href={progetto.url} className="group">
39+
<div className="flex flex-col overflow-hidden rounded-lg border">
40+
<div className="flex flex-col p-6">
41+
<div className="flex items-center justify-between">
42+
<h4 className="text-xl font-semibold">{progetto.name}</h4>
43+
</div>
44+
<p className="mt-2 text-sm text-gray-600">
45+
{progetto.description}
46+
</p>
47+
<div className="mt-4 flex justify-end">
48+
<Badge className="px-2 py-1 text-xs">{progetto.label}</Badge>
49+
</div>
50+
</div>
7751
</div>
78-
</CollapsibleContent>
79-
</Collapsible>
52+
</Link>
53+
))}
8054
</div>
8155
</div>
8256
);

0 commit comments

Comments
 (0)