Skip to content

Commit ea8129d

Browse files
committed
added speaker tab and images
1 parent 4ca0991 commit ea8129d

File tree

11 files changed

+280
-0
lines changed

11 files changed

+280
-0
lines changed
1.13 MB
Loading
170 KB
Loading
41.7 KB
Loading
26.8 KB
Loading
29.4 KB
Loading
254 KB
Loading

src/App.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Navbar from "./components/Navbar";
44
import Home from "./components/Home/Home";
55
import Projects from "./components/Projects/Projects";
66
import FAQ from "./components/Faq";
7+
import Speakers from "./components/Speakers/Speakers";
78
import Footer from "./components/Footer";
89
import Teams from './components/Team/Team';
910
import Schedule from "./components/Schedule/Schedule";
@@ -38,6 +39,7 @@ function App() {
3839
<Route path="/projects" element={<Projects />} />
3940
<Route path="/team" element={<Teams />} />
4041
<Route path="/faq" element={<FAQ />} />
42+
<Route path="/speakers" element={<Speakers />} />
4143
<Route path="*" element={<Navigate to="/" />} />
4244
</Routes>
4345
<Footer />

src/components/Navbar.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import {
1313
} from "react-icons/ai";
1414
import Button from "react-bootstrap/Button";
1515
import { CgGitFork } from "react-icons/cg";
16+
import { RiSpeakLine } from "react-icons/ri";
17+
1618

1719
function NavBar() {
1820
const [expand, updateExpanded] = useState(false);
@@ -75,6 +77,12 @@ function NavBar() {
7577
</Nav.Link>
7678
</Nav.Item>
7779

80+
<Nav.Item>
81+
<Nav.Link as={Link} to="/speakers" onClick={() => updateExpanded(false)}>
82+
<RiSpeakLine className="nav-icon" /> Speakers
83+
</Nav.Link>
84+
</Nav.Item>
85+
7886
<Nav.Item>
7987
<Nav.Link as={Link} to="/team" onClick={() => updateExpanded(false)}>
8088
<AiOutlineTeam className="nav-icon" /> Team
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import React from 'react';
2+
import { Container, Row, Col } from 'react-bootstrap';
3+
import Particle from '../Particle';
4+
import speakerData from './speakerData';
5+
import './speakers.css';
6+
7+
const SpeakerRow = ({ speaker, isEven }) => {
8+
const Content = (
9+
<Row className={`speaker-content ${isEven ? 'flex-row-reverse' : ''}`}>
10+
<Col md={4} className="speaker-img-col">
11+
<img
12+
src={speaker.imgPath}
13+
alt={speaker.name}
14+
className="speaker-img"
15+
/>
16+
</Col>
17+
<Col md={8} className="speaker-info-col">
18+
<div className={`speaker-info ${isEven ? 'text-end' : 'text-start'}`}>
19+
<h2 className="speaker-name">{speaker.name}</h2>
20+
<p className="speaker-bio">{speaker.bio}</p>
21+
</div>
22+
</Col>
23+
</Row>
24+
);
25+
26+
if (speaker.link) {
27+
return (
28+
<div id={speaker.id} className="speaker-row clickable">
29+
<a
30+
href={speaker.link}
31+
target="_blank"
32+
rel="noopener noreferrer"
33+
className="speaker-link"
34+
>
35+
{Content}
36+
</a>
37+
</div>
38+
);
39+
}
40+
41+
return (
42+
<div id={speaker.id} className="speaker-row">
43+
{Content}
44+
</div>
45+
);
46+
};
47+
48+
const SpeakerSection = ({ title, speakers }) => (
49+
<div className="speaker-section-group">
50+
<h2 className="speaker-category-heading">
51+
{title}
52+
</h2>
53+
{speakers.map((speaker, index) => (
54+
<SpeakerRow
55+
key={speaker.id}
56+
speaker={speaker}
57+
isEven={index % 2 !== 0}
58+
/>
59+
))}
60+
</div>
61+
);
62+
63+
function Speakers() {
64+
// Split speakers into keynote speakers and panelists
65+
const keynoteSpeakers = speakerData.filter(speaker =>
66+
speaker.id.startsWith('keynote-')
67+
);
68+
69+
const panelists = speakerData.filter(speaker =>
70+
speaker.id.startsWith('panelist-')
71+
);
72+
73+
return (
74+
<section>
75+
<Container fluid className="speaker-section" id="speakers">
76+
<Particle />
77+
<Container>
78+
<h1 className="page-heading">
79+
Our <strong className="purple">Speakers</strong>
80+
</h1>
81+
82+
{keynoteSpeakers.length > 0 && (
83+
<SpeakerSection
84+
title="Keynote Speakers"
85+
speakers={keynoteSpeakers}
86+
/>
87+
)}
88+
89+
{panelists.length > 0 && (
90+
<SpeakerSection
91+
title="Panelists"
92+
speakers={panelists}
93+
/>
94+
)}
95+
</Container>
96+
</Container>
97+
</section>
98+
);
99+
}
100+
101+
export default Speakers;

src/components/Speakers/speakerData.js

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)