Skip to content

Commit 9cf3f50

Browse files
authored
Merge pull request #33 from sfuosdev/feature/issue-2/events-page
Completes Issue 2 by finishing the implementation of the Events Page
2 parents 975181d + 5c28fd5 commit 9cf3f50

13 files changed

+189
-99
lines changed

public/events/f24-icebreaker-1.jpg

270 KB
Loading

public/events/f24-icebreaker-2.jpg

193 KB
Loading

public/events/f24-icebreaker-3.jpg

247 KB
Loading

public/events/f24-icebreaker-4.jpg

233 KB
Loading

public/events/f24-icebreaker-5.jpg

249 KB
Loading

public/events/f24-icebreaker-6.jpg

225 KB
Loading
200 KB
Loading
312 KB
Loading
155 KB
Loading
163 KB
Loading

src/components/Event.tsx

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import React, { useState } from "react";
2+
3+
type ProjectProps = {
4+
title: string;
5+
description: string;
6+
imgURLs: string[];
7+
};
8+
9+
const Event: React.FC<ProjectProps> = ({
10+
title,
11+
description,
12+
imgURLs
13+
}) => {
14+
const [currentImageIndex, setCurrentImageIndex] = useState(0);
15+
16+
const nextImage = () => {
17+
setCurrentImageIndex((prevIndex) => (prevIndex + 1) % imgURLs.length);
18+
};
19+
20+
const prevImage = () => {
21+
setCurrentImageIndex((prevIndex) =>
22+
prevIndex === 0 ? imgURLs.length - 1 : prevIndex - 1
23+
);
24+
};
25+
26+
return (
27+
<div className="flex flex-col md:flex-row rounded-lg md:justify-between overflow-hidden">
28+
<div className="md:w-1/2">
29+
<div className="flex flex-row justify-start items-start space-x-4">
30+
<h3 className="text-2xl font-bold mb-4 text-center">{title}</h3>
31+
</div>
32+
<p className="mb-4">{description}</p>
33+
</div>
34+
35+
{imgURLs.length > 0 && (
36+
<div className="md:w-1/2 w-full max-w-[325px] flex flex-col items-center justify-center mt-8 md:mt-0 relative">
37+
<button
38+
onClick={prevImage}
39+
className="absolute left-2 top-1/2 transform -translate-y-1/2 bg-gray-800 text-white p-2 rounded-full hover:bg-gray-600"
40+
>
41+
&#8249;
42+
</button>
43+
44+
<img
45+
src={imgURLs[currentImageIndex]}
46+
alt={`${title} image ${currentImageIndex + 1}`}
47+
className="w-full object-cover rounded-md"
48+
/>
49+
50+
<button
51+
onClick={nextImage}
52+
className="absolute right-2 top-1/2 transform -translate-y-1/2 bg-gray-800 text-white p-2 rounded-full hover:bg-gray-600"
53+
>
54+
&#8250;
55+
</button>
56+
57+
<div className="flex mt-4 space-x-2">
58+
{imgURLs.map((_, index) => (
59+
<button
60+
key={index}
61+
className={`h-2 w-2 rounded-full ${
62+
currentImageIndex === index ? "bg-blue-500" : "bg-gray-300"
63+
}`}
64+
onClick={() => setCurrentImageIndex(index)}
65+
/>
66+
))}
67+
</div>
68+
</div>
69+
)}
70+
</div>
71+
);
72+
};
73+
74+
export default Event;

src/components/Events.tsx

