diff --git a/src/app/page.tsx b/src/app/page.tsx index 02969080..aba14d82 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -3,6 +3,9 @@ import { Hero } from "@/components/home/hero" import { Materials } from "@/components/home/materials" import { Projects } from "@/components/home/projects" +// The featured projects come from the backend at request time, like /projects +export const dynamic = "force-dynamic" + export default function Home() { return (
diff --git a/src/assets/images/storia/progetti.png b/src/assets/images/storia/progetti.png index 4e6c620e..6e77d5e0 100644 Binary files a/src/assets/images/storia/progetti.png and b/src/assets/images/storia/progetti.png differ diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index 3f0c2c73..4a14b336 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -7,8 +7,8 @@ import telegram from "@/assets/icons/telegram.svg" import { CardMultipleIcons } from "@/components/card-multiple-icons" import { Glass } from "@/components/glass" import { CONTAINER, SECTION_TITLE } from "@/components/layout/page" -import { regulationsHref, statuteHref } from "@/components/structure/constants" import { Button } from "@/components/ui/button" +import { regulationsHref, statuteHref } from "@/lib/documents" import { cn } from "@/lib/utils" const socials: { label: string; href: string; icon: ReactNode }[] = [ diff --git a/src/components/home/about-us.tsx b/src/components/home/about-us.tsx index 9011e323..14c55b45 100644 --- a/src/components/home/about-us.tsx +++ b/src/components/home/about-us.tsx @@ -4,8 +4,8 @@ import { Button } from "@/components/ui/button" export function AboutUs() { return ( -
-

+
+

PoliNetwork unisce gli studenti del Poli: gruppi, risorse e supporto, tutti in un'unica community.

diff --git a/src/components/home/projects.tsx b/src/components/home/projects.tsx index 99ec6578..67e7e845 100644 --- a/src/components/home/projects.tsx +++ b/src/components/home/projects.tsx @@ -1,53 +1,19 @@ import Link from "next/link" import { FiArrowUpRight } from "react-icons/fi" -import { CardCaption } from "@/components/card-caption" import { CONTAINER } from "@/components/layout/page" import { PeekCarousel } from "@/components/peek-carousel" +import { ProjectCard } from "@/components/projects/project-card" import { Button } from "@/components/ui/button" import { cn } from "@/lib/utils" +import { getAllProjects } from "@/queries/projects" -const featuredCards = [ - { - title: "WeBeepSync", - caption: - "WeBeep Sync è una semplice app, user-friendly e senza compromessi che serve per tenere sincronizzati tutti i tuoi file di WeBeep.", - href: "https://github.com/toto04/webeep-sync", - }, - { - title: "PolimiSchedule", - caption: - "Genera un file iCalendar (.ics) a partire dal formato testuale dell’Orario delle lezioni. Possibilità di importare su Google Calendar.", - href: "https://github.com/jacopo-j/polimi-schedule", - }, - { - title: "WiFiLinux", - caption: "Scarica ed esegui lo script Python per attivare la connessione permanente al WiFi Polimi", - href: "https://github.com/PoliNetworkOrg/WiFiLinux", - }, - { - title: "The TOL Project", - caption: "Un simulatore gratuito del test di ammissione per le aspiranti matricole di Ingegneria del PoliMi.", - href: "https://tol.polinetwork.org/", - }, -] as const +export async function Projects() { + const live = (await getAllProjects()).filter((project) => project.category !== "deprecated") + // The first four, in the order set from the admin dashboard + const featured = live.slice(0, 4) + // Without the backend there is nothing to count: the title then stays a plain "Projects" + const title = live.length > 1 ? `${live.length} Projects` : live.length === 1 ? "1 Project" : "Projects" -function FeaturedProjectCard({ className, ...card }: (typeof featuredCards)[number] & { className?: string }) { - return ( - - {new URL(card.href).hostname} - - - } - /> - ) -} - -export function Projects() { return (

- 15+ Projects + {title}

@@ -77,18 +43,24 @@ export function Projects() {
-
- {featuredCards.map((card) => ( - - ))} -
+ {featured.length > 0 && ( + <> +
    + {featured.map((project) => ( +
  • + +
  • + ))} +
- card.title} - render={(card) => } - className="pt-6 sm:hidden" - /> + project.id} + render={(project) => } + className="pt-6 sm:hidden" + /> + + )}
) } diff --git a/src/components/join/admin.tsx b/src/components/join/admin.tsx index 12eb0332..be6c3f31 100644 --- a/src/components/join/admin.tsx +++ b/src/components/join/admin.tsx @@ -1,12 +1,15 @@ import Image from "next/image" +import Link from "next/link" +import { FiMail } from "react-icons/fi" import connectorFirst from "@/assets/icons/join/connector-first.svg" import connectorSecond from "@/assets/icons/join/connector-second.svg" import { InfoCard } from "@/components/collabora/info-card" import { Highlight } from "@/components/collabora/section" -import { CONTAINER, SECTION_LEAD, SECTION_TITLE } from "@/components/layout/page" +import { CONTAINER, INLINE_LINK, SECTION_LEAD, SECTION_TITLE } from "@/components/layout/page" +import { Button } from "@/components/ui/button" import { cn } from "@/lib/utils" import { JoinCards } from "./cards" -import { adminCards, adminSteps } from "./constants" +import { adminApplicationEmail, adminCards, adminSteps } from "./constants" const connectors = [connectorFirst, connectorSecond] @@ -55,6 +58,21 @@ export function AdminSection() { ))} +
+

