Skip to content

Commit 963ce72

Browse files
committed
feat: enable year-specific content and routing for the sponsorship page, utilizing year-specific data files.
1 parent c5694fe commit 963ce72

8 files changed

Lines changed: 48 additions & 8 deletions

File tree

src/config/routeConfig.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ export const generateYearRoutes = (year: string): RouteConfig[] => {
7171
if (yearConfig.communities) {
7272
routesList.push({ path: `/${year}/communities`, component: yearConfig.communities });
7373
}
74+
if (yearConfig.sponsorship) {
75+
routesList.push({ path: `/${year}/sponsorship`, component: yearConfig.sponsorship });
76+
}
7477

7578
return routesList;
7679
};

src/config/yearRoutes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface YearRouteComponents {
2020
sessionFeedback?: LazyExoticComponent<ComponentType<any>>;
2121
attendee?: LazyExoticComponent<ComponentType<any>>;
2222
communities?: LazyExoticComponent<ComponentType<any>>;
23+
sponsorship?: LazyExoticComponent<ComponentType<any>>;
2324
}
2425

2526
/**
@@ -39,6 +40,7 @@ export const yearRouteConfigs: Record<string, YearRouteComponents> = {
3940
speakerInfo: LazyComponents.SpeakerInformation2026,
4041
speakerDetail: LazyComponents.SpeakerDetailContainer2026,
4142
talkDetail: LazyComponents.TalkDetailContainer2026,
43+
sponsorship: LazyComponents.Sponsorship,
4244
},
4345
"2025": {
4446
home: LazyComponents.HomeWrapper2025,
@@ -55,6 +57,7 @@ export const yearRouteConfigs: Record<string, YearRouteComponents> = {
5557
sessionFeedback: LazyComponents.SessionFeedback2025,
5658
attendee: LazyComponents.AttendeeInformation2025,
5759
communities: LazyComponents.Communities2025,
60+
sponsorship: LazyComponents.Sponsorship,
5861
},
5962
"2024": {
6063
home: LazyComponents.HomeWrapper2024,
@@ -71,6 +74,7 @@ export const yearRouteConfigs: Record<string, YearRouteComponents> = {
7174
sessionFeedback: LazyComponents.SessionFeedback2023,
7275
attendee: LazyComponents.AttendeeInformation2023,
7376
communities: LazyComponents.Communities2023,
77+
sponsorship: LazyComponents.Sponsorship,
7478
},
7579
"2023": {
7680
home: LazyComponents.Home2023Wrapper,
@@ -87,6 +91,7 @@ export const yearRouteConfigs: Record<string, YearRouteComponents> = {
8791
attendee: LazyComponents.AttendeeInformation2023,
8892
communities: LazyComponents.Communities2023,
8993
speakerInfo: LazyComponents.SpeakerInformation2023,
94+
sponsorship: LazyComponents.Sponsorship,
9095
},
9196
};
9297

src/data/2023.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"actionButtons": false,
3+
"brochure": "https://bit.ly/devbcn25-brochure-v3",
34
"carrousel": {
45
"enabled": true
56
},
@@ -41,5 +42,6 @@
4142
"trackNumber": 7,
4243
"tracks": "Java | JVM | Go, Rust, C++, C# | Cloud, DevOps, VMs, Kubernetes | Frontend | Leadership, Agile, Diversity | Big Data, Machine Learning, AI, Python",
4344
"twitter": "https://twitter.com/dev_bcn",
45+
"venue": "La Farga, Hospitalet de Llobregat",
4446
"youtube": "https://www.youtube.com/dev_bcn"
45-
}
47+
}

src/data/2024.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"actionButtons": false,
3+
"brochure": "https://bit.ly/devbcn25-brochure-v3",
34
"carrousel": {
45
"enabled": true
56
},
@@ -43,5 +44,6 @@
4344
"trackNumber": 5,
4445
"tracks": "Java & JVM | Cloud, DevOps, VMs, Kubernetes | Frontend, JavaScript, TypeScript, Angular, WASM | Leadership, Agile, Diversity | Big Data, Machine Learning, AI, Python",
4546
"twitter": "https://twitter.com/dev_bcn",
47+
"venue": "La Farga, Hospitalet de Llobregat",
4648
"youtube": "https://www.youtube.com/dev_bcn"
47-
}
49+
}

src/data/2025.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"actionButtons": false,
3+
"brochure": "https://bit.ly/devbcn25-brochure-v3",
34
"carrousel": {
45
"enabled": true
56
},
@@ -41,5 +42,6 @@
4142
"trackNumber": 5,
4243
"tracks": "Java & JVM | Cloud, DevOps, VMs, Kubernetes | Frontend, JavaScript, TypeScript, Angular, WASM | Leadership, Agile, Diversity | Big Data, Machine Learning, AI, Python",
4344
"twitter": "https://twitter.com/dev_bcn",
45+
"venue": "La Farga, Hospitalet de Llobregat",
4446
"youtube": "https://www.youtube.com/dev_bcn"
4547
}

src/data/2026.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"actionButtons": true,
3+
"brochure": "https://bit.ly/devbcn25-brochure-v3",
34
"carrousel": {
45
"enabled": false
56
},
@@ -41,5 +42,6 @@
4142
"trackNumber": 5,
4243
"tracks": "Java & JVM | Cloud, DevOps, VMs, Kubernetes | Frontend, JavaScript, TypeScript, Angular, WASM | Leadership, Agile, Diversity | Big Data, Machine Learning, AI, Python",
4344
"twitter": "https://twitter.com/dev_bcn",
45+
"venue": "World Trade Center, Barcelona",
4446
"youtube": "https://www.youtube.com/dev_bcn"
4547
}

src/views/Travel/Travel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { FC } from "react";
12
import { useParams } from "react-router";
23
import { Venue } from "./Venue";
34
import { ToBarcelona } from "./ToBarcelona";

src/views/sponsorship/Sponsorship.tsx

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
StyledSpeakersSection,
1212
} from "../Speakers/Speakers.style";
1313
import { StyledMarginBottom } from "../Talks/Talks.style";
14-
import data from "@data/2025.json";
1514
import { format } from "date-fns";
1615
import Flicking from "@egjs/react-flicking";
1716
import { AutoPlay } from "@egjs/flicking-plugins";
@@ -21,6 +20,18 @@ import { gaEventTracker } from "@components/analytics/Analytics";
2120
import { useDocumentTitleUpdater } from "@hooks/useDocumentTitleUpdate";
2221
// @ts-expect-error some quirky import
2322
import { AnimatePresence, motion } from "framer-motion";
23+
import { useParams } from "react-router";
24+
import data2023 from "@data/2023.json";
25+
import data2024 from "@data/2024.json";
26+
import data2025 from "@data/2025.json";
27+
import data2026 from "@data/2026.json";
28+
29+
const editions: Record<string, typeof data2026> = {
30+
"2023": data2023,
31+
"2024": data2024,
32+
"2025": data2025,
33+
"2026": data2026,
34+
};
2435

2536
const StyledWaveContainer = styled.div`
2637
background: ${Color.DARK_BLUE};
@@ -92,6 +103,9 @@ const StyleMoreIcon = styled.img`
92103
`;
93104

94105
const Sponsorship: FC<React.PropsWithChildren<unknown>> = () => {
106+
const { id } = useParams<{ id: string }>();
107+
const edition = id || "2026";
108+
const data = editions[edition] || editions["2026"];
95109
const { width } = useWindowSize();
96110
const plugins = [
97111
new AutoPlay({ duration: 2000, direction: "NEXT", stopOnHover: false }),
@@ -137,7 +151,7 @@ const Sponsorship: FC<React.PropsWithChildren<unknown>> = () => {
137151
subtitle={`The DevBcn is the yearly event organised by Conferencia DevBcn S.L. Conference Talks will held on ${format(
138152
new Date(data.startDay),
139153
"MMMM do, yyyy",
140-
)} at La Farga, Hospitalet de Llobregat`}
154+
)} at ${data.venue}`}
141155
color={Color.DARK_BLUE}
142156
/>
143157
</motion.div>
@@ -275,7 +289,7 @@ const Sponsorship: FC<React.PropsWithChildren<unknown>> = () => {
275289
{format(new Date(data.startDay), "MMMM do")}
276290
{" ".concat(format(data.endDay, "do"))}
277291
</strong>{" "}
278-
at the iconic La Farga, Hospitalet de Llobregat. This year,
292+
at the iconic {data.venue}. This year,
279293
we&#39;re diving deep into the realms of Java, JVM, Cloud,
280294
DevOps, Frontend technologies, Leadership strategies, and
281295
groundbreaking advancements in Big Data and AI.
@@ -294,7 +308,7 @@ const Sponsorship: FC<React.PropsWithChildren<unknown>> = () => {
294308
than ever. Curious? Access our{" "}
295309
<strong>
296310
<a
297-
href="https://bit.ly/devbcn25-brochure-v3"
311+
href={data.brochure}
298312
target="_blank"
299313
rel="noreferrer"
300314
>
@@ -310,7 +324,7 @@ const Sponsorship: FC<React.PropsWithChildren<unknown>> = () => {
310324
>
311325
<Button
312326
text="Get the Brochure"
313-
link="https://bit.ly/devbcn25-brochure-v3"
327+
link={data.brochure}
314328
onClick={handleCLick}
315329
/>
316330
</motion.div>
@@ -373,14 +387,23 @@ const Sponsorship: FC<React.PropsWithChildren<unknown>> = () => {
373387
<iframe
374388
width="1024"
375389
height="768"
376-
src="https://www.youtube.com/embed/k7iMIXtNKyo"
390+
src="https://www.youtube.com/embed/AHWSu1WE288"
377391
title="YouTube video player"
378392
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
379393
allowFullScreen
380394
></iframe>
381395
</motion.div>
382396
<h4>Explore DevBcn Talks Online!</h4>
383397
<ul>
398+
<li>
399+
<a
400+
rel="noreferrer"
401+
target="_blank"
402+
href="https://youtube.com/playlist?list=PLzJFNZtyAbyyfUadLCuSc-8CdHct8NeSa&si=7lgKQAtEncL-332O"
403+
>
404+
🎥 DevBcn 2025 - recorded sessions
405+
</a>
406+
</li>
384407
<li>
385408
<a
386409
rel="noreferrer"

0 commit comments

Comments
 (0)