Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
38ca613
fix(not-found): render the 404 per request so it hydrates on the requ…
viganogabriele Nov 15, 2026
4888a8a
fix(seo): absolute Open Graph URLs, Italian metadata, robots.txt and …
viganogabriele Nov 15, 2026
73d0424
fix(a11y): header landmark, readable wizard steps and a usable search…
viganogabriele Nov 15, 2026
7792daa
fix(copy): Italian titles on Gruppi and Progetti
viganogabriele Nov 15, 2026
c83c1d9
perf(images): downscale the oversized source images
viganogabriele Nov 15, 2026
5b8b027
fix(matricole): show the key resources on phones too
viganogabriele Nov 15, 2026
c4c7049
fix(groups): singular group count and full course names on phones
viganogabriele Nov 15, 2026
9ad257e
fix(faqs): hide categories without answers
viganogabriele Nov 15, 2026
abb42a0
fix(associations): use the X and TikTok logos for their links
viganogabriele Nov 15, 2026
b866bec
fix(nav): a way back from the standalone pages
viganogabriele Nov 15, 2026
f95f23a
fix(wizard): school cards that fit on tablets and phones
viganogabriele Nov 15, 2026
ef3f91f
fix(copy): typos and stale references in Contattaci, Unisciti, Collab…
viganogabriele Nov 15, 2026
a5814a3
fix(storia): readable step labels and the current board in view on ph…
viganogabriele Nov 15, 2026
9a809ad
fix(projects): say how to send a project proposal
viganogabriele Nov 15, 2026
b11458c
fix(struttura): four operational teams, International removed
viganogabriele Nov 15, 2026
7a40e56
fix(input): drop the container's inherited vertical padding
viganogabriele Nov 15, 2026
adff6a5
fix(storia): keep long step labels inside their column on phones
viganogabriele Nov 16, 2026
5316164
fix(input): focus the input from anywhere in the field
viganogabriele Nov 16, 2026
d4427ad
fix(not-found): keep the 404 static and read the route from the route…
BIA3IA Nov 17, 2026
400c452
fix(wizard): shrink the school titles without changing the shared Car…
BIA3IA Nov 17, 2026
aeb1d83
fix(wizard): keep the step labels inside their columns below 340px
BIA3IA Nov 17, 2026
3ef0aa9
build(docker): pass SITE_URL at build time
BIA3IA Nov 17, 2026
2b1898c
Merge branch 'main' into fix/site-audit
BIA3IA Nov 17, 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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# should be updated accordingly.

BACKEND_URL=http://localhost:3000
# Public origin of the site, for absolute URLs in metadata and the sitemap (default: https://polinetwork.org).
# Read at build time too: static pages, robots.txt and the sitemap keep the value the build had.
# SITE_URL=https://polinetwork.org

# PoliNetwork IdP: required, the backend refuses calls without a token. IDP_INTERNAL_URL is optional.
IDP_PUBLIC_URL=https://auth.polinetwork.org
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ COPY . .
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED=1
ENV SKIP_ENV_VALIDATION=true
# Public origin for absolute URLs in metadata, robots.txt and the sitemap. The static pages are generated here, so it
# is read at build time; empty falls back to https://polinetwork.org.
ARG SITE_URL
ENV SITE_URL=${SITE_URL}

RUN corepack enable pnpm && pnpm run build

Expand All @@ -29,6 +33,9 @@ FROM base AS runner
WORKDIR /app

ENV NODE_ENV=production
# The pages rendered per request read it at runtime: keep it the same as at build time
ARG SITE_URL
ENV SITE_URL=${SITE_URL}
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED=1

