From cb465dc362f8d69338102b7fec595a173972545e Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 20 May 2026 10:31:47 +0200 Subject: [PATCH 01/13] feat: add GuidePage and CardText component for guide display --- src/app/guides/page.tsx | 54 ++++++++++++++++++++++++++++++++++++ src/components/card-text.tsx | 12 ++++++++ 2 files changed, 66 insertions(+) create mode 100644 src/app/guides/page.tsx create mode 100644 src/components/card-text.tsx diff --git a/src/app/guides/page.tsx b/src/app/guides/page.tsx new file mode 100644 index 0000000..e6d34ba --- /dev/null +++ b/src/app/guides/page.tsx @@ -0,0 +1,54 @@ +import { FiUserPlus } from "react-icons/fi" +import CardText from "@/components/card-text" +import { Button } from "@/components/ui/button" + +const guides = [ + { + text: "Corsi a scelta Primo Anno", + }, + { + text: "Corsi a scelta Secondo Anno", + }, + { + text: "Corsi a scelta Terzo Anno", + }, +] + +export default function GuidePage() { + return ( +
+
+
+
+

+ Guide +

+

+ Una raccolta di guide realizzate dai membri del Network +

+
+
+
+

Le guide per Ingegneria Informatica

+

+ Rimani aggiornato sulle idee appena condivise dagli studenti del Politecnico +

+
+
+ {guides.map((guide) => ( + + ))} +
+
+
+
+ +
+ +
+
+ ) +} diff --git a/src/components/card-text.tsx b/src/components/card-text.tsx new file mode 100644 index 0000000..d701a85 --- /dev/null +++ b/src/components/card-text.tsx @@ -0,0 +1,12 @@ +import { Card, CardContent } from "./ui/card"; + + +export default function CardText({ text, className }: { text: string; className?: string }) { + return ( + + + {text} + + + ) +} \ No newline at end of file From 197ee152977a2526e29c9b12c7173315c9a76b21 Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 20 May 2026 10:59:40 +0200 Subject: [PATCH 02/13] feat: implement GuideContent and GuideHero components for guide display --- src/app/guides/page.tsx | 85 +++++++++++++++++-------------- src/components/guides/content.tsx | 18 +++++++ src/components/guides/hero.tsx | 12 +++++ src/components/guides/types.ts | 5 ++ 4 files changed, 83 insertions(+), 37 deletions(-) create mode 100644 src/components/guides/content.tsx create mode 100644 src/components/guides/hero.tsx create mode 100644 src/components/guides/types.ts diff --git a/src/app/guides/page.tsx b/src/app/guides/page.tsx index e6d34ba..19f2cda 100644 --- a/src/app/guides/page.tsx +++ b/src/app/guides/page.tsx @@ -1,54 +1,65 @@ import { FiUserPlus } from "react-icons/fi" -import CardText from "@/components/card-text" +import GuideContent from "@/components/guides/content" +import GuideHero from "@/components/guides/hero" import { Button } from "@/components/ui/button" -const guides = [ - { - text: "Corsi a scelta Primo Anno", - }, - { - text: "Corsi a scelta Secondo Anno", - }, - { - text: "Corsi a scelta Terzo Anno", - }, -] +const guidesInfo = { + title: "Le guide per Ingegneria Informatica", + description: "Rimani aggiornato sulle idee appena condivise dagli studenti del Politecnico", + guides: [ + + { + text: "Corsi a scelta Primo Anno", + }, + { + text: "Corsi a scelta Secondo Anno", + }, + { + text: "Corsi a scelta Terzo Anno", + }, + ] +} + +const guidesGeneral = { + title: "Le guide generali", + description: "Rimani aggiornato sulle idee appena condivise dagli studenti del Politecnico", + guides: [ + { + text: "Guida a Webex", + }, + { + text: "Guida alla connessione alla rete del Polimi", + }, + ], +} + export default function GuidePage() { return (
-
-
-
-

- Guide -

-

- Una raccolta di guide realizzate dai membri del Network -

-
-
-
-

Le guide per Ingegneria Informatica

-

- Rimani aggiornato sulle idee appena condivise dagli studenti del Politecnico -

-
-
- {guides.map((guide) => ( - - ))} -
-
-
+
+ +
-
+
+ +
+ +
) } diff --git a/src/components/guides/content.tsx b/src/components/guides/content.tsx new file mode 100644 index 0000000..f020476 --- /dev/null +++ b/src/components/guides/content.tsx @@ -0,0 +1,18 @@ +import CardText from "@/components/card-text" +import type { GuideGeneralProps } from "./types" + +export default function GuideContent({ title, description, guides }: GuideGeneralProps) { + return ( +
+
+

{title}

+

{description}

+
+
+ {guides.map((guide) => ( + + ))} +
+
+ ) +} diff --git a/src/components/guides/hero.tsx b/src/components/guides/hero.tsx new file mode 100644 index 0000000..edf0e79 --- /dev/null +++ b/src/components/guides/hero.tsx @@ -0,0 +1,12 @@ +export default function GuideHero() { + return ( +
+

+ Guide +

+

+ Una raccolta di guide realizzate dai membri del Network +

+
+ ) +} diff --git a/src/components/guides/types.ts b/src/components/guides/types.ts new file mode 100644 index 0000000..209eab6 --- /dev/null +++ b/src/components/guides/types.ts @@ -0,0 +1,5 @@ +export type GuideGeneralProps = { + title: string + description: string + guides: { text: string }[] +} \ No newline at end of file From af078c6cfa09b13bfcf1db3cb1b6cd0605764fc0 Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 20 May 2026 11:05:28 +0200 Subject: [PATCH 03/13] refactor: biome check --- src/app/guides/page.tsx | 90 ++++++++++++++----------------- src/components/card-text.tsx | 19 ++++--- src/components/guides/content.tsx | 30 +++++------ src/components/guides/hero.tsx | 20 +++---- src/components/guides/types.ts | 10 ++-- 5 files changed, 79 insertions(+), 90 deletions(-) diff --git a/src/app/guides/page.tsx b/src/app/guides/page.tsx index 19f2cda..d4f7a40 100644 --- a/src/app/guides/page.tsx +++ b/src/app/guides/page.tsx @@ -4,62 +4,52 @@ import GuideHero from "@/components/guides/hero" import { Button } from "@/components/ui/button" const guidesInfo = { - title: "Le guide per Ingegneria Informatica", - description: "Rimani aggiornato sulle idee appena condivise dagli studenti del Politecnico", - guides: [ - - { - text: "Corsi a scelta Primo Anno", - }, - { - text: "Corsi a scelta Secondo Anno", - }, - { - text: "Corsi a scelta Terzo Anno", - }, - ] + title: "Le guide per Ingegneria Informatica", + description: "Rimani aggiornato sulle idee appena condivise dagli studenti del Politecnico", + guides: [ + { + text: "Corsi a scelta Primo Anno", + }, + { + text: "Corsi a scelta Secondo Anno", + }, + { + text: "Corsi a scelta Terzo Anno", + }, + ], } const guidesGeneral = { - title: "Le guide generali", - description: "Rimani aggiornato sulle idee appena condivise dagli studenti del Politecnico", - guides: [ - { - text: "Guida a Webex", - }, - { - text: "Guida alla connessione alla rete del Polimi", - }, - ], + title: "Le guide generali", + description: "Consulta le guide generali per orientarti al meglio nella vita universitaria", + guides: [ + { + text: "Guida a Webex", + }, + { + text: "Guida alla connessione alla rete del Polimi", + }, + ], } - export default function GuidePage() { - return ( -
-
- - -
+ return ( +
+
+ + +
-
- -
+
+ +
-
- -
-
- ) +
+ +
+
+ ) } diff --git a/src/components/card-text.tsx b/src/components/card-text.tsx index d701a85..1dabc99 100644 --- a/src/components/card-text.tsx +++ b/src/components/card-text.tsx @@ -1,12 +1,11 @@ -import { Card, CardContent } from "./ui/card"; - +import { Card, CardContent } from "./ui/card" export default function CardText({ text, className }: { text: string; className?: string }) { - return ( - - - {text} - - - ) -} \ No newline at end of file + return ( + + + {text} + + + ) +} diff --git a/src/components/guides/content.tsx b/src/components/guides/content.tsx index f020476..2b303eb 100644 --- a/src/components/guides/content.tsx +++ b/src/components/guides/content.tsx @@ -1,18 +1,18 @@ import CardText from "@/components/card-text" -import type { GuideGeneralProps } from "./types" +import type { GuideContentProps } from "./types" -export default function GuideContent({ title, description, guides }: GuideGeneralProps) { - return ( -
-
-

{title}

-

{description}

-
-
- {guides.map((guide) => ( - - ))} -
-
- ) +export default function GuideContent({ title, description, guides }: GuideContentProps) { + return ( +
+
+

{title}

+

{description}

+
+
+ {guides.map((guide) => ( + + ))} +
+
+ ) } diff --git a/src/components/guides/hero.tsx b/src/components/guides/hero.tsx index edf0e79..9672a0e 100644 --- a/src/components/guides/hero.tsx +++ b/src/components/guides/hero.tsx @@ -1,12 +1,12 @@ export default function GuideHero() { - return ( -
-

- Guide -

-

- Una raccolta di guide realizzate dai membri del Network -

-
- ) + return ( +
+

+ Guide +

+

+ Una raccolta di guide realizzate dai membri del Network +

+
+ ) } diff --git a/src/components/guides/types.ts b/src/components/guides/types.ts index 209eab6..71f786a 100644 --- a/src/components/guides/types.ts +++ b/src/components/guides/types.ts @@ -1,5 +1,5 @@ -export type GuideGeneralProps = { - title: string - description: string - guides: { text: string }[] -} \ No newline at end of file +export type GuideContentProps = { + title: string + description: string + guides: { text: string }[] +} From 9842073fe4e538bf49af93384d12b37636fe0c71 Mon Sep 17 00:00:00 2001 From: Bianca Date: Fri, 22 May 2026 10:15:37 +0200 Subject: [PATCH 04/13] feat: add Hero component and integrate it into Associations, CommunityNews, and Deprecated pages --- src/app/associations/page.tsx | 19 ++++++------------- src/components/projects/collection.tsx | 2 +- src/components/projects/community-news.tsx | 10 ++-------- src/components/projects/deprecated.tsx | 2 +- src/components/ui/hero.tsx | 12 ++++++++++++ 5 files changed, 22 insertions(+), 23 deletions(-) create mode 100644 src/components/ui/hero.tsx diff --git a/src/app/associations/page.tsx b/src/app/associations/page.tsx index e0553bb..df87e64 100644 --- a/src/app/associations/page.tsx +++ b/src/app/associations/page.tsx @@ -12,6 +12,7 @@ import { FiYoutube, } from "react-icons/fi" import AccordionAssociation from "@/components/accordion-association" +import { Hero } from "@/components/ui/hero" import esnLogo from "../../../public/logos/esn.svg" const accordionItems = [ @@ -158,19 +159,11 @@ const accordionItems = [ export default function AssociationsPage() { return ( -
-
-
-

- Associazioni -

-

- Scopri le associazioni studentesche del Politecnico -

-
-
- -
+
+ + +
+
) diff --git a/src/components/projects/collection.tsx b/src/components/projects/collection.tsx index 81221e0..81c651d 100644 --- a/src/components/projects/collection.tsx +++ b/src/components/projects/collection.tsx @@ -83,7 +83,7 @@ export function Collection() {
-
+
{collectionCards.map((card) => ( ))} diff --git a/src/components/projects/community-news.tsx b/src/components/projects/community-news.tsx index f5881ff..1aa9e9b 100644 --- a/src/components/projects/community-news.tsx +++ b/src/components/projects/community-news.tsx @@ -1,6 +1,7 @@ import { FiCrop } from "react-icons/fi" import { CardCaption } from "../card-caption" import { Carousel, CarouselContent, CarouselDots, CarouselItem } from "../ui/carousel" +import { Hero } from "../ui/hero" const communityCards = [ { @@ -36,14 +37,7 @@ const communityCards = [ export function CommunityNews() { return (
-
-

- Projects -

-

- Esplora e contribuisci ai progetti degli studenti -

-
+
diff --git a/src/components/projects/deprecated.tsx b/src/components/projects/deprecated.tsx index ebff0a9..67a3c07 100644 --- a/src/components/projects/deprecated.tsx +++ b/src/components/projects/deprecated.tsx @@ -47,7 +47,7 @@ export function Deprecated() {
-
+
{communityCards.map((card) => ( ))} diff --git a/src/components/ui/hero.tsx b/src/components/ui/hero.tsx new file mode 100644 index 0000000..af6de27 --- /dev/null +++ b/src/components/ui/hero.tsx @@ -0,0 +1,12 @@ +export function Hero({ title, description }: { title: string; description: string }) { + return ( +
+

+ {title} +

+

+ {description} +

+
+ ) +} \ No newline at end of file From f2f6ea3cb1e4d0813a771ffc98aed9ae49802587 Mon Sep 17 00:00:00 2001 From: Bianca Date: Fri, 22 May 2026 10:18:53 +0200 Subject: [PATCH 05/13] feat: remove unused CarouselMock component from Home page --- src/components/home/carousel-mock.tsx | 49 --------------------------- 1 file changed, 49 deletions(-) delete mode 100644 src/components/home/carousel-mock.tsx diff --git a/src/components/home/carousel-mock.tsx b/src/components/home/carousel-mock.tsx deleted file mode 100644 index c4f9758..0000000 --- a/src/components/home/carousel-mock.tsx +++ /dev/null @@ -1,49 +0,0 @@ -"use client" - -import { CardCaption } from "@/components/card-caption" -import { Carousel, CarouselContent, CarouselDots, CarouselItem } from "@/components/ui/carousel" - -const mockCards = [ - { - title: "WeBeepSync", - caption: - "WeBeep Sync è una semplice app, user-friendly e senza compromessi che serve per tenere sincronizzati tutti i tuoi file di WeBeep.", - }, - { - title: "PolimiSchedule", - caption: - "Genera un file iCalendar (.ics) a partire dal formato testuale dell’Orario delle lezioni. Possibilità di importare su Google Calendar.", - }, - { - title: "WiFiLinux", - caption: "Scarica ed esegui lo script Python per attivare la connessione permanente al WiFi Polimi.", - }, - { - title: "The TOL Project", - caption: "Un simulatore gratuito del test di ammissione per le aspiranti matricole di Ingegneria del PoliMi.", - }, -] as const - -// TODO: delete this when merging -export function CarouselMock() { - return ( -
-

- PoliNetwork -

- - - - {mockCards.map((card) => ( - -
- -
-
- ))} -
- -
-
- ) -} From c77ef1d8fdf746a62799180d09261fac9b3af2ad Mon Sep 17 00:00:00 2001 From: Bianca Date: Fri, 22 May 2026 10:20:19 +0200 Subject: [PATCH 06/13] style: format Hero component for improved readability --- src/components/ui/hero.tsx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/components/ui/hero.tsx b/src/components/ui/hero.tsx index af6de27..d4ebc4b 100644 --- a/src/components/ui/hero.tsx +++ b/src/components/ui/hero.tsx @@ -1,12 +1,10 @@ export function Hero({ title, description }: { title: string; description: string }) { - return ( -
-

- {title} -

-

- {description} -

-
- ) -} \ No newline at end of file + return ( +
+

+ {title} +

+

{description}

+
+ ) +} From 609632feb5c57e925f34789c54e72b9a5ba21d26 Mon Sep 17 00:00:00 2001 From: Bianca Date: Fri, 22 May 2026 11:43:42 +0200 Subject: [PATCH 07/13] feat: replace GuideHero component with Hero component in GuidePage --- src/app/guides/page.tsx | 12 ++++++++---- src/components/guides/hero.tsx | 12 ------------ 2 files changed, 8 insertions(+), 16 deletions(-) delete mode 100644 src/components/guides/hero.tsx diff --git a/src/app/guides/page.tsx b/src/app/guides/page.tsx index d4f7a40..1a34d39 100644 --- a/src/app/guides/page.tsx +++ b/src/app/guides/page.tsx @@ -1,7 +1,7 @@ import { FiUserPlus } from "react-icons/fi" import GuideContent from "@/components/guides/content" -import GuideHero from "@/components/guides/hero" import { Button } from "@/components/ui/button" +import { Hero } from "@/components/ui/hero" const guidesInfo = { title: "Le guide per Ingegneria Informatica", @@ -36,20 +36,24 @@ export default function GuidePage() { return (
- +
-
+ {/* Desktop */} +
-
+
+ + {/* Mobile */} +
) } diff --git a/src/components/guides/hero.tsx b/src/components/guides/hero.tsx deleted file mode 100644 index 9672a0e..0000000 --- a/src/components/guides/hero.tsx +++ /dev/null @@ -1,12 +0,0 @@ -export default function GuideHero() { - return ( -
-

- Guide -

-

- Una raccolta di guide realizzate dai membri del Network -

-
- ) -} From f260477212ba7e9fa1c1f4496cb1a143227438ea Mon Sep 17 00:00:00 2001 From: Bianca Date: Fri, 22 May 2026 14:13:00 +0200 Subject: [PATCH 08/13] feat: add CardResource component and enhance GuideContent with className prop --- src/app/guides/page.tsx | 63 ++++++++++++++++++++------ src/components/card-resource/index.tsx | 59 ++++++++++++++++++++++++ src/components/card-resource/types.ts | 10 ++++ src/components/guides/content.tsx | 5 +- src/components/guides/types.ts | 1 + 5 files changed, 122 insertions(+), 16 deletions(-) create mode 100644 src/components/card-resource/index.tsx create mode 100644 src/components/card-resource/types.ts diff --git a/src/app/guides/page.tsx b/src/app/guides/page.tsx index 1a34d39..3e63ab0 100644 --- a/src/app/guides/page.tsx +++ b/src/app/guides/page.tsx @@ -1,6 +1,7 @@ -import { FiUserPlus } from "react-icons/fi" +import { FiLogIn } from "react-icons/fi" +import { CardCaption } from "@/components/card-caption" +import { CardResource } from "@/components/card-resource" import GuideContent from "@/components/guides/content" -import { Button } from "@/components/ui/button" import { Hero } from "@/components/ui/hero" const guidesInfo = { @@ -32,28 +33,62 @@ const guidesGeneral = { ], } +const guidesInfoMobile = [ + { + title: "Chimica Generale", + description: "È un esame che tratta tutti argomenti già visti in qualsiasi liceo scientifico...", + tag: "Teorico", + author: "Giulia M.", + date: "Ott 24", + href: "/guides", + }, + { + title: "Chimica", + description: "È un esame che tratta tutti argomenti già visti in qualsiasi liceo scientifico...", + tag: ["Teorico", "2 Anno"], + author: "Giulia M.", + date: "Ott 24", + href: "/guides", + }, + { + title: "Generale", + description: "È un esame che tratta tutti argomenti già visti in qualsiasi liceo scientifico...", + tag: "Teorico", + author: "Giulia M.", + date: "Ott 24", + href: "/guides", + }, +] + +const guidesMobile = { + title: "Trova le guide del tuo corso", + caption: "Una raccolta di guide scritte dagli studenti del tuo corso", + icon: FiLogIn, +} + export default function GuidePage() { return ( -
-
- - -
+
+ {/* Desktop */} -
- -
+
+ -
{/* Mobile */} +
+ +
+

Guide Generali

+ {guidesInfoMobile.map((guide) => ( + + ))} +
+
) } diff --git a/src/components/card-resource/index.tsx b/src/components/card-resource/index.tsx new file mode 100644 index 0000000..bcee48a --- /dev/null +++ b/src/components/card-resource/index.tsx @@ -0,0 +1,59 @@ +"use client" + +import { useState } from "react" +import { FiBookmark } from "react-icons/fi" +import { Card, CardContent, CardTitle } from "@/components/ui/card" +import { cn } from "@/lib/utils" +import type { CardResourceProps } from "./types" + +export function CardResource({ + tag, + title, + description, + author, + date, + bookmarked: initialBookmarked = false, + href, + className, +}: CardResourceProps) { + const [bookmarked, setBookmarked] = useState(initialBookmarked) + + return ( + + +
+
+ {(Array.isArray(tag) ? tag : [tag]).map((t, i) => ( + + {t} + + ))} +
+ +
+ +
+ {title} + {description} +
+ +
+ {author} + {date} +
+
+
+ ) +} diff --git a/src/components/card-resource/types.ts b/src/components/card-resource/types.ts new file mode 100644 index 0000000..56a894a --- /dev/null +++ b/src/components/card-resource/types.ts @@ -0,0 +1,10 @@ +export type CardResourceProps = { + tag: string | string[] + title: string + description: string + author: string + date: string + bookmarked?: boolean + href?: string + className?: string +} diff --git a/src/components/guides/content.tsx b/src/components/guides/content.tsx index 2b303eb..a157161 100644 --- a/src/components/guides/content.tsx +++ b/src/components/guides/content.tsx @@ -1,9 +1,10 @@ import CardText from "@/components/card-text" +import { cn } from "@/lib/utils" import type { GuideContentProps } from "./types" -export default function GuideContent({ title, description, guides }: GuideContentProps) { +export default function GuideContent({ title, description, guides, className }: GuideContentProps) { return ( -
+

{title}

{description}

diff --git a/src/components/guides/types.ts b/src/components/guides/types.ts index 71f786a..d8cc211 100644 --- a/src/components/guides/types.ts +++ b/src/components/guides/types.ts @@ -2,4 +2,5 @@ export type GuideContentProps = { title: string description: string guides: { text: string }[] + className?: string } From 4a6c4385c357e467c430f9221857b6ed162a4fd2 Mon Sep 17 00:00:00 2001 From: Bianca Date: Fri, 22 May 2026 14:19:58 +0200 Subject: [PATCH 09/13] feat: add GuideContentMobile component and update GuidePage to use it --- src/app/guides/page.tsx | 9 ++------- src/components/card-resource/index.tsx | 5 ++++- src/components/guides/content-mobile.tsx | 14 ++++++++++++++ src/components/guides/types.ts | 8 ++++++++ 4 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 src/components/guides/content-mobile.tsx diff --git a/src/app/guides/page.tsx b/src/app/guides/page.tsx index 3e63ab0..63ad6cd 100644 --- a/src/app/guides/page.tsx +++ b/src/app/guides/page.tsx @@ -1,7 +1,7 @@ import { FiLogIn } from "react-icons/fi" import { CardCaption } from "@/components/card-caption" -import { CardResource } from "@/components/card-resource" import GuideContent from "@/components/guides/content" +import { GuideContentMobile } from "@/components/guides/content-mobile" import { Hero } from "@/components/ui/hero" const guidesInfo = { @@ -82,12 +82,7 @@ export default function GuidePage() {
-
-

Guide Generali

- {guidesInfoMobile.map((guide) => ( - - ))} -
+
) diff --git a/src/components/card-resource/index.tsx b/src/components/card-resource/index.tsx index bcee48a..64dba75 100644 --- a/src/components/card-resource/index.tsx +++ b/src/components/card-resource/index.tsx @@ -37,7 +37,10 @@ export function CardResource({
- + ) } diff --git a/src/components/card-resource/types.ts b/src/components/card-resource/types.ts index f5d388c..07406f9 100644 --- a/src/components/card-resource/types.ts +++ b/src/components/card-resource/types.ts @@ -12,6 +12,6 @@ export type CardResourceProps = { author: string date: string bookmarked?: boolean - href?: string + href: string className?: string } diff --git a/src/components/card-text.tsx b/src/components/card-text.tsx index 1dabc99..7b3ce95 100644 --- a/src/components/card-text.tsx +++ b/src/components/card-text.tsx @@ -3,7 +3,7 @@ import { Card, CardContent } from "./ui/card" export default function CardText({ text, className }: { text: string; className?: string }) { return ( - + {text}