From e02fe8cf536e6c6ae2cd524cbefe34924d70eb58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriele=20Vigan=C3=B2?= Date: Tue, 27 Oct 2026 16:42:56 +0000 Subject: [PATCH 1/3] refactor(layout): share one vertical rhythm across the redesigned pages Storia, Su di noi, Struttura, Team and Unisciti each spaced their sections differently (144 to 288px between sections at 1728, hero titles between y=224 and y=282). They now share PAGE_MAIN and PAGE_HERO from components/layout/page.ts, measured on the Figma frames: - 180px between section blocks from xl (Figma, Su di noi and Storia), 128px on tablets, 96px on phones; the same space before the footer. - Hero title at y=286 on desktop as in every Figma frame, with ~270px of air after the hero instead of the regular gap. Unisciti and Team had stretched their gaps (224-288px) to make up for sections that are shorter than in Figma; that space now follows the shared rule instead. Co-Authored-By: Claude Opus 5.5 --- src/app/about/page.tsx | 6 +- src/app/chi-siamo/page.tsx | 3 +- src/app/join/page.tsx | 6 +- src/app/storia/page.tsx | 130 ++++++++++---------- src/app/team/page.tsx | 6 +- src/components/chi-siamo/vision-section.tsx | 4 +- src/components/layout/page.ts | 13 ++ src/components/storia/hero.tsx | 6 +- 8 files changed, 93 insertions(+), 81 deletions(-) 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/join/page.tsx b/src/app/join/page.tsx index 04c84c41..dd56b8da 100644 --- a/src/app/join/page.tsx +++ b/src/app/join/page.tsx @@ -3,7 +3,7 @@ import { AdminSection } from "@/components/join/admin" import { Introduction } from "@/components/join/introduction" import { MembershipSection } from "@/components/join/membership" import { TeamsSection } from "@/components/join/teams" -import { CONTAINER } from "@/components/layout/page" +import { CONTAINER, PAGE_HERO, PAGE_MAIN } from "@/components/layout/page" import { Hero } from "@/components/ui/hero" export const metadata: Metadata = { @@ -14,8 +14,8 @@ export const metadata: Metadata = { export default function JoinPage() { return ( -
-
+
+
+
-
- {/* Figma reserves the right column for an archive photo that doesn't exist yet: until then the text stands alone. + {/* 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/layout/page.ts b/src/components/layout/page.ts index a725375a..8804266f 100644 --- a/src/components/layout/page.ts +++ b/src/components/layout/page.ts @@ -10,3 +10,16 @@ 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 = "pt-52 pb-8 md:pt-57.5 md:pb-12 xl:pb-24" diff --git a/src/components/storia/hero.tsx b/src/components/storia/hero.tsx index b13235ee..3a2164ea 100644 --- a/src/components/storia/hero.tsx +++ b/src/components/storia/hero.tsx @@ -1,18 +1,18 @@ 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 ( -
+