+ Il primo passo è farti conoscere nel{" "} + + gruppo del tuo corso + + , rispondendo a chi ha bisogno. Se vuoi proporti, scrivi al team HR: ti diremo come continuare. +

+ +
) diff --git a/src/components/join/constants.ts b/src/components/join/constants.ts index c5f262fb..2c078184 100644 --- a/src/components/join/constants.ts +++ b/src/components/join/constants.ts @@ -15,6 +15,7 @@ import report from "@/assets/icons/join/report.svg" import starShine from "@/assets/icons/join/star-shine.svg" import statute from "@/assets/icons/join/statute.svg" import type { InfoCardData } from "@/components/collabora/info-card" +import { memberPrivacyHref, regulationsHref, statuteHref } from "@/lib/documents" const iconClassName = "mr-3 h-auto w-7 md:mr-0 md:w-13" @@ -88,23 +89,25 @@ export const teamCards: InfoCardData[] = [ }, ] +export const adminApplicationEmail = `mailto:hr@polinetwork.org?subject=${encodeURIComponent("Candidatura admin")}` + export const membershipEmail = `mailto:info@polinetwork.org?subject=${encodeURIComponent("Richiesta ammissione sotto la qualifica di socio")}` export const membershipSteps = [ { title: "Consulta lo Statuto dell’Associazione", icon: statute, - href: "https://github.com/PoliNetworkOrg/Statuto/blob/main/full.pdf", + href: statuteHref, }, { title: "Leggi il Regolamento Interno", icon: regulations, - href: "https://github.com/PoliNetworkOrg/RegolamentoInterno/blob/main/RaccoltaRegolamentiInterni.pdf", + href: regulationsHref, }, { title: "Dai un occhio alle Privacy Policy", icon: privacy, - href: "https://github.com/PoliNetworkOrg/PrivacyPolicies/releases/download/v1.0/regolamento_soci.pdf", + href: memberPrivacyHref, }, { title: "Invia una mail a info@polinetwork.org", icon: mail, href: membershipEmail }, { title: "Attendi la nostra risposta", icon: reply }, diff --git a/src/components/storia/projects.tsx b/src/components/storia/projects.tsx index aae29a9e..2599d18d 100644 --- a/src/components/storia/projects.tsx +++ b/src/components/storia/projects.tsx @@ -60,7 +60,7 @@ export function HistoryProjects() { Il sito PoliNetwork su computer e smartphone diff --git a/src/components/structure/constants.ts b/src/components/structure/constants.ts index 9750ef89..2a753b12 100644 --- a/src/components/structure/constants.ts +++ b/src/components/structure/constants.ts @@ -83,7 +83,3 @@ export const legalFacts = [ icon: FiFlag, }, ] - -export const statuteHref = "https://github.com/PoliNetworkOrg/Statuto/blob/main/full.pdf" -export const regulationsHref = - "https://github.com/PoliNetworkOrg/RegolamentoInterno/blob/main/RaccoltaRegolamentiInterni.pdf" diff --git a/src/components/structure/legal-status.tsx b/src/components/structure/legal-status.tsx index 5987707f..d82bcf7a 100644 --- a/src/components/structure/legal-status.tsx +++ b/src/components/structure/legal-status.tsx @@ -3,8 +3,9 @@ import { Glass } from "@/components/glass" import { GradientIcon } from "@/components/gradient-icon" import { SECTION_TITLE } from "@/components/layout/page" import { Button } from "@/components/ui/button" +import { regulationsHref, statuteHref } from "@/lib/documents" import { cn } from "@/lib/utils" -import { legalFacts, regulationsHref, statuteHref } from "./constants" +import { legalFacts } from "./constants" export function LegalStatus() { return ( diff --git a/src/components/team/constants.ts b/src/components/team/constants.ts index 383c6ed5..91ae49ce 100644 --- a/src/components/team/constants.ts +++ b/src/components/team/constants.ts @@ -76,5 +76,5 @@ export const teams: Team[] = [ ] export function applicationHref(team?: string) { - return `mailto:direttivo@polinetwork.org?subject=${encodeURIComponent(team ? `Candidatura – ${team}` : "Candidatura PoliNetwork")}` + return `mailto:hr@polinetwork.org?subject=${encodeURIComponent(team ? `Candidatura – ${team}` : "Candidatura PoliNetwork")}` } diff --git a/src/lib/documents.ts b/src/lib/documents.ts new file mode 100644 index 00000000..d952d6ed --- /dev/null +++ b/src/lib/documents.ts @@ -0,0 +1,6 @@ +/** The association's public documents, linked from /about, /join and the footer. */ +export const statuteHref = "https://github.com/PoliNetworkOrg/Statuto/blob/main/full.pdf" +export const regulationsHref = + "https://github.com/PoliNetworkOrg/RegolamentoInterno/blob/main/RaccoltaRegolamentiInterni.pdf" +export const memberPrivacyHref = + "https://github.com/PoliNetworkOrg/PrivacyPolicies/releases/download/v1.0/regolamento_soci.pdf" diff --git a/src/lib/utils.ts b/src/lib/utils.ts index b2bc774d..71c6e6c2 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -13,6 +13,7 @@ const twMerge = extendTailwindMerge({ typo: [ "display-fluid-extralarge", "display-fluid-large", + "display-fluid-medium", "display-extralarge", "display-large", "display-medium", diff --git a/src/styles/typography.css b/src/styles/typography.css index e85c5d0d..71784f4e 100644 --- a/src/styles/typography.css +++ b/src/styles/typography.css @@ -31,6 +31,11 @@ @apply font-dm-sans font-medium text-[clamp(2rem,1.5rem+3vw,4.5rem)] leading-[1.2] tracking-[-0.02em]; } +@utility typo-display-fluid-medium { + /* 28px at 320px viewport → 48px from ~1600px, for statements that sit between sections */ + @apply font-dm-sans font-medium text-[clamp(1.75rem,1.25rem+1.6vw,3rem)] leading-[1.2] tracking-[-0.02em]; +} + @utility typo-display-fluid-extralarge { /* 44px at 402px viewport → 120px at 1728px (display-extralarge) */ @apply font-dm-sans font-medium text-[clamp(2.75rem,1.25rem+6vw,7.5rem)] leading-[1.2] tracking-[-0.02em];