Lines changed: 110 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,133 @@
1-
import React from "react";
1+
import React, { useState } from 'react'
2+
import Event from './Event';
3+
import { EventType } from '../interfaces/event-type';
4+
5+
const upcomingEventsList: EventType[] = [
6+
];
7+
8+
const pastEventsList: EventType[] = [
9+
{
10+
title: "Fall 2024 Icebreaker Event",
11+
description: "At the beginning of the Fall 2024 semester, the we hosted an amazing icebreaker event to kick off the semester! We introduced the club, our executives, shared our vision, and highlighted exciting projects we'll be working on this term. Our project leads gave insightful presentations, sparking enthusiasm among attendees. It was fantastic to welcome so many passionate students eager to dive into open-source development. The pizza and drinks were a hit, making the evening even more memorable!",
12+
imgURLs: [
13+
"events/f24-icebreaker-1.jpg",
14+
"events/f24-icebreaker-2.jpg",
15+
"events/f24-icebreaker-3.jpg",
16+
"events/f24-icebreaker-4.jpg",
17+
"events/f24-icebreaker-5.jpg",
18+
"events/f24-icebreaker-6.jpg",
19+
],
20+
},
21+
{
22+
title: "March Speaker Series",
23+
description: "The March Speaker Series was a fantastic success! We were thrilled to host guest speaker David Hobbs, who shared invaluable industry insights and actionable career tips with our members. His engaging session left attendees inspired and motivated as they plan their career journeys. A heartfelt thank you to everyone who joined us and made this event so special!",
24+
imgURLs: [
25+
"events/mar-speaker-series-1.jpg",
26+
],
27+
},
28+
{
29+
title: "February Speaker Series",
30+
description: "The February Speaker Series was an incredible experience! We were honored to host Charles Tong, who shared valuable insights into the intersection of Tech and Business. His engaging talk provided our members with fresh perspectives and practical knowledge to apply in their journeys. A big thank you to everyone who attended and contributed thoughtful questions, making the event even more impactful. The energy and enthusiasm of our members makes these events so special!",
31+
imgURLs: [
32+
"events/feb-speaker-series-1.jpg",
33+
"events/feb-speaker-series-2.jpg",
34+
"events/feb-speaker-series-3.jpg"
35+
],
36+
}
37+
];
238

