From ffce9ba6bbd0ca0855587503e735c33fe173d2ee Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 8 Apr 2026 09:30:06 +0200 Subject: [PATCH 1/5] feat: implement Materials component and update Home page layout --- src/app/page.tsx | 54 +------------------------- src/components/home/materials.tsx | 63 +++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 52 deletions(-) create mode 100644 src/components/home/materials.tsx diff --git a/src/app/page.tsx b/src/app/page.tsx index 62c7213..473d389 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,61 +1,11 @@ -import { FiBook, FiBookOpen, FiClipboard, FiFileText, FiPenTool, FiTriangle, FiUploadCloud } from "react-icons/fi" -import { CardIcon } from "@/components/card-icon" import { Hero } from "@/components/home/hero" - -const schoolCards = [ - { title: "Scuola di Architettura", icon: FiTriangle, size: "md" }, - { title: "Scuola di Design", icon: FiPenTool, size: "md" }, - { title: "Scuola di Ingegneria", icon: FiBookOpen, size: "md" }, -] as const - -const materialCards = [ - { - title: "Carica", - description: - "Hai appunti, dispense o temi d'esame che vuoi condividere? Caricali qui! Il tuo contributo è prezioso per aiutare migliaia di colleghi con materiale aggiornato!", - icon: FiUploadCloud, - size: "lg", - }, - { - title: "Visualizza", - description: - "Cerca ciò che ti serve per il tuo prossimo esame. Naviga tra i corsi di studio e trova facilmente appunti, esercizi e dispense condivisi da altri studenti come te.", - icon: FiBookOpen, - size: "lg", - }, -] as const - -const otherCards = [ - { title: "Dispense", icon: FiBook, size: "sm" }, - { title: "Appunti", icon: FiFileText, size: "sm" }, - { title: "Esami", icon: FiClipboard, size: "sm" }, -] as const +import { Materials } from "@/components/home/materials" export default function Home() { return (
-
-
-
- {schoolCards.map((card) => ( - - ))} -
-
-
-
- {materialCards.map((card) => ( - - ))} -
-
- {otherCards.map((card) => ( - - ))} -
-
-
+
) } diff --git a/src/components/home/materials.tsx b/src/components/home/materials.tsx new file mode 100644 index 0000000..2b15892 --- /dev/null +++ b/src/components/home/materials.tsx @@ -0,0 +1,63 @@ +import { FiArrowUpRight, FiBook, FiBookOpen, FiClipboard, FiFileText, FiUploadCloud } from "react-icons/fi" +import { CardIcon } from "@/components/card-icon" +import { Button } from "@/components/ui/button" + +const featuredCards = [ + { + title: "Carica", + description: + "Hai appunti, dispense o temi d'esame che vuoi condividere? Caricali qui! Il tuo contributo é prezioso per aiutare migliaia di colleghi con materiale aggiornato!", + icon: FiUploadCloud, + size: "lg", + href: "#", + }, + { + title: "Visualizza", + description: + "Cerca cio che ti serve per il tuo prossimo esame. Naviga tra i corsi di studio e trova facilmente appunti, esercizi e dispense condivisi da altri studenti come te.", + icon: FiBookOpen, + size: "lg", + href: "#", + }, +] as const + +const quickLinks = [ + { title: "Dispense", icon: FiBook, size: "sm", href: "#" }, + { title: "Esami", icon: FiFileText, size: "sm", href: "#" }, + { title: "Appunti", icon: FiClipboard, size: "sm", href: "#" }, +] as const + +export function Materials() { + return ( +
+
+
+ {featuredCards.map((card) => ( + + ))} +
+ +
+ {quickLinks.map((card) => ( + + ))} +
+
+ +
+

+ Materials +

+

+ Il piu grande archivio didattico creato dagli studenti per gli studenti del Politecnico di Milano. Cerca tra + migliaia di appunti, dispense, temi d'esame e molto altro. Carica i tuoi file per far crescere la community e + trova tutto cio che ti serve, organizzato per corso di studi. +

+ +
+
+ ) +} From f88c721802012610f344e3fd90fd7ef4662dbaa6 Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 8 Apr 2026 10:27:06 +0200 Subject: [PATCH 2/5] fix: correct padding value in Materials component --- src/components/home/materials.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/home/materials.tsx b/src/components/home/materials.tsx index 2b15892..01a1cb6 100644 --- a/src/components/home/materials.tsx +++ b/src/components/home/materials.tsx @@ -30,7 +30,7 @@ const quickLinks = [ export function Materials() { return (
-
+
{featuredCards.map((card) => ( From c194cbbeb6cfa1ba387ae3df054c489857f5ffd1 Mon Sep 17 00:00:00 2001 From: Bianca Date: Thu, 9 Apr 2026 09:28:47 +0200 Subject: [PATCH 3/5] fix: correct HTML entity in Not Found page --- src/app/not-found.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index 7f08738..3dabedd 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -5,7 +5,7 @@ export default async function NotFound() {

Not Found

-

This page doesn't exist or is not available yet.

+

This page doesn't exist or is not available yet.

Go to homepage
From 3f4cd674d8bd7e08598e95dffb485721eb636482 Mon Sep 17 00:00:00 2001 From: Bianca Date: Thu, 9 Apr 2026 09:30:06 +0200 Subject: [PATCH 4/5] Revert "fix: correct HTML entity in Not Found page" This reverts commit c194cbbeb6cfa1ba387ae3df054c489857f5ffd1. --- src/app/not-found.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index 3dabedd..7f08738 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -5,7 +5,7 @@ export default async function NotFound() {

Not Found

-

This page doesn't exist or is not available yet.

+

This page doesn't exist or is not available yet.

Go to homepage
From 2660373028a69ab756cd9486fbe066f0161e0f7e Mon Sep 17 00:00:00 2001 From: Tommaso Morganti Date: Thu, 9 Apr 2026 21:36:21 +0200 Subject: [PATCH 5/5] fix: smaller gap at large screen sizes --- src/components/home/materials.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/home/materials.tsx b/src/components/home/materials.tsx index 01a1cb6..6d2bacb 100644 --- a/src/components/home/materials.tsx +++ b/src/components/home/materials.tsx @@ -29,8 +29,8 @@ const quickLinks = [ export function Materials() { return ( -
-
+
+
{featuredCards.map((card) => ( @@ -44,7 +44,7 @@ export function Materials() {
-
+

Materials