From b591dd640548cfe50a2a7fe2c868843969be9da1 Mon Sep 17 00:00:00 2001 From: Shaanveer Singh Date: Wed, 13 May 2026 06:19:56 +0200 Subject: [PATCH 1/3] feat: add matricole intro Signed-off-by: Shaanveer Singh --- src/app/matricole/page.tsx | 15 +++ src/components/header/constants.ts | 2 +- src/components/home/hero.tsx | 9 +- src/components/matricole/intro.tsx | 147 +++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 4 deletions(-) create mode 100644 src/app/matricole/page.tsx create mode 100644 src/components/matricole/intro.tsx diff --git a/src/app/matricole/page.tsx b/src/app/matricole/page.tsx new file mode 100644 index 0000000..160a3c7 --- /dev/null +++ b/src/app/matricole/page.tsx @@ -0,0 +1,15 @@ +import type { Metadata } from "next" +import { MatricoleIntro } from "@/components/matricole/intro" + +export const metadata: Metadata = { + title: "Matricole", + description: "Risorse utili, guide e strumenti per le matricole del Politecnico di Milano.", +} + +export default function MatricolePage() { + return ( +
+ +
+ ) +} diff --git a/src/components/header/constants.ts b/src/components/header/constants.ts index 0862f6b..38a1e4f 100644 --- a/src/components/header/constants.ts +++ b/src/components/header/constants.ts @@ -18,7 +18,7 @@ export const headerMenuItems: HeaderMenuItem[] = [ menu: [ { title: "Groups", href: "#", icon: FiChevronRight }, { title: "Projects", href: "#", icon: FiChevronRight }, - { title: "Freshman", href: "#", icon: FiChevronRight }, + { title: "Freshman", href: "/matricole", icon: FiChevronRight }, { title: "Associations", href: "#", icon: FiChevronRight }, ], }, diff --git a/src/components/home/hero.tsx b/src/components/home/hero.tsx index 2b30785..9cc91e7 100644 --- a/src/components/home/hero.tsx +++ b/src/components/home/hero.tsx @@ -1,3 +1,4 @@ +import Link from "next/link" import { FiNavigation, FiSearch, FiUserPlus } from "react-icons/fi" import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" @@ -26,9 +27,11 @@ export function Hero() {
-
diff --git a/src/components/matricole/intro.tsx b/src/components/matricole/intro.tsx new file mode 100644 index 0000000..c36c0ee --- /dev/null +++ b/src/components/matricole/intro.tsx @@ -0,0 +1,147 @@ +import Image from "next/image" +import { FiBarChart2, FiMonitor } from "react-icons/fi" +import bigTealSvg from "@/assets/shapes/big-teal.svg" +import looperSvg from "@/assets/shapes/looper.svg" +import { Glass } from "@/components/glass" +import { GradientIcon, type GradientIconType } from "@/components/gradient-icon" +import { cn } from "@/lib/utils" + +const resources = [ + { + title: "Graduatorie", + description: "Controlla i risultati storici e le soglie di accesso per i vari corsi di laurea", + icon: FiBarChart2, + }, + { + title: "Progetto TOL", + description: "Tutte le informazioni sul test di ingresso (TOL) e come prepararsi al meglio.", + icon: FiMonitor, + }, +] as const + +type ResourceCardProps = { + title: string + description: string + icon: GradientIconType + className?: string +} + +function ResourceCard({ title, description, icon, className }: ResourceCardProps) { + return ( + +
+ +

+ {title} +

+

{description}

+
+
+ ) +} + +function MatricoleBackground() { + return ( +
+
+ + +
+ +
+
+ +
+
+
+ ) +} + +export function MatricoleIntro() { + return ( +
+ +
+
+

+ Matricole +

+

+ Ecco una raccolta curata di risorse utili, guide e strumenti per supportare il tuo percorso. +

+
+ +
+ {resources.map((resource) => ( + + ))} +
+
+
+ ) +} From db55391b782d2574e21cd13be5eab8024a993324 Mon Sep 17 00:00:00 2001 From: Shaanveer Singh Date: Fri, 22 May 2026 16:00:27 +0200 Subject: [PATCH 2/3] fix: address matricole review comments Signed-off-by: Shaanveer Singh --- src/components/card-icon/classes.ts | 5 ++ src/components/card-icon/index.tsx | 41 ++++++--- src/components/card-icon/types.ts | 4 +- src/components/matricole/faqs.tsx | 2 +- src/components/matricole/intro.tsx | 129 +++------------------------- 5 files changed, 50 insertions(+), 131 deletions(-) diff --git a/src/components/card-icon/classes.ts b/src/components/card-icon/classes.ts index 871cced..b41a42b 100644 --- a/src/components/card-icon/classes.ts +++ b/src/components/card-icon/classes.ts @@ -1,6 +1,7 @@ import type { SizeClassMap } from "./types" export const ICON_SIZE_CLASSES: SizeClassMap = { + compact: "h-8 w-8", xs: "h-10 w-10", sm: "h-14 w-14", md: "h-32 w-32", @@ -8,6 +9,7 @@ export const ICON_SIZE_CLASSES: SizeClassMap = { } export const CARD_PADDING_WITHOUT_DESCRIPTION: SizeClassMap = { + compact: "p-3", xs: "p-3", sm: "px-8 py-4", md: "p-8", @@ -15,6 +17,7 @@ export const CARD_PADDING_WITHOUT_DESCRIPTION: SizeClassMap = { } export const CARD_PADDING_WITH_DESCRIPTION: SizeClassMap = { + compact: "px-6 py-8", xs: "p-8", sm: "p-8", md: "p-8", @@ -22,6 +25,7 @@ export const CARD_PADDING_WITH_DESCRIPTION: SizeClassMap = { } export const CONTENT_GAP_CLASSES: SizeClassMap = { + compact: "gap-4", xs: "gap-2", sm: "gap-2", md: "gap-6", @@ -29,6 +33,7 @@ export const CONTENT_GAP_CLASSES: SizeClassMap = { } export const TITLE_SIZE_CLASSES: SizeClassMap = { + compact: "typo-headline-small", xs: "typo-label-large", sm: "typo-headline-medium", md: "typo-headline-medium", diff --git a/src/components/card-icon/index.tsx b/src/components/card-icon/index.tsx index 577eec9..71c3da0 100644 --- a/src/components/card-icon/index.tsx +++ b/src/components/card-icon/index.tsx @@ -7,10 +7,26 @@ import type { CardIconProps } from "./types" import { getCardPaddingClasses, getContentGapClasses, getTitleSizeClasses } from "./utils" export function CardIcon(props: CardIconProps) { - const { title, icon, size = "md", href, hoverEffect = false, className } = props + const { title, icon, size = "md", href, hoverEffect = false, align = "center", className } = props const description = "description" in props ? props.description : undefined const Root = href ? "a" : "div" const isDescriptionCard = Boolean(description) + const isStartAligned = align === "start" + const isCompactDescriptionCard = isDescriptionCard && size === "compact" + const contentAlignmentClass = isDescriptionCard + ? isStartAligned + ? "items-start justify-start text-left" + : "justify-between" + : isStartAligned + ? "items-start justify-center text-left" + : "items-center justify-center text-center" + const textAlignmentClass = isDescriptionCard + ? isStartAligned + ? "items-start gap-5 text-left" + : "gap-2 text-left" + : isStartAligned + ? "items-start text-left" + : "items-center text-center" return ( }
-
+
{isDescriptionCard ? ( ) : ( @@ -43,17 +55,26 @@ export function CardIcon(props: CardIconProps) { )}
-
+

{title}

- {description &&

{description}

} + {description && ( +

+ {description} +

+ )}
diff --git a/src/components/card-icon/types.ts b/src/components/card-icon/types.ts index 25bca27..54a333f 100644 --- a/src/components/card-icon/types.ts +++ b/src/components/card-icon/types.ts @@ -1,7 +1,8 @@ import type { GradientIconType } from "@/components/gradient-icon" -export type CardSize = "xs" | "sm" | "md" | "lg" +export type CardSize = "compact" | "xs" | "sm" | "md" | "lg" export type CardBreakpoint = "base" | "sm" | "md" | "lg" +export type CardAlign = "center" | "start" export type SizeClassMap = Record @@ -18,6 +19,7 @@ export type SharedCardProps = { title: string icon: GradientIconType size?: ResponsiveCardSize + align?: CardAlign href?: string hoverEffect?: boolean className?: string diff --git a/src/components/matricole/faqs.tsx b/src/components/matricole/faqs.tsx index cc1353a..56d5569 100644 --- a/src/components/matricole/faqs.tsx +++ b/src/components/matricole/faqs.tsx @@ -37,7 +37,7 @@ const accordionItems: AccordionListItem[] = [ export function FAQsPage() { return ( -
+

Domande Frequenti tra le Matricole

diff --git a/src/components/matricole/intro.tsx b/src/components/matricole/intro.tsx index c36c0ee..2d76aef 100644 --- a/src/components/matricole/intro.tsx +++ b/src/components/matricole/intro.tsx @@ -1,144 +1,35 @@ -import Image from "next/image" import { FiBarChart2, FiMonitor } from "react-icons/fi" -import bigTealSvg from "@/assets/shapes/big-teal.svg" -import looperSvg from "@/assets/shapes/looper.svg" -import { Glass } from "@/components/glass" -import { GradientIcon, type GradientIconType } from "@/components/gradient-icon" -import { cn } from "@/lib/utils" +import { CardIcon } from "@/components/card-icon" const resources = [ { title: "Graduatorie", - description: "Controlla i risultati storici e le soglie di accesso per i vari corsi di laurea", + description: "Risultati storici e soglie di accesso per i vari corsi di laurea.", icon: FiBarChart2, }, { title: "Progetto TOL", - description: "Tutte le informazioni sul test di ingresso (TOL) e come prepararsi al meglio.", + description: "Informazioni sul test di ingresso (TOL) e su come prepararsi al meglio.", icon: FiMonitor, }, ] as const -type ResourceCardProps = { - title: string - description: string - icon: GradientIconType - className?: string -} - -function ResourceCard({ title, description, icon, className }: ResourceCardProps) { - return ( - -
- -

- {title} -

-

{description}

-
-
- ) -} - -function MatricoleBackground() { - return ( -
-
- - -
- -
-
- -
-
-
- ) -} - export function MatricoleIntro() { return ( -
- -
-
-

+
+
+
+

Matricole

-

+

Ecco una raccolta curata di risorse utili, guide e strumenti per supportare il tuo percorso.

-
+
{resources.map((resource) => ( - + ))}
From 6df557cf59690f564bfd96aed42946bbeb90feb1 Mon Sep 17 00:00:00 2001 From: Shaanveer Singh Date: Mon, 25 May 2026 05:29:31 +0200 Subject: [PATCH 3/3] fix: address matricole review comments Signed-off-by: Shaanveer Singh --- src/components/card-icon/classes.ts | 8 ++++---- src/components/card-icon/index.tsx | 2 +- src/components/matricole/intro.tsx | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/card-icon/classes.ts b/src/components/card-icon/classes.ts index b41a42b..fb4256f 100644 --- a/src/components/card-icon/classes.ts +++ b/src/components/card-icon/classes.ts @@ -1,7 +1,7 @@ import type { SizeClassMap } from "./types" export const ICON_SIZE_CLASSES: SizeClassMap = { - compact: "h-8 w-8", + compact: "h-12 w-12", xs: "h-10 w-10", sm: "h-14 w-14", md: "h-32 w-32", @@ -9,7 +9,7 @@ export const ICON_SIZE_CLASSES: SizeClassMap = { } export const CARD_PADDING_WITHOUT_DESCRIPTION: SizeClassMap = { - compact: "p-3", + compact: "p-6", xs: "p-3", sm: "px-8 py-4", md: "p-8", @@ -17,7 +17,7 @@ export const CARD_PADDING_WITHOUT_DESCRIPTION: SizeClassMap = { } export const CARD_PADDING_WITH_DESCRIPTION: SizeClassMap = { - compact: "px-6 py-8", + compact: "p-8", xs: "p-8", sm: "p-8", md: "p-8", @@ -33,7 +33,7 @@ export const CONTENT_GAP_CLASSES: SizeClassMap = { } export const TITLE_SIZE_CLASSES: SizeClassMap = { - compact: "typo-headline-small", + compact: "typo-headline-medium", xs: "typo-label-large", sm: "typo-headline-medium", md: "typo-headline-medium", diff --git a/src/components/card-icon/index.tsx b/src/components/card-icon/index.tsx index 71c3da0..1ad086c 100644 --- a/src/components/card-icon/index.tsx +++ b/src/components/card-icon/index.tsx @@ -69,7 +69,7 @@ export function CardIcon(props: CardIconProps) {

{description} diff --git a/src/components/matricole/intro.tsx b/src/components/matricole/intro.tsx index 2d76aef..e8fa720 100644 --- a/src/components/matricole/intro.tsx +++ b/src/components/matricole/intro.tsx @@ -17,17 +17,17 @@ const resources = [ export function MatricoleIntro() { return (

-
+
-

+

Matricole

-

+

Ecco una raccolta curata di risorse utili, guide e strumenti per supportare il tuo percorso.

-
+
{resources.map((resource) => ( ))}