339
const Events = () => {
40+
const [activeTab, setActiveTab] = useState('PAST');
41+
42+
const renderEventsList = () => {
43+
let eventsList = [];
44+
let message = '';
45+
46+
if (activeTab === 'UPCOMING') {
47+
eventsList = upcomingEventsList;
48+
message = eventsList.length === 0 ? 'No upcoming events at the moment.' : '';
49+
} else {
50+
eventsList = pastEventsList;
51+
message = eventsList.length === 0 ? 'No past events available.' : '';
52+
}
53+
54+
if (eventsList.length === 0 && message) {
55+
return <p>{message}</p>;
56+
}
57+
58+
return eventsList.map((event, index) => (
59+
<Event
60+
key={index}
61+
title={event.title}
62+
description={event.description}
63+
imgURLs={event.imgURLs}
64+
/>
65+
));
66+
};
67+
468
return (
5-
<div className="space-y-12">
6-
<section className="bg-gray-700 py-20 text-center">
7-
<div className="container mx-auto px-4">
8-
<h1 className="text-6xl font-bold mb-4">Event</h1>
9-
<p className="text-xl mb-8">[some brief description]</p>
10-
<a
11-
href="/"
12-
className="inline-flex items-center px-6 py-3 bg-teal-500 text-white rounded-full hover:bg-teal-600 transition duration-300"
13-
>
14-
./HOME
69+
<div className="mt-[60px] md:mt-[80px]">
70+
{/* Hero Section */}
71+
<section className="bg-gradient-2 py-32 flex flex-col justify-center items-start">
72+
<div className="container mx-auto px-6 sm:px-12">
73+
<h1 className="text-6xl font-bold font-club mb-6 text-white">Events</h1>
74+
<p className="text-xl mb-10 text-white">
75+
Explore the dynamic events hosted by the SFU Open Source Development Club, where innovation meets collaboration. From hands-on workshops to inspiring talks, our events empower students, foster skill development, and build connections within the global open-source community.
76+
</p>
77+
<a href="/" className="btn btn-primary flex flex-row px-4 py-2 rounded w-56 text-white transition duration-300">
78+
<p className="mr-4">&gt;</p>./HOME
1579
</a>
1680
</div>
1781
</section>
82+
{/* Projects and Beyond Section */}
83+
<section id="about" className="container mx-auto flex flex-col w-full py-16 px-6 sm:px-12">
84+
<h2 className="section-title text-left font-club">We Touch Grass. We Meet People.</h2>
1885

19-
<section className="container mx-auto px-4 py-12">
20-
<h2 className="text-4xl font-bold mb-8">
21-
We Touch Grass.
22-
<br />
23-
We Meet People.
24-
</h2>
25-
<div className="flex flex-col md:flex-row justify-between items-start">
26-
<div className="md:w-1/2 mb-8 md:mb-0">
27-
<p className="text-lg mb-4">
28-
We are a student club at SFU aimed at bringing together talented
29-
individuals from tech, design, and business. Our primary goal is
30-
to collaborate on projects that contribute to the community while
31-
providing valuable learning opportunities for our members.
32-
</p>
33-
<p className="text-lg">
34-
Join us at the SFU Open Source Development Club and be part of a
35-
community dedicated to making a positive impact through technology
36-
and collaboration.
86+
{/* Content Wrapper */}
87+
<div className="flex flex-col space-y-8 md:flex-row md:space-x-8 md:space-y-0">
88+
{/* Left Side (text) */}
89+
<div className="md:w-1/2">
90+
<p className="text-lg mb-6">
91+
At the <strong className="text-primary">SFU Open Source Development Club</strong>, we believe in connecting beyond the screen. Through our <strong className="text-primary">engaging events</strong>, we create spaces for members to meet, network, and grow both <strong className="text-primary">personally</strong> and <strong className="text-primary">professionally</strong>. Whether it&lsquo;s through fun <strong className="text-primary">social gatherings</strong> or insightful <strong className="text-primary">guest talks</strong>, we foster a sense of <strong className="text-primary">community</strong> that values <strong className="text-primary">authentic connections</strong> and <strong className="text-primary">shared experiences</strong>. Our events go beyond learning—they&lsquo;re about building lasting <strong className="text-primary">relationships</strong>, celebrating <strong className="text-primary">diversity</strong>, and creating a welcoming environment where everyone feels they belong.
3792
</p>
3893
</div>
39-
<div className="md:w-1/2 space-y-4">
40-
<a
41-
href="#"
42-
className="block w-full px-6 py-3 bg-teal-500 text-white rounded-full hover:bg-teal-600 transition duration-300 text-center"
43-
>
44-
./FUTURE_EVENTS
94+
95+
{/* Right Side (button links) */}
96+
<div className="md:w-1/2 flex flex-col items-start md:items-end space-y-6">
97+
<a href="#projects-section" className="flex flex-row px-4 py-2 rounded w-full max-w-[325px] btn btn-primary text-left text-white transition duration-300" onClick={() => setActiveTab('UPCOMING')}>
98+
<p className="mr-4">&gt;</p>./UPCOMING_EVENTS
4599
</a>
46-
<a
47-
href="#"
48-
className="block w-full px-6 py-3 bg-teal-500 text-white rounded-full hover:bg-teal-600 transition duration-300 text-center"
49-
>
50-
./PAST_EVENTS
100+
<a href="#projects-section" className="flex flex-row px-4 py-2 rounded w-full max-w-[325px] btn btn-primary text-left text-white transition duration-300" onClick={() => setActiveTab('PAST')}>
101+
<p className="mr-4">&gt;</p>./PAST_EVENTS
51102
</a>
52103
</div>
53104
</div>
54105
</section>
55106

56-
<section className="container mx-auto px-4 py-12">
57-
<h2 className="text-4xl font-bold mb-8">Our Events</h2>
107+
{/* Our Projects Section */}
108+
<section id="projects-section" className="container mx-auto py-12 px-6 sm:px-12">
109+
<h2 className="section-title text-left font-club">Our Events</h2>
58110
<div className="flex space-x-4 mb-8">
59-
<span className="px-4 py-2 bg-gray-700 rounded-full">PAST</span>
60-
<span className="px-4 py-2 bg-purple-600 rounded-full">FUTURE</span>
111+
<span className={`px-4 py-2 btn text-center text-white transition duration-300 cursor-pointer ${activeTab === 'UPCOMING' ? 'bg-[#D55FFF]' : 'bg-[#636C9E]'}`} onClick={() => setActiveTab('UPCOMING')}>UPCOMING</span>
112+
<span className={`px-4 py-2 btn text-center text-white transition duration-300 cursor-pointer ${activeTab === 'PAST' ? 'bg-[#D55FFF]' : 'bg-[#636C9E]'}`} onClick={() => setActiveTab('PAST')}>PAST</span>
61113
</div>
62-
<div className="space-y-8">
63-
<div className="flex flex-col md:flex-row bg-gray-800 rounded-lg overflow-hidden">
64-
<div className="md:w-2/3 p-6">
65-
<h3 className="text-2xl font-bold mb-4">[Event 1 Name]</h3>
66-
<p className="mb-4">
67-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
68-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
69-
enim ad minim veniam, quis nostrud exercitation ullamco laboris
70-
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
71-
in reprehenderit in voluptate velit esse cillum dolore eu fugiat
72-
nulla pariatur. Excepteur sint occaecat cupidatat non proident,
73-
sunt in culpa qui officia deserunt mollit anim id est laborum.
74-
</p>
75-
<a
76-
href="#"
77-
className="inline-flex items-center px-4 py-2 bg-teal-500 text-white rounded-full hover:bg-teal-600 transition duration-300"
78-
>
79-
./DETAILS
80-
</a>
81-
</div>
82-
<div className="md:w-1/3 bg-gray-700 flex items-center justify-center text-2xl">
83-
PLACEHOLDER
84-
</div>
85-
</div>
86-
<div className="flex flex-col md:flex-row bg-gray-800 rounded-lg overflow-hidden">
87-
<div className="md:w-2/3 p-6">
88-
<h3 className="text-2xl font-bold mb-4">[Event 2 Name]</h3>
89-
<p className="mb-4">
90-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
91-
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
92-
enim ad minim veniam, quis nostrud exercitation ullamco laboris
93-
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
94-
in reprehenderit in voluptate velit esse cillum dolore eu fugiat
95-
nulla pariatur. Excepteur sint occaecat cupidatat non proident,
96-
sunt in culpa qui officia deserunt mollit anim id est laborum.
97-
</p>
98-
<a
99-
href="#"
100-
className="inline-flex items-center px-4 py-2 bg-teal-500 text-white rounded-full hover:bg-teal-600 transition duration-300"
101-
>
102-
./DETAILS
103-
</a>
104-
</div>
105-
<div className="md:w-1/3 bg-gray-700 flex items-center justify-center text-2xl">
106-
PLACEHOLDER
107-
</div>
108-
</div>
114+
115+
<div className="space-y-12">
116+
{renderEventsList()}
109117
</div>
118+
110119
</section>
111120

112-
<section className="container mx-auto px-4 py-12 text-center">
113-
<h2 className="text-4xl font-bold mb-8">Start Your Journey With Us</h2>
114-
<a
115-
href="https://go.sfss.ca/clubs/867/info"
116-
className="inline-flex items-center px-6 py-3 bg-teal-500 text-white rounded-full hover:bg-teal-600 transition duration-300"
117-
>
118-
./START_UR_JOURNEY
119-
</a>
121+
{/* Join Us CTA Banner Section */}
122+
<section className="py-24 text-center">
123+
<div className="container mx-auto px-4">
124+
<h2 className="text-4xl font-bold font-club mb-6 text-white">Start Your Journey With Us</h2>
125+
<div className="flex justify-center">
126+
<a href="/projects" className="flex flex-row px-4 py-2 rounded w-full max-w-[255px] btn btn-primary text-left text-white transition duration-300">
127+
<p className="mr-4">&gt;</p>./START_UR_JOURNEY
128+
</a>
129+
</div>
130+
</div>
120131
</section>
121132
</div>
122133
);

src/interfaces/event-type.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export interface EventType {
2+
title: string;
3+
description: string;
4+
imgURLs: string[];
5+
}

0 commit comments

Comments
 (0)