diff --git a/src/app/matricole/page.tsx b/src/app/matricole/page.tsx
index 62d41e4..38f6395 100644
--- a/src/app/matricole/page.tsx
+++ b/src/app/matricole/page.tsx
@@ -1,8 +1,16 @@
+import type { Metadata } from "next"
import { FAQsPage } from "@/components/matricole/faqs"
+import { MatricoleIntro } from "@/components/matricole/intro"
-export default function Home() {
+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/card-icon/classes.ts b/src/components/card-icon/classes.ts
index 871cced..fb4256f 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-12 w-12",
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-6",
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: "p-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-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 577eec9..1ad086c 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/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 f933605..02d7444 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/faqs.tsx b/src/components/matricole/faqs.tsx
index 13f72c5..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
@@ -45,6 +45,6 @@ export function FAQsPage() {
-
+
)
}
diff --git a/src/components/matricole/intro.tsx b/src/components/matricole/intro.tsx
new file mode 100644
index 0000000..e8fa720
--- /dev/null
+++ b/src/components/matricole/intro.tsx
@@ -0,0 +1,38 @@
+import { FiBarChart2, FiMonitor } from "react-icons/fi"
+import { CardIcon } from "@/components/card-icon"
+
+const resources = [
+ {
+ title: "Graduatorie",
+ description: "Risultati storici e soglie di accesso per i vari corsi di laurea.",
+ icon: FiBarChart2,
+ },
+ {
+ title: "Progetto TOL",
+ description: "Informazioni sul test di ingresso (TOL) e su come prepararsi al meglio.",
+ icon: FiMonitor,
+ },
+] as const
+
+export function MatricoleIntro() {
+ return (
+
+
+
+
+ Matricole
+
+
+ Ecco una raccolta curata di risorse utili, guide e strumenti per supportare il tuo percorso.
+
+
+
+
+ {resources.map((resource) => (
+
+ ))}
+
+
+
+ )
+}