Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 5e0ca78

Browse files
authored
feat: add founder section (#322)
1 parent 81d6e8b commit 5e0ca78

File tree

5 files changed

+109
-0
lines changed

5 files changed

+109
-0
lines changed

src/app/page.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Moderators } from '@/components/Moderators'
77
import { PrimaryFeatures } from '@/components/PrimaryFeatures'
88
import { SecondaryFeatures } from '@/components/SecondaryFeatures'
99
import { Testimonials } from '@/components/Testimonials'
10+
import { Founders } from '@/components/Founders'
1011

1112
export default function Home() {
1213
return (
@@ -19,6 +20,7 @@ export default function Home() {
1920
<Newsletter />
2021
<Testimonials />
2122
<Moderators />
23+
<Founders />
2224
<Faqs />
2325
</main>
2426
<Footer />

src/components/Founder.jsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { YouTubeEmbed } from './YouTubeEmbed'
2+
import { InfoSectipn } from './InfoSection'
3+
4+
export const Founder = ({
5+
name,
6+
title,
7+
videoId,
8+
description,
9+
isReverse = false,
10+
}) => {
11+
return (
12+
<div>
13+
{isReverse ? (
14+
<div className="mt-10 flex flex-col gap-10 pb-10 md:flex-row">
15+
<InfoSectipn title={title} name={name} description={description} />
16+
<YouTubeEmbed videoId={videoId} className="flex-grow-2" />
17+
</div>
18+
) : (
19+
<div className="mt-10 flex flex-col gap-10 md:flex-row">
20+
<YouTubeEmbed
21+
videoId={videoId}
22+
className="flex-grow-2 order-2 md:order-1"
23+
/>
24+
<InfoSectipn
25+
title={title}
26+
name={name}
27+
description={description}
28+
className="order-1 md:order-2"
29+
/>
30+
</div>
31+
)}
32+
</div>
33+
)
34+
}

src/components/Founders.jsx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { Container } from '@/components/Container'
2+
import { H2 } from '@/components/Headings'
3+
import { Founder } from './Founder'
4+
5+
const founders = [
6+
{
7+
name: 'Eddie Jaoude',
8+
title: 'Why EddieHub was founded',
9+
videoId: 'RnH9udLsAKk',
10+
description:
11+
'"Collaboration First, Code Second quickly became what the community members live by"',
12+
},
13+
{
14+
name: 'Sara Jaoude',
15+
title: "Find out about EddieHub's aims",
16+
videoId: 'eWetvRusfUU',
17+
description: '"Open Source is our hobby, our passion - not just our job"',
18+
},
19+
]
20+
21+
export function Founders() {
22+
return (
23+
<section
24+
id="founders"
25+
aria-label="founders"
26+
className="bg-primary-600 pb-16 pt-20 text-white"
27+
>
28+
<Container>
29+
<div className="md:text-center">
30+
<H2>EddieHub Founders</H2>
31+
{founders.map((founder, id) => (
32+
<Founder
33+
key={id}
34+
name={founder.name}
35+
title={founder.title}
36+
videoId={founder.videoId}
37+
description={founder.description}
38+
isReverse={id % 2 === 1}
39+
/>
40+
))}
41+
</div>
42+
</Container>
43+
</section>
44+
)
45+
}

src/components/InfoSection.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import clsx from 'clsx'
2+
export const InfoSectipn = ({ title, name, description, className }) => {
3+
return (
4+
<div className={clsx('flex-grow-1 flex-1 text-left', className)}>
5+
<h3 className="rounded-full bg-primary-500 p-2 text-xl font-bold">
6+
{title}
7+
</h3>
8+
<h4 className="my-3 text-lg font-bold">{name}</h4>
9+
<p className="text-lg italic">{description}</p>
10+
</div>
11+
)
12+
}

src/components/YouTubeEmbed.jsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import clsx from 'clsx'
2+
3+
export const YouTubeEmbed = ({ videoId, className }) => {
4+
return (
5+
<div className={clsx('my-3 aspect-video md:my-0', className)}>
6+
<iframe
7+
width="100%"
8+
height="110%"
9+
src={`https://www.youtube.com/embed/${videoId}`}
10+
title="YouTube video player"
11+
allowFullScreen
12+
className="mx-auto rounded-2xl"
13+
></iframe>
14+
</div>
15+
)
16+
}

0 commit comments

Comments
 (0)