Skip to content

Commit 5c21af7

Browse files
committed
Add more events pages.
1 parent a7c98c5 commit 5c21af7

File tree

5 files changed

+722
-14
lines changed

5 files changed

+722
-14
lines changed

src/components/Events/events.tsx

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,45 @@ export interface Event {
77
link?: string;
88
type: "conference" | "workshop" | "meetup" | "webinar" | "hackathon";
99
isUpcoming: boolean;
10+
isExternal?: boolean; // true if link goes to external site
1011
}
1112

1213
// Add your events here
1314
// Events are automatically sorted by date
1415
export const events: Event[] = [
15-
// Example events - replace with actual events
16-
// {
17-
// title: "Lingua Franca Workshop 2025",
18-
// date: "2025-03-15",
19-
// endDate: "2025-03-16",
20-
// location: "UC Berkeley, CA",
21-
// description: "A two-day workshop on reactor-oriented programming with Lingua Franca.",
22-
// link: "https://example.com/workshop",
23-
// type: "workshop",
24-
// isUpcoming: true,
25-
// },
16+
// Upcoming Events
17+
{
18+
title: "ReCPS: Workshop on Reactive Cyber-Physical Systems",
19+
date: "2026-03-31",
20+
location: "DATE 2026 Conference, Valencia, Spain",
21+
description:
22+
"Workshop on Reactive Cyber-Physical Systems: Design, Simulation, and Coordination. Co-located with the Design, Automation and Test in Europe (DATE) Conference 2026.",
23+
link: "/events/recps-2026",
24+
type: "workshop",
25+
isUpcoming: true,
26+
},
27+
// Past Events
28+
{
29+
title: "TCRS Workshop Series",
30+
date: "2024-01-01",
31+
location: "Various Locations",
32+
description:
33+
"Workshop series on Timing Centric Reactive Software, exploring reactor-oriented programming and time-sensitive applications.",
34+
link: "https://www.tcrs.io/",
35+
type: "workshop",
36+
isUpcoming: false,
37+
isExternal: true,
38+
},
39+
{
40+
title: "Lingua Franca Tutorial at ESWEEK 2021",
41+
date: "2021-10-08",
42+
location: "Online (EMSOFT Conference)",
43+
description:
44+
"A comprehensive tutorial introducing Lingua Franca, a polyglot coordination language for concurrent and time-sensitive applications. Part of the Embedded Systems Week (ESWEEK) 2021.",
45+
link: "/events/esweek-2021-tutorial",
46+
type: "workshop",
47+
isUpcoming: false,
48+
},
2649
];
2750

2851
// Helper to sort events by date

src/components/Events/index.tsx

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,30 @@ const formatDate = (dateStr: string, endDateStr?: string): string => {
7979
return startDate;
8080
};
8181

82+
// External link icon
83+
const ExternalLinkIcon = () => (
84+
<svg
85+
width="12"
86+
height="12"
87+
viewBox="0 0 24 24"
88+
fill="none"
89+
stroke="currentColor"
90+
strokeWidth="2"
91+
strokeLinecap="round"
92+
strokeLinejoin="round"
93+
style={{ marginLeft: "4px", verticalAlign: "middle" }}
94+
>
95+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
96+
<polyline points="15 3 21 3 21 9" />
97+
<line x1="10" y1="14" x2="21" y2="3" />
98+
</svg>
99+
);
100+
82101
const EventCard = ({ event }: { event: Event }) => {
83102
const typeClassName = styles[event.type] || "";
103+
const linkProps = event.isExternal
104+
? { target: "_blank", rel: "noopener noreferrer" }
105+
: {};
84106

85107
return (
86108
<div className={clsx("card", "margin-bottom--md", styles.eventCard)}>
@@ -92,7 +114,10 @@ const EventCard = ({ event }: { event: Event }) => {
92114
</span>
93115
<Heading as="h3" className="margin-top--sm margin-bottom--none">
94116
{event.link ? (
95-
<Link href={event.link}>{event.title}</Link>
117+
<Link href={event.link} {...linkProps}>
118+
{event.title}
119+
{event.isExternal && <ExternalLinkIcon />}
120+
</Link>
96121
) : (
97122
event.title
98123
)}
@@ -113,8 +138,13 @@ const EventCard = ({ event }: { event: Event }) => {
113138
</div>
114139
{event.link && (
115140
<div className="card__footer">
116-
<Link className="button button--primary button--sm" href={event.link}>
117-
<Translate>Learn More</Translate>
141+
<Link
142+
className="button button--primary button--sm"
143+
href={event.link}
144+
{...linkProps}
145+
>
146+
<Translate>{event.isExternal ? "Visit Website" : "Learn More"}</Translate>
147+
{event.isExternal && <ExternalLinkIcon />}
118148
</Link>
119149
</div>
120150
)}

0 commit comments

Comments
 (0)