11import type { Metadata } from "next" ;
2- import Image from "next/image" ;
3- import Link from "next/link" ;
2+ import SponsorCard , { type Sponsor } from "@/components/SponsorCard" ;
43
54export const metadata : Metadata = {
65 title : "Sponsors — Team whIRLwind" ,
76 description : "Our generous sponsors." ,
87} ;
98
10- type Sponsor = {
9+ type SponsorTier = {
1110 name : string ;
12- website ?: string ;
13- contribution ?: string ;
14- notes ?: string ;
15- logo ?: string ;
16- logoAlt ?: string ;
17- logoWidth ?: number ;
18- logoHeight ?: number ;
11+ sponsors : Sponsor [ ] ;
1912} ;
2013
21- // TODO: replace placeholder data with the team's actual sponsors when ready.
22- const sponsors : Sponsor [ ] = [
14+ const sponsorTiers : SponsorTier [ ] = [
2315 {
24- name : "Rerun" ,
25- website : "https://rerun.io" ,
26- logo : "/sponsors/rerun.svg" ,
27- logoAlt : "Rerun logo" ,
28- logoWidth : 94 ,
29- logoHeight : 28 ,
16+ name : "Premier Partner" ,
17+ sponsors : [
18+ {
19+ name : "Rerun" ,
20+ website : "https://rerun.io" ,
21+ logo : "/sponsors/rerun.svg" ,
22+ logoAlt : "Rerun logo" ,
23+ logoWidth : 94 ,
24+ logoHeight : 28 ,
25+ logoMaxWidth : "420px" ,
26+ logoDisplayHeight : "96px" ,
27+ captionGapClass : "gap-2" ,
28+ logoWrapperClassName : "px-4 pt-2 pb-1" ,
29+ } ,
30+ ] ,
3031 } ,
3132 {
32- name : "StartUp Village" ,
33- website : "https://startupvillage.nl" ,
34- logo : "/sponsors/startup_village.webp" ,
35- logoAlt : "StartUp Village logo" ,
36- logoWidth : 1500 ,
37- logoHeight : 756 ,
33+ name : "Supporting Partners" ,
34+ sponsors : [
35+ {
36+ name : "StartUp Village" ,
37+ website : "https://startupvillage.nl" ,
38+ logo : "/sponsors/startup_village.webp" ,
39+ logoAlt : "StartUp Village logo" ,
40+ logoWidth : 480 ,
41+ logoHeight : 242 ,
42+ } ,
43+ {
44+ name : "University of Amsterdam" ,
45+ website : "https://uva.nl" ,
46+ logo : "/sponsors/uva.png" ,
47+ logoAlt : "University of Amsterdam logo" ,
48+ logoWidth : 480 ,
49+ logoHeight : 242 ,
50+ } ,
51+ ] ,
3852 } ,
3953] ;
4054
41- function formatWebsite ( url ?: string ) : string | null {
42- if ( ! url ) return null ;
43- return url . replace ( / ^ h t t p s ? : \/ \/ / , "" ) . replace ( / \/ $ / , "" ) ;
44- }
45-
4655export default function SponsorsPage ( ) {
4756 return (
4857 < section className = "page" >
@@ -54,90 +63,21 @@ export default function SponsorsPage() {
5463 </ p >
5564
5665 < div className = "space-y-12" >
57- { sponsors . map ( ( sponsor ) => {
58- const isRerun = sponsor . name === "Rerun" ;
59- const imageStyle = {
60- width : "auto" as const ,
61- maxWidth : isRerun ? "420px" : "240px" ,
62- height : isRerun ? "96px" : "80px" ,
63- } ;
64- const hasDetails = Boolean (
65- sponsor . contribution || sponsor . notes ,
66- ) ;
67- const captionClass = [
68- "flex flex-col items-center text-center" ,
69- isRerun ? "gap-2" : "gap-3" ,
70- ] . join ( " " ) ;
71- const logoWrapperClass = [
72- "flex shrink-0 items-center justify-center rounded-xl" ,
73- isRerun
74- ? "px-4 pt-2 pb-1"
75- : "px-4 py-4 bg-white shadow-sm border border-[rgba(255,255,255,0.12)]" ,
66+ { sponsorTiers . map ( ( tier ) => {
67+ const tierClasses = "sponsor-entry space-y-8" ;
68+ const rowClasses = [
69+ "flex flex-col gap-4" ,
70+ tier . sponsors . length > 1
71+ ? "sm:flex-row sm:flex-wrap sm:gap-6"
72+ : "" ,
7673 ] . join ( " " ) ;
7774
7875 return (
79- < div
80- key = { sponsor . name }
81- className = "sponsor-entry space-y-6"
82- >
83- < div
84- className = { [
85- "flex flex-col gap-6 sm:gap-10" ,
86- hasDetails ? "sm:flex-row sm:items-start" : "items-start" ,
87- ] . join ( " " ) }
88- >
89- < div className = { captionClass } >
90- { sponsor . logo &&
91- sponsor . logoWidth &&
92- sponsor . logoHeight && (
93- < div className = { logoWrapperClass } >
94- < Image
95- src = { sponsor . logo }
96- alt = { sponsor . logoAlt ?? `${ sponsor . name } logo` }
97- width = { sponsor . logoWidth ?? 200 }
98- height = { sponsor . logoHeight ?? 80 }
99- sizes = "(min-width: 640px) 280px, 60vw"
100- className = "object-contain"
101- style = { imageStyle }
102- />
103- </ div >
104- ) }
105-
106- { formatWebsite ( sponsor . website ) && sponsor . website && (
107- < Link
108- href = { sponsor . website }
109- target = {
110- sponsor . website . startsWith ( "http" )
111- ? "_blank"
112- : undefined
113- }
114- rel = {
115- sponsor . website . startsWith ( "http" )
116- ? "noopener noreferrer"
117- : undefined
118- }
119- className = "text-[0.85rem] uppercase tracking-wide text-(--ink-muted) transition-colors duration-200 hover:text-(--orange-400)"
120- >
121- { formatWebsite ( sponsor . website ) }
122- </ Link >
123- ) }
124- </ div >
125-
126- { hasDetails && (
127- < div className = "space-y-3 sm:flex-1" >
128- { sponsor . contribution && (
129- < p className = "max-w-3xl text-[0.95rem] text-(--ink-dim)" >
130- { sponsor . contribution }
131- </ p >
132- ) }
133-
134- { sponsor . notes && (
135- < p className = "text-[0.9rem] text-(--ink-muted)" >
136- { sponsor . notes }
137- </ p >
138- ) }
139- </ div >
140- ) }
76+ < div key = { tier . name } className = { tierClasses } >
77+ < div className = { rowClasses } >
78+ { tier . sponsors . map ( ( sponsor ) => (
79+ < SponsorCard key = { sponsor . name } sponsor = { sponsor } />
80+ ) ) }
14181 </ div >
14282 </ div >
14383 ) ;
0 commit comments