Expand Down
Binary file modified public/icons/architettura.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/civile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/ingegneria.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/app/groups/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function Home() {
<div className="flex min-h-svh flex-col items-center gap-16 px-6 py-64 md:gap-20 md:py-49">
<div className="flex w-full flex-col items-center gap-5 text-center">
<h1 className="typo-display-fluid-extralarge w-fit bg-linear-to-b from-text-primary to-text-secondary bg-clip-text py-4 text-transparent md:py-10">
Groups
Gruppi
</h1>
<GroupSearch />
</div>
Expand Down
17 changes: 10 additions & 7 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ThemeProvider } from "@/components/theme-provider"
import "@/styles/globals.css"
import type { Metadata } from "next"
import { DM_Sans, Poppins, Red_Hat_Text } from "next/font/google"
import { SITE_URL } from "@/lib/site"

const poppinsFont400 = Poppins({
variable: "--font-poppins",
Expand All @@ -23,36 +24,38 @@ const redHatTextFont = Red_Hat_Text({
subsets: ["latin"],
})

const desc = "The online community of Politecnico di Milano brought to you by its students"
const desc = "La community online del Politecnico di Milano, gestita dagli studenti per gli studenti"

export const metadata: Metadata = {
// Resolves the relative image URLs: without it Next.js falls back to http://localhost:3000
metadataBase: SITE_URL,
title: {
default: "PoliNetwork APS",
template: "%s | PoliNetwork APS",
},
description: desc,
icons: [{ rel: "icon", url: "/favicon.ico" }],
// No fixed `url`: pages inherit this object, and a single URL would point every page's preview at the homepage
openGraph: {
url: "https://polinetwork.org/",
siteName: "PoliNetwork",
locale: "it_IT",
images: [
{
url: "/polinetwork_meta.png",
width: 200,
height: 200,
alt: desc,
alt: "Logo di PoliNetwork",
},
],
type: "website",
},
// Title and description come from the Open Graph tags of each page; the image is a square logo, not a banner
twitter: {
card: "summary_large_image",
title: "PoliNetwork/polinetwork.org",
description: desc,
card: "summary",
images: [
{
url: "/polinetwork_meta.png",
alt: desc,
alt: "Logo di PoliNetwork",
},
],
site: "@PoliNetworkAPS",
Expand Down
12 changes: 10 additions & 2 deletions src/app/matricole/guida/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Metadata } from "next"
import { FiDownload } from "react-icons/fi"
import Link from "next/link"
import { FiArrowLeft, FiDownload } from "react-icons/fi"
import { CardSplit } from "@/components/card-split"
import { CONTAINER } from "@/components/layout/page"
import { Button } from "@/components/ui/button"
Expand Down Expand Up @@ -27,6 +28,13 @@ export default async function GuidaMatricolaPage() {
// Standalone page (no header or footer, see `HIDDEN_ROUTES`): the content stays centered on screen, with the
// shared gutters. The vertical padding keeps it off the edges on short landscape screens.
<main className={cn(CONTAINER, "flex min-h-svh flex-col items-center justify-center gap-10 py-16 sm:gap-12")}>
{/* Without header and footer, this is the only way back into the site */}
<Link
href="/matricole"
className="typo-body-medium flex w-fit items-center gap-2 rounded-sm text-blue-secondary underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-blue-secondary"
>
<FiArrowLeft aria-hidden className="size-4 shrink-0" /> Matricole
</Link>
{/* Not Hero: this page has no header, and Hero's spacing would push the download below the fold on phones */}
<div className="flex flex-col items-center gap-4 text-center sm:gap-6">
<h1 className="typo-display-fluid-extralarge text-balance bg-linear-to-b from-text-primary to-text-secondary bg-clip-text pb-2 text-transparent">
Expand All @@ -41,7 +49,7 @@ export default async function GuidaMatricolaPage() {
textSecondary="Versione Attuale"
textSecondarySmall={`Rilasciata il: ${formattedDate}`}
action={
<Button asChild size="icon-lg" aria-label="Scarica l'Ultima Versione">
<Button asChild size="icon-lg" aria-label="Scarica l'ultima versione (PDF)">
<a href={guida.url} download>
<FiDownload />
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default async function ProjectsPage() {
return (
<main className={PAGE_MAIN}>
<section className={`${CONTAINER} ${PAGE_HERO}`}>
<Hero title="Projects" description="Esplora e contribuisci ai progetti degli studenti" />
<Hero title="Progetti" description="Esplora e contribuisci ai progetti degli studenti" />
</section>
<CommunityNews projects={news} />
<Collection projects={general} searchable={projects} />
Expand Down
9 changes: 9 additions & 0 deletions src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { MetadataRoute } from "next"
import { SITE_URL } from "@/lib/site"

export default function robots(): MetadataRoute.Robots {
return {
rules: { userAgent: "*", allow: "/" },
sitemap: new URL("/sitemap.xml", SITE_URL).href,
}
}
29 changes: 29 additions & 0 deletions src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { MetadataRoute } from "next"
import { SITE_URL } from "@/lib/site"

/** The pages reachable from the navigation; the per-course pages are listed by their wizards */
const ROUTES = [
"/",
"/chi-siamo",
"/storia",
"/about",
"/team",
"/join",
"/collabora",
"/contact",
"/groups",
"/groups/didattica",
"/groups/extra",
"/matricole",
"/matricole/guida",
"/associations",
"/guides",
"/guides/generali",
"/guides/corso",
"/faqs",
"/projects",
]

export default function sitemap(): MetadataRoute.Sitemap {
return ROUTES.map((route) => ({ url: new URL(route, SITE_URL).href }))
}
Binary file modified src/assets/images/collabora_associations.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/collabora_company.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/storia/ale-he.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/storia/alessandro-gabbini.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/storia/elia-falzoni.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/storia/elisabeta-hoxhaj.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/storia/gabriele-vigano.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/storia/lorenzo-corallo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/images/storia/tommaso-morganti.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 5 additions & 14 deletions src/components/associations/associations-list.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
import {
FiFacebook,
FiGlobe,
FiInstagram,
FiLinkedin,
FiMail,
FiMusic,
FiSend,
FiVideo,
FiX,
FiYoutube,
} from "react-icons/fi"
import { FaTiktok, FaXTwitter } from "react-icons/fa6"
import { FiFacebook, FiGlobe, FiInstagram, FiLinkedin, FiMail, FiMusic, FiSend, FiYoutube } from "react-icons/fi"
import AccordionAssociation from "@/components/accordion-association"
import type { GradientIconType } from "@/components/gradient-icon"
import { EMPTY_STATE } from "@/components/layout/page"
Expand All @@ -23,8 +13,9 @@ const LINK_CONFIG: { key: keyof AssociationLinks; label: string; icon: GradientI
{ key: "email", label: "Email", icon: FiMail, mailto: true },
{ key: "facebook", label: "Facebook", icon: FiFacebook },
{ key: "instagram", label: "Instagram", icon: FiInstagram },
{ key: "tiktok", label: "TikTok", icon: FiVideo },
{ key: "x", label: "X", icon: FiX },
{ key: "tiktok", label: "TikTok", icon: FaTiktok },
// FiX is a close (×) icon, not the X logo
{ key: "x", label: "X", icon: FaXTwitter },
{ key: "youtube", label: "Youtube", icon: FiYoutube },
{ key: "telegram", label: "Telegram", icon: FiSend },
{ key: "linkedin", label: "LinkedIn", icon: FiLinkedin },
Expand Down
4 changes: 2 additions & 2 deletions src/components/background/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client"

import { usePathname } from "next/navigation"
import { useEffect, useLayoutEffect, useRef, useState } from "react"
import { Shape } from "@/components/shapes"
import { useRoutePathname } from "@/utils/use-route-pathname"
import { animateScene } from "./animate"
import { LOOPER_ASPECT, Looper } from "./looper"
import { type SceneShape, sceneSegment } from "./scene"
Expand All @@ -17,7 +17,7 @@ const INITIAL_SEGMENTS = 2
* Every page gets a fresh scene, rendered directly in its final place.
*/
export function Background() {
const pathname = usePathname()
const pathname = useRoutePathname()
return <Scene key={pathname} pathname={pathname} />
}

Expand Down
3 changes: 2 additions & 1 deletion src/components/card-course.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export function CardCourse({
// Always rendered inside a link or button: the row itself is the hover target
<Card className="typo-body-large flex h-fit w-full flex-row items-center gap-2 px-5 py-3.75 font-normal leading-6 tracking-[0.03125rem] transition-colors hover:bg-white/70 sm:gap-0">
<div className="flex min-w-0 flex-1 flex-col gap-1 sm:contents">
<CardContent className="min-w-0 truncate sm:flex-1">{courseName}</CardContent>
{/* Two lines on phones: truncated to one, long names (e.g. Ingegneria dei Materiali e delle Nanotecnologie) lost their key word */}
<CardContent className="line-clamp-2 min-w-0 sm:flex-1 sm:truncate">{courseName}</CardContent>
{(location || language) && (
<div className="flex min-w-0 items-center gap-4 sm:contents">
{location && (
Expand Down
3 changes: 3 additions & 0 deletions src/components/card-icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export function CardIcon(props: CardIconProps) {
hoverEffect = Boolean(href || onClick),
align = "center",
className,
titleClassName,
} = props
const description = "description" in props ? props.description : undefined
const cta = "cta" in props ? props.cta : undefined
Expand Down Expand Up @@ -54,6 +55,7 @@ export function CardIcon(props: CardIconProps) {
<h3
className={cn(
getTitleSizeClasses(size),
titleClassName,
"bg-linear-to-b from-blue-secondary to-blue-primary bg-clip-text text-transparent"
)}
>
Expand All @@ -78,6 +80,7 @@ export function CardIcon(props: CardIconProps) {
<h3
className={cn(
getTitleSizeClasses(size),
titleClassName,
"bg-linear-to-b from-blue-secondary to-blue-primary bg-clip-text text-transparent",
isDescriptionCard || align === "start" ? "text-left" : "text-center"
)}
Expand Down
2 changes: 2 additions & 0 deletions src/components/card-icon/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export type SharedCardProps = {
/** Defaults to whether the card has a link or an action. */
hoverEffect?: boolean
className?: string
/** Overrides the title's type size from `size`, e.g. a smaller title on phones. */
titleClassName?: string
}

export type CardIconProps = SharedCardProps & {
Expand Down
2 changes: 1 addition & 1 deletion src/components/chi-siamo/numbers-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const stats = [
{ value: "30+", label: "corsi di laurea coperti", icon: FiBook },
{ value: "45k+", label: "studenti raggiunti ogni anno", icon: FiUser },
{ value: "100+", label: "admin volontari su tutte le sedi", icon: FiUsers },
{ value: "5", label: "team operativi", icon: FiHeadphones },
{ value: "4", label: "team operativi", icon: FiHeadphones },
{ value: "100%", label: "progetti tecnici rilasciati open source", icon: FiBookOpen },
] as const

Expand Down
2 changes: 1 addition & 1 deletion src/components/collabora/about-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const cards: InfoCardData[] = [
descriptionClassName: "md:-mr-px",
},
{
title: "5",
title: "4",
description: (
<>
<Highlight>Team Operativi</Highlight> pronti a collaborare
Expand Down
2 changes: 1 addition & 1 deletion src/components/collabora/collaboration-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function CollaborationSection() {
Collaborare con noi significa <Highlight>accedere a questa community in modo diretto</Highlight>. Non siamo
un canale pubblicitario e non accettiamo promozioni commerciali generiche: ogni collaborazione viene
valutata in termini di <Highlight>valore concreto per gli studenti del Politecnico</Highlight>{" "}
<Aside>(e nel rispetto dei nostri valori sanciti sul nostro statuto).</Aside>
<Aside>(e nel rispetto dei valori sanciti dal nostro statuto).</Aside>
</p>
<p className="md:max-w-161">
Se il progetto ha senso per la nostra community, siamo disponibili a costruirlo insieme!
Expand Down
4 changes: 2 additions & 2 deletions src/components/conditional-footer.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client"

import { usePathname } from "next/navigation"
import type { ReactNode } from "react"
import { matchesAnyRoutePrefix } from "@/utils/route-match"
import { useRoutePathname } from "@/utils/use-route-pathname"

const HIDDEN_EXACT = ["/matricole/guida"]
const HIDDEN_PREFIXES = ["/groups"]
Expand All @@ -12,7 +12,7 @@ const HIDDEN_PREFIXES = ["/groups"]
* instead of being bundled under this client boundary.
*/
export function ConditionalFooter({ children }: { children: ReactNode }) {
const pathname = usePathname()
const pathname = useRoutePathname()
const hidden = HIDDEN_EXACT.includes(pathname) || matchesAnyRoutePrefix(pathname, HIDDEN_PREFIXES)
if (hidden) return null
return children
Expand Down
5 changes: 2 additions & 3 deletions src/components/contact/email-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ const contactCards: ContactCardData[] = [
},
{
title: "Consiglio Direttivo",
description: "Per richieste formali, segnalazioni di problemi o questioni che non rientrano nelle categorie sopra.",
description: "Per richieste formali, segnalazioni di problemi o questioni che non rientrano nelle altre categorie.",
email: "direttivo@polinetwork.org",
},
{
title: "Candidature",
description: (
<>
Se vuoi candidarti come admin o come membro di un team, ti consigliamo di passare dal form disponibile nella
pagina{" "}
Se vuoi candidarti come admin o come membro di un team, segui le indicazioni nella pagina{" "}
<Link href="/join" className={INLINE_LINK}>
Unisciti a noi
</Link>
Expand Down
28 changes: 15 additions & 13 deletions src/components/faqs/faqs-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,21 @@ const ICONS: Record<string, IconType> = {
}

export function FaqsTabs({ categories }: { categories: FaqCategory[] }) {
const tabs = categories.map((category) => ({
value: String(category.categoryId),
label: category.titleIt,
icon: (category.icon && ICONS[category.icon]) || FiHelpCircle,
accordionItems: category.faqs.map((faq) => ({
value: String(faq.faqId),
trigger: faq.titleIt,
// Answers are plain text: keep the line breaks the editors typed
content: <p className="whitespace-pre-line">{faq.descriptionIt}</p>,
})),
}))
// Open on a category that has answers
const defaultTab = tabs.find((tab) => tab.accordionItems.length > 0) ?? tabs[0]
// A category without answers would only open on an empty panel
const tabs = categories
.filter((category) => category.faqs.length > 0)
.map((category) => ({
value: String(category.categoryId),
label: category.titleIt,
icon: (category.icon && ICONS[category.icon]) || FiHelpCircle,
accordionItems: category.faqs.map((faq) => ({
value: String(faq.faqId),
trigger: faq.titleIt,
// Answers are plain text: keep the line breaks the editors typed
content: <p className="whitespace-pre-line">{faq.descriptionIt}</p>,
})),
}))
const defaultTab = tabs[0]

return (
<div className="mx-auto flex w-full max-w-225 flex-col gap-16 md:gap-24">
Expand Down
2 changes: 1 addition & 1 deletion src/components/groups/groups-result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function GroupSection({ title, groups }: { title: string; groups: VisibleGroup[]
<div className="flex items-center justify-between gap-4">
<h2 className="typo-title-large md:typo-headline-small text-text-primary">{title}</h2>
<p className="typo-label-medium shrink-0 rounded-full border border-white/50 bg-background-blur px-3 py-1 text-text-secondary">
{merged.length} Gruppi
{merged.length} {merged.length === 1 ? "gruppo" : "gruppi"}
</p>
</div>
<div className="flex flex-col gap-3">
Expand Down
Loading
Loading