Skip to content
Draft
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cb465dc
feat: add GuidePage and CardText component for guide display
BIA3IA May 20, 2026
197ee15
feat: implement GuideContent and GuideHero components for guide display
BIA3IA May 20, 2026
af078c6
refactor: biome check
BIA3IA May 20, 2026
9842073
feat: add Hero component and integrate it into Associations, Communit…
BIA3IA May 22, 2026
f2f6ea3
feat: remove unused CarouselMock component from Home page
BIA3IA May 22, 2026
c77ef1d
style: format Hero component for improved readability
BIA3IA May 22, 2026
184b538
Merge commit '68e769ee4f948e11bfc8ab150bbe06f693bf8490' into bianca/g…
BIA3IA May 22, 2026
78c28e0
Merge commit 'c77ef1d8fdf746a62799180d09261fac9b3af2ad' into bianca/g…
BIA3IA May 22, 2026
609632f
feat: replace GuideHero component with Hero component in GuidePage
BIA3IA May 22, 2026
f260477
feat: add CardResource component and enhance GuideContent with classN…
BIA3IA May 22, 2026
4a6c438
feat: add GuideContentMobile component and update GuidePage to use it
BIA3IA May 22, 2026
a6cc210
feat: enhance CardResource component to support Pill tags and add Pil…
BIA3IA May 22, 2026
069cacf
fix: correct formatting in guidesInfoMobile and add className prop to…
BIA3IA May 22, 2026
c1e619e
chore: biome
BIA3IA May 22, 2026
6ffa8e2
chore: rabbit
BIA3IA May 22, 2026
04d20f6
Merge commit '10801992368bbac02215d04851374c48e6dd5241' into bianca/g…
BIA3IA May 28, 2026
9375b18
fix: update Guides link to point to the correct path
BIA3IA May 28, 2026
e72ef2f
Merge remote-tracking branch 'origin/HEAD' into bianca/guides
BIA3IA Jun 18, 2026
57fe70a
feat: refactor guides structure and layout
itasimo Jun 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions src/app/associations/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -158,19 +159,11 @@ const accordionItems = [

export default function AssociationsPage() {
return (
<main className="w-full">
<div className="mx-auto flex min-h-screen max-w-400 flex-col items-center justify-center gap-20 px-4 py-49 md:gap-39">
<div className="flex flex-col items-center gap-6">
<h2 className="typo-display-large md:typo-display-extralarge w-fit bg-linear-to-b from-text-primary to-text-secondary bg-clip-text text-transparent md:py-14">
Associazioni
</h2>
<p className="typo-title-large md:typo-headline-small max-w-2xl text-center">
Scopri le associazioni studentesche del Politecnico
</p>
</div>
<div className="w-full max-w-300">
<AccordionAssociation accordionItems={accordionItems} defaultValue="ESN - Erasmus Student Network" />
</div>
<main className="mx-auto flex min-h-screen w-full max-w-400 flex-col items-center justify-center gap-20 px-4 py-49 md:gap-39">
<Hero title="Associazioni" description="Scopri le associazioni studentesche del Politecnico" />

<div className="w-full max-w-300">
<AccordionAssociation accordionItems={accordionItems} defaultValue="ESN - Erasmus Student Network" />
</div>
</main>
)
Expand Down
105 changes: 105 additions & 0 deletions src/app/guides/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import { FiLogIn } from "react-icons/fi"
import { CardCaption } from "@/components/card-caption"
import type { CardResourceProps } from "@/components/card-resource/types"
import GuideContent from "@/components/guides/content"
import { GuideContentMobile } from "@/components/guides/content-mobile"
import { Hero } from "@/components/ui/hero"

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: "Consulta le guide generali per orientarti al meglio nella vita universitaria",
guides: [
{
text: "Guida a Webex",
},
{
text: "Guida alla connessione alla rete del Polimi",
},
],
}

const guidesInfoMobile: CardResourceProps[] = [
{
title: "Chimica Generale",
description: "È un esame che tratta tutti argomenti già visti in qualsiasi liceo scientifico...",
tag: {
text: "Teorico",
variant: "primary",
},
author: "Giulia M.",
date: "Ott 24",
href: "/guides",
},
{
title: "Chimica",
description: "È un esame che tratta tutti argomenti già visti in qualsiasi liceo scientifico...",
tag: [
{
text: "Teorico",
variant: "primary",
},
{
text: "2 Anno",
variant: "secondary",
},
],
author: "Giulia M.",
date: "Ott 24",
href: "/guides",
},
{
title: "Generale",
description: "È un esame che tratta tutti argomenti già visti in qualsiasi liceo scientifico...",
tag: {
text: "Teorico",
variant: "primary",
},
author: "Giulia M.",
date: "Ott 24",
href: "/guides",
},
]
Comment thread
BIA3IA marked this conversation as resolved.
Outdated

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 (
<section className="flex min-h-screen w-full max-w-350 flex-col gap-32 px-12 pt-58 pb-18 sm:gap-48">
<Hero title="Guide" description="Una raccolta di guide realizzate dai membri del Network" />

{/* Desktop */}
<div className="hidden w-full flex-col gap-28 sm:flex">
<GuideContent {...guidesInfo} />

<GuideContent {...guidesGeneral} />
</div>

{/* Mobile */}
<div className="flex w-full flex-col items-center gap-32 sm:hidden">
<CardCaption {...guidesMobile} className="p-6" />

<GuideContentMobile title="Guide Generali" guides={guidesInfoMobile} />
</div>
</section>
)
}
57 changes: 57 additions & 0 deletions src/components/card-resource/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
"use client"

