From cb465dc362f8d69338102b7fec595a173972545e Mon Sep 17 00:00:00 2001 From: Bianca Date: Wed, 20 May 2026 10:31:47 +0200 Subject: [PATCH 1/3] 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 2/3] 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 3/3] 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 }[] +}