diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index a2851a4e..6c8380ea 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -2,7 +2,7 @@ import type { Metadata } from "next" import Link from "next/link" import { FiArrowUpRight } from "react-icons/fi" import { ClosingCta } from "@/components/layout/closing-cta" -import { CONTAINER, SECTION_TITLE } from "@/components/layout/page" +import { CONTAINER, PAGE_HERO, PAGE_MAIN, SECTION_TITLE } from "@/components/layout/page" import { AssociationBodies } from "@/components/structure/association-bodies" import { BoardGallery } from "@/components/structure/board-gallery" import { LegalStatus } from "@/components/structure/legal-status" @@ -22,8 +22,8 @@ const titleClass = `${SECTION_TITLE} text-center` export default function StructurePage() { return ( -
-
+
+
diff --git a/src/app/chi-siamo/page.tsx b/src/app/chi-siamo/page.tsx index d96a6022..88a51feb 100644 --- a/src/app/chi-siamo/page.tsx +++ b/src/app/chi-siamo/page.tsx @@ -6,6 +6,7 @@ import { PathSection } from "@/components/chi-siamo/path-section" import { ProblemSection } from "@/components/chi-siamo/problem-section" import { SupportSection } from "@/components/chi-siamo/support-section" import { VisionSection } from "@/components/chi-siamo/vision-section" +import { PAGE_MAIN } from "@/components/layout/page" export const metadata: Metadata = { title: "Su di noi", @@ -14,7 +15,7 @@ export const metadata: Metadata = { export default function ChiSiamoPage() { return ( -
+
diff --git a/src/app/collabora/page.tsx b/src/app/collabora/page.tsx index a2889aaf..16fe2bc0 100644 --- a/src/app/collabora/page.tsx +++ b/src/app/collabora/page.tsx @@ -4,9 +4,8 @@ import { AssociationSection } from "@/components/collabora/association-section" import { CollaborationSection } from "@/components/collabora/collaboration-section" import { CompanySection } from "@/components/collabora/company-section" import { ContactSection } from "@/components/collabora/contact-section" -import { sectionContainerClass } from "@/components/collabora/section" +import { CONTAINER, PAGE_HERO, PAGE_MAIN } from "@/components/layout/page" import { Hero } from "@/components/ui/hero" -import { cn } from "@/lib/utils" export const metadata: Metadata = { title: "Collabora con Noi", @@ -16,9 +15,8 @@ export const metadata: Metadata = { export default function CollaboraPage() { return ( -
- {/* Title at y=262 (mobile) / 286 (desktop) as in Figma; Hero adds 16px / 56px above it */} -
+
+
-
+
+
+
-
- {/* Figma reserves the right column for an archive photo that doesn't exist yet: until then the text stands alone. - The two milestone cards that filled it repeated the timeline right below. */} - -

Una domanda semplice, una grande idea.

-

- Tutto è cominciato nel 2016, quando un futuro studente cercava uno spazio per entrare in contatto con i - propri compagni e trovare risposte alle prime domande sulla vita universitaria. -

-

- Da questa esigenza è nato un progetto collettivo, che nel tempo si è trasformato in una{" "} - rete capillare costruita dagli studenti, per gli studenti. -

- - } - classNames={{ - section: `${CONTAINER} items-start [&>div>h2]:typo-title-large`, - textDiv: "max-w-180 items-start", - title: "text-balance text-start text-blue-secondary", - descriptionDiv: "text-start", - contentDiv: "hidden", - }} - /> - - - - - + +

Una domanda semplice, una grande idea.

+

+ Tutto è cominciato nel 2016, quando un futuro studente cercava uno spazio per entrare in contatto con i + propri compagni e trovare risposte alle prime domande sulla vita universitaria. +

+

+ Da questa esigenza è nato un progetto collettivo, che nel tempo si è trasformato in una{" "} + rete capillare costruita dagli studenti, per gli studenti. +

+ + } + classNames={{ + section: `${CONTAINER} items-start [&>div>h2]:typo-title-large`, + textDiv: "max-w-180 items-start", + title: "text-balance text-start text-blue-secondary", + descriptionDiv: "text-start", + contentDiv: "hidden", + }} + /> + + + + + - -

Essere lì quando serve.

-

- Al di là dei progetti e dei team, PoliNetwork fa una cosa davvero importante: risponde alle domande - degli studenti. -

-

- Intorno ai gruppi dei corsi sono nati spazi per tutto ciò che riguarda la vita universitaria: dagli - esami ai piani di studio, dalla ricerca casa alla compravendita dei libri, fino al tempo libero. -

- - } - classNames={{ - section: `${CONTAINER} gap-12 xl:flex-row xl:items-center xl:gap-16 [&>div>h2]:typo-title-large`, - title: "text-balance text-start text-blue-secondary", - textDiv: "min-w-0 items-start xl:w-1/2", - descriptionDiv: "text-start", - contentDiv: "min-w-0 xl:w-1/2", - }} - > -
- -

- L’obiettivo è raggiunto. + +

Essere lì quando serve.

+

+ Al di là dei progetti e dei team, PoliNetwork fa una cosa davvero importante: risponde alle domande degli + studenti.

- Se anche un solo studente ha trovato casa grazie a un nostro gruppo, o si è laureato in tempo perché - qualcuno gli ha risposto. + Intorno ai gruppi dei corsi sono nati spazi per tutto ciò che riguarda la vita universitaria: dagli esami + ai piani di studio, dalla ricerca casa alla compravendita dei libri, fino al tempo libero.

-
-
+ + } + classNames={{ + section: `${CONTAINER} gap-12 xl:flex-row xl:items-center xl:gap-16 [&>div>h2]:typo-title-large`, + title: "text-balance text-start text-blue-secondary", + textDiv: "min-w-0 items-start xl:w-1/2", + descriptionDiv: "text-start", + contentDiv: "min-w-0 xl:w-1/2", + }} + > +
+ +

+ L’obiettivo è raggiunto. +

+

+ Se anche un solo studente ha trovato casa grazie a un nostro gruppo, o si è laureato in tempo perché + qualcuno gli ha risposto. +

+
+
- + - -
+
) } diff --git a/src/app/team/page.tsx b/src/app/team/page.tsx index 5489f290..4f0dcd34 100644 --- a/src/app/team/page.tsx +++ b/src/app/team/page.tsx @@ -1,7 +1,7 @@ import type { Metadata } from "next" import { FiUsers } from "react-icons/fi" import { ClosingCta } from "@/components/layout/closing-cta" -import { CONTAINER } from "@/components/layout/page" +import { CONTAINER, PAGE_HERO, PAGE_MAIN } from "@/components/layout/page" import { applicationHref, teams } from "@/components/team/constants" import { TeamSection } from "@/components/team/team-section" import { Button } from "@/components/ui/button" @@ -14,8 +14,8 @@ export const metadata: Metadata = { export default function TeamPage() { return ( -
-
+
+
+

La nostra visione

Un Politecnico in cui nessuno studente resti indietro per mancanza di{" "} diff --git a/src/components/collabora/about-section.tsx b/src/components/collabora/about-section.tsx index 5ac09718..48202e60 100644 --- a/src/components/collabora/about-section.tsx +++ b/src/components/collabora/about-section.tsx @@ -4,11 +4,12 @@ import chatIcon from "@/assets/icons/collabora/chat.svg" import groupIcon from "@/assets/icons/collabora/group.svg" import handshakeIcon from "@/assets/icons/collabora/handshake.svg" import schoolIcon from "@/assets/icons/collabora/school.svg" +import { CONTAINER, SECTION_LEAD, SECTION_TITLE } from "@/components/layout/page" import { Button } from "@/components/ui/button" import { Carousel, CarouselContent, CarouselDots, CarouselItem } from "@/components/ui/carousel" import { cn } from "@/lib/utils" import { InfoCard, type InfoCardData } from "./info-card" -import { Aside, Highlight, SectionTitle, sectionContainerClass, sectionTextClass } from "./section" +import { Aside, Highlight } from "./section" const cards: InfoCardData[] = [ { @@ -39,9 +40,7 @@ const cards: InfoCardData[] = [ title: "1000+", description: ( <> - Persone nel nostro evento -
- più grande + Persone nel nostro evento più grande ), mobileDescription: "Persone al nostro evento più grande", @@ -65,12 +64,13 @@ const cards: InfoCardData[] = [ export function AboutSection() { return ( -
-
-
+
+ {/* Copy and figures side by side from xl, as in Figma; below, the figures run as one row (two on tablets) */} +
+
- Chi siamo? -
+

Chi siamo?

+

PoliNetwork è l'infrastruttura di comunicazione studentesca del Politecnico di Milano.

Gestiamo oltre 500 gruppi Telegram e WhatsApp, una presenza social in crescita e strumenti digitali @@ -92,14 +92,14 @@ export function AboutSection() {

-
+
{cards.map((card) => ( - + ))}
{/* Bleeds to the screen edges like the Figma carousel, so the next card peeks in */} - + {cards.map((card) => ( diff --git a/src/components/collabora/association-section.tsx b/src/components/collabora/association-section.tsx index 1e2fd866..cc04e76e 100644 --- a/src/components/collabora/association-section.tsx +++ b/src/components/collabora/association-section.tsx @@ -39,7 +39,6 @@ export function AssociationSection() { }} /> } - className="py-30 md:py-37.5" >

Se fai parte dell'ecosistema universitario del Politecnico di Milano o di un'altra università, possiamo valutare @@ -48,11 +47,8 @@ export function AssociationSection() {

Le collaborazioni più efficaci che abbiamo avuto nel tempo sono nate da gruppi studenteschi che condividevano -
una parte degli obiettivi che perseguiamo:{" "} - - rendere la vita universitaria meno complicata e più ricca per chi studia -
al Politecnico. -
+ una parte degli obiettivi che perseguiamo:{" "} + rendere la vita universitaria meno complicata e più ricca per chi studia al Politecnico.

) diff --git a/src/components/collabora/collaboration-section.tsx b/src/components/collabora/collaboration-section.tsx index e615b72f..81832916 100644 --- a/src/components/collabora/collaboration-section.tsx +++ b/src/components/collabora/collaboration-section.tsx @@ -1,13 +1,15 @@ +import { CONTAINER, SECTION_LEAD, SECTION_TITLE } from "@/components/layout/page" import { cn } from "@/lib/utils" -import { Aside, Highlight, SectionTitle, sectionContainerClass, sectionTextClass } from "./section" +import { Aside, Highlight } from "./section" export function CollaborationSection() { return ( -
+
- Cosa possiamo fare insieme? -
-

+

Cosa possiamo fare insieme?

+
+ {/* Figma runs this paragraph 959px wide at 24px; at 20px that is ~90 characters a line, so it narrows below 3xl */} +

Collaborare con noi significa accedere a questa community in modo diretto. Non siamo un canale pubblicitario e non accettiamo promozioni commerciali generiche: ogni collaborazione viene valutata in termini di valore concreto per gli studenti del Politecnico{" "} diff --git a/src/components/collabora/company-section.tsx b/src/components/collabora/company-section.tsx index d04247be..f4bf6bcc 100644 --- a/src/components/collabora/company-section.tsx +++ b/src/components/collabora/company-section.tsx @@ -33,7 +33,6 @@ export function CompanySection() { /> } photoFirst - className="py-30 md:py-31.25" >

PoliNetwork è un punto di accesso diretto alla community studentesca del Politecnico di Milano: migliaia di diff --git a/src/components/collabora/contact-section.tsx b/src/components/collabora/contact-section.tsx index cdd23e4e..4e43c90d 100644 --- a/src/components/collabora/contact-section.tsx +++ b/src/components/collabora/contact-section.tsx @@ -2,9 +2,9 @@ import { Fragment } from "react" import favoriteIcon from "@/assets/icons/collabora/favorite.svg" import mailIcon from "@/assets/icons/collabora/mail.svg" import promptSuggestionIcon from "@/assets/icons/collabora/prompt-suggestion.svg" +import { CONTAINER, SECTION_TITLE } from "@/components/layout/page" import { cn } from "@/lib/utils" import { InfoCard, type InfoCardData } from "./info-card" -import { SectionTitle, sectionContainerClass } from "./section" const cards: InfoCardData[] = [ { @@ -14,6 +14,8 @@ const cards: InfoCardData[] = [ icon: mailIcon, iconClassName: "mr-2.5 h-5.5 w-7 md:mr-0 md:h-12 md:w-15", descriptionClassName: "max-w-56", + // The only step that is an action: it opens the mail client + href: "mailto:events@polinetwork.org", }, { title: "Condividi la tua visione", @@ -46,18 +48,24 @@ const connectorClassNames = [ export function ContactSection() { return ( -

- Come contattarci +
+

Come contattarci

-
+ {/* A row of equal steps from lg (tighter padding until 3xl); stacked below, at Figma's card width */} +
{cards.map((card, index) => ( - + {index < connectorClassNames.length && (
diff --git a/src/components/collabora/info-card.tsx b/src/components/collabora/info-card.tsx index e84892a6..b9c4bb7c 100644 --- a/src/components/collabora/info-card.tsx +++ b/src/components/collabora/info-card.tsx @@ -27,10 +27,13 @@ export type InfoCardData = { export function InfoCard({ card, className, + titleClassName, descriptionColorClassName = "text-text-primary", }: { card: InfoCardData className?: string + /** Title size and wrapping, for rows where the default single-line title doesn't fit. */ + titleClassName?: string descriptionColorClassName?: string }) { const { title, description, mobileDescription, icon, iconClassName, descriptionClassName, href } = card @@ -53,7 +56,12 @@ export function InfoCard({
{/* On the narrowest phones an email title may not fit: let it wrap after the "@" */} -

+

{title.replace("@", "@\u200B")}

diff --git a/src/components/collabora/photo-section.tsx b/src/components/collabora/photo-section.tsx index 52c51847..03528219 100644 --- a/src/components/collabora/photo-section.tsx +++ b/src/components/collabora/photo-section.tsx @@ -1,7 +1,7 @@ import Image, { type StaticImageData } from "next/image" import type { ReactNode } from "react" +import { CONTAINER, SECTION_LEAD, SECTION_TITLE } from "@/components/layout/page" import { cn } from "@/lib/utils" -import { SectionTitle, sectionContainerClass, sectionTextClass } from "./section" type PhotoSectionProps = { title: ReactNode @@ -15,12 +15,12 @@ type PhotoSectionProps = { decorations: ReactNode /** Photo on the left on desktop. */ photoFirst?: boolean - className?: string } /** - * Heading + copy next to a photo. Stacked (copy, then photo) up to `xl`; from `xl` the two columns keep the - * 719:611 ratio of the 1728px Figma frame, bottom-aligned. + * Heading + copy next to a photo. Stacked (copy, then a photo as wide as the copy) on phones and portrait tablets; + * from `lg` the two columns keep the 719:611 ratio of the 1728px Figma frame, centred on each other so a taller + * text column doesn't leave the photo hanging at one edge. */ export function PhotoSection({ title, @@ -30,27 +30,26 @@ export function PhotoSection({ frameClassName, decorations, photoFirst = false, - className, }: PhotoSectionProps) { return ( -
+
-
- {title} -
{children}
+
+

{title}

+
{children}
-
+
diff --git a/src/components/collabora/section.tsx b/src/components/collabora/section.tsx index 03da89db..6c085ee6 100644 --- a/src/components/collabora/section.tsx +++ b/src/components/collabora/section.tsx @@ -1,32 +1,6 @@ import type { ReactNode } from "react" import { cn } from "@/lib/utils" -/** - * Horizontal frame shared by every Collabora section: 24px gutters on mobile (402px Figma frame), growing to the - * 145px gutters of the 1728px desktop frame, then centered so the content column never exceeds 1438px. - */ -export const sectionContainerClass = "mx-auto w-full max-w-432 px-6 md:px-[clamp(1.5rem,8.391%,9.0625rem)]" - -export function SectionTitle({ children, className }: { children: ReactNode; className?: string }) { - return ( -

- {children} -

- ) -} - -/** - * Section body copy: Red Hat 16px centered on mobile, Poppins 24px on desktop. Browsers add the letter-spacing after - * the last glyph of a line too, so lines that exactly fill their Figma box would wrap: the box gets 1px of slack. - */ -export const sectionTextClass = - "typo-body-large md:typo-headline-small -mx-[0.5px] text-center text-black md:mr-[-1px] md:ml-0 md:text-start" - export function Highlight({ children }: { children: ReactNode }) { return {children} } diff --git a/src/components/join/admin.tsx b/src/components/join/admin.tsx index 7eff89fa..12eb0332 100644 --- a/src/components/join/admin.tsx +++ b/src/components/join/admin.tsx @@ -41,7 +41,8 @@ export function AdminSection() {
  • {index < connectors.length && ( {cards.map((card) => ( - + ))}
  • ) @@ -23,7 +24,7 @@ export function JoinCards({ cards, carousel = false }: { cards: InfoCardData[]; {cards.map((card) => ( - + ))} diff --git a/src/components/layout/page.ts b/src/components/layout/page.ts index a725375a..ca8cc332 100644 --- a/src/components/layout/page.ts +++ b/src/components/layout/page.ts @@ -10,3 +10,17 @@ export const SECTION_LEAD = "typo-body-large sm:typo-headline-extrasmall text-pr /** A link inside running text: always underlined, so it reads as a link without relying on colour. */ export const INLINE_LINK = "rounded-sm text-blue-secondary underline decoration-1 decoration-blue-secondary/40 underline-offset-4 outline-none transition-colors hover:decoration-blue-secondary focus-visible:ring-2 focus-visible:ring-blue-secondary" + +/** + * Vertical rhythm of the redesigned pages. Figma leaves 180px between section blocks at 1728px (Su di noi, Storia): + * 96px on phones, 128px on tablets, 180px from xl. The bottom padding repeats the gap before the footer. + */ +export const PAGE_MAIN = "flex w-full flex-col gap-24 pb-24 md:gap-32 md:pb-32 xl:gap-45 xl:pb-45" + +/** + * The page's opening section. The top padding clears the fixed header: with `Hero`'s own offset the title sits at + * y=286 on desktop, as in every Figma frame. Figma also leaves more air after the hero (~270px at 1728) than between + * sections (180px): the bottom padding adds that difference to the main gap. + */ +export const PAGE_HERO_TOP = "pt-52 md:pt-57.5" +export const PAGE_HERO = `${PAGE_HERO_TOP} pb-8 md:pb-12 xl:pb-24` diff --git a/src/components/storia/hero.tsx b/src/components/storia/hero.tsx index b13235ee..071ac805 100644 --- a/src/components/storia/hero.tsx +++ b/src/components/storia/hero.tsx @@ -1,18 +1,17 @@ import Link from "next/link" import { FiArrowDown } from "react-icons/fi" -import { CONTAINER } from "@/components/layout/page" +import { CONTAINER, PAGE_HERO } from "@/components/layout/page" import { Button } from "@/components/ui/button" import { Hero } from "@/components/ui/hero" -// Figma: a centred XL title and nothing else. The board portraits appear further down, under "I nostri direttivi". export function HistoryHero() { return ( -
    +