import { useState } from "react"
import { FiBookmark } from "react-icons/fi"
import { Card, CardContent, CardTitle } from "@/components/ui/card"
import { Pill } from "@/components/ui/pill"
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 (
<Card className={cn("h-fit w-full p-6", className)}>
<a href={href} className="flex h-full flex-col">
Comment thread
BIA3IA marked this conversation as resolved.
Outdated
<div className="flex items-center justify-between">
<div className="flex gap-2">
{(Array.isArray(tag) ? tag : [tag]).map((t) => (
<Pill key={t.text} variant={t.variant}>
{t.text}
</Pill>
))}
Comment thread
BIA3IA marked this conversation as resolved.
</div>
<button
type="button"
onClick={(e) => {
e.preventDefault()
setBookmarked((b) => !b)
}}
className={cn(bookmarked ? "text-text-secondary" : "text-text-secondary hover:text-text-primary")}
>
<FiBookmark className={cn("h-5 w-5", bookmarked && "fill-current")} />
</button>
Comment thread
BIA3IA marked this conversation as resolved.
Outdated
</div>

<div className="mt-5 flex flex-1 flex-col gap-2">
<CardTitle className="typo-title-large">{title}</CardTitle>
<CardContent className="typo-body-large line-clamp-3 px-0 text-text-primary">{description}</CardContent>
</div>

<div className="typo-body-large mt-12 flex items-center justify-between text-text-secondary">
<span>{author}</span>
<span>{date}</span>
</div>
</a>
</Card>
)
}
17 changes: 17 additions & 0 deletions src/components/card-resource/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { PillVariant } from "@/components/ui/pill"

export type PillTag = {
text: string
variant: PillVariant
}

export type CardResourceProps = {
tag: PillTag | PillTag[]
title: string
description: string
author: string
date: string
bookmarked?: boolean
href?: string
Comment thread
BIA3IA marked this conversation as resolved.
Outdated
className?: string
}
11 changes: 11 additions & 0 deletions src/components/card-text.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Card, CardContent } from "./ui/card"

export default function CardText({ text, className }: { text: string; className?: string }) {
return (
<Card className={`h-fit w-full rounded-3xl border-white/50 p-4 ${className || ""}`}>
<CardContent className="typo-headline-small sm:typo-hedline-small bg-linear-to-b from-blue-secondary to-blue-primary bg-clip-text px-0 text-center font-normal text-transparent">
Comment thread
BIA3IA marked this conversation as resolved.
Outdated
{text}
</CardContent>
</Card>
)
}
14 changes: 14 additions & 0 deletions src/components/guides/content-mobile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { cn } from "@/lib/utils"
import { CardResource } from "../card-resource"
import type { GuideContentMobileProps } from "./types"

export function GuideContentMobile({ title, guides, className }: GuideContentMobileProps) {
return (
<div className={cn("flex w-full flex-col gap-5 text-start", className)}>
<p className="typo-title-large">{title}</p>
{guides.map((guide) => (
<CardResource key={guide.title} {...guide} />
))}
Comment thread
BIA3IA marked this conversation as resolved.
Outdated
</div>
)
}
19 changes: 19 additions & 0 deletions src/components/guides/content.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import CardText from "@/components/card-text"
import { cn } from "@/lib/utils"
import type { GuideContentProps } from "./types"

export default function GuideContent({ title, description, guides, className }: GuideContentProps) {
return (
<section className={cn("mx-auto flex w-full max-w-350 flex-col gap-14", className)}>
<div className="flex flex-col gap-2 text-start">
<h3 className="typo-headline-small sm:typo-display-medium w-fit">{title}</h3>
<p className="typo-body-large text-text-primary">{description}</p>
</div>
<div className="mx-auto flex w-full max-w-5xl flex-col gap-4">
{guides.map((guide) => (
<CardText key={guide.text} text={guide.text} />
))}
Comment thread
BIA3IA marked this conversation as resolved.
Outdated
</div>
</section>
)
}
14 changes: 14 additions & 0 deletions src/components/guides/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { CardResourceProps } from "../card-resource/types"

export type GuideContentProps = {
title: string
description: string
guides: { text: string }[]
className?: string
}

export type GuideContentMobileProps = {
title: string
guides: CardResourceProps[]
className?: string
}
49 changes: 0 additions & 49 deletions src/components/home/carousel-mock.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/projects/collection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function Collection() {
</div>

<div className="hidden flex-col gap-12 sm:flex">
<div className="grid grid-cols-2 justify-items-center gap-6 xl:grid-cols-4">
<div className="grid 1xl:grid-cols-4 grid-cols-2 justify-items-center gap-6">
{collectionCards.map((card) => (
<CardCaption key={card.title} {...card} />
))}
Expand Down
10 changes: 2 additions & 8 deletions src/components/projects/community-news.tsx
Original file line number Diff line number Diff line change
@@ -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 = [
{
Expand Down Expand Up @@ -36,14 +37,7 @@ const communityCards = [
export function CommunityNews() {
return (
<section className="mx-auto flex min-h-screen max-w-400 flex-col items-center justify-center gap-48 px-4 py-49">
<div className="flex flex-col items-center gap-6">
<h2 className="typo-display-large sm:typo-display-extralarge w-fit bg-linear-to-b from-text-primary to-text-secondary bg-clip-text py-4 text-transparent sm:py-14">
Projects
</h2>
<p className="typo-title-large sm:typo-headline-small max-w-xl text-center">
Esplora e contribuisci ai progetti degli studenti
</p>
</div>
<Hero title="Projects" description=" Esplora e contribuisci ai progetti degli studenti" />

<div className="mx-auto flex w-full flex-col gap-14 sm:w-fit">
<div className="flex flex-col items-center gap-2 sm:items-start">
Expand Down
2 changes: 1 addition & 1 deletion src/components/projects/deprecated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function Deprecated() {
</div>

<div className="hidden flex-col gap-12 sm:flex">
<div className="grid grid-cols-2 justify-items-center gap-6 xl:grid-cols-4">
<div className="grid 1xl:grid-cols-4 grid-cols-2 justify-items-center gap-6">
{communityCards.map((card) => (
<CardCaption key={card.title} {...card} />
))}
Expand Down
10 changes: 10 additions & 0 deletions src/components/ui/hero.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export function Hero({ title, description }: { title: string; description: string }) {
return (
<div className="flex flex-col items-center gap-6">
<h2 className="typo-display-large sm:typo-display-extralarge w-fit bg-linear-to-b from-text-primary to-text-secondary bg-clip-text py-4 text-transparent sm:py-14">
{title}
</h2>
<p className="typo-title-large sm:typo-headline-small max-w-2xl text-center">{description}</p>
</div>
)
}
Loading
Loading