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

Commit

Permalink
feat: add founder section (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
Satoshi-Sh authored Dec 21, 2023
1 parent 81d6e8b commit 5e0ca78
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Moderators } from '@/components/Moderators'
import { PrimaryFeatures } from '@/components/PrimaryFeatures'
import { SecondaryFeatures } from '@/components/SecondaryFeatures'
import { Testimonials } from '@/components/Testimonials'
import { Founders } from '@/components/Founders'

export default function Home() {
return (
Expand All @@ -19,6 +20,7 @@ export default function Home() {
<Newsletter />
<Testimonials />
<Moderators />
<Founders />
<Faqs />
</main>
<Footer />
Expand Down
34 changes: 34 additions & 0 deletions src/components/Founder.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { YouTubeEmbed } from './YouTubeEmbed'
import { InfoSectipn } from './InfoSection'

export const Founder = ({
name,
title,
videoId,
description,
isReverse = false,
}) => {
return (
<div>
{isReverse ? (
<div className="mt-10 flex flex-col gap-10 pb-10 md:flex-row">
<InfoSectipn title={title} name={name} description={description} />
<YouTubeEmbed videoId={videoId} className="flex-grow-2" />
</div>
) : (
<div className="mt-10 flex flex-col gap-10 md:flex-row">
<YouTubeEmbed
videoId={videoId}
className="flex-grow-2 order-2 md:order-1"
/>
<InfoSectipn
title={title}
name={name}
description={description}
className="order-1 md:order-2"
/>
</div>
)}
</div>
)
}
45 changes: 45 additions & 0 deletions src/components/Founders.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { Container } from '@/components/Container'
import { H2 } from '@/components/Headings'
import { Founder } from './Founder'

const founders = [
{
name: 'Eddie Jaoude',
title: 'Why EddieHub was founded',
videoId: 'RnH9udLsAKk',
description:
'"Collaboration First, Code Second quickly became what the community members live by"',
},
{
name: 'Sara Jaoude',
title: "Find out about EddieHub's aims",
videoId: 'eWetvRusfUU',
description: '"Open Source is our hobby, our passion - not just our job"',
},
]

export function Founders() {
return (
<section
id="founders"
aria-label="founders"
className="bg-primary-600 pb-16 pt-20 text-white"
>
<Container>
<div className="md:text-center">
<H2>EddieHub Founders</H2>
{founders.map((founder, id) => (
<Founder
key={id}
name={founder.name}
title={founder.title}
videoId={founder.videoId}
description={founder.description}
isReverse={id % 2 === 1}
/>
))}
</div>
</Container>
</section>
)
}
12 changes: 12 additions & 0 deletions src/components/InfoSection.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import clsx from 'clsx'
export const InfoSectipn = ({ title, name, description, className }) => {
return (
<div className={clsx('flex-grow-1 flex-1 text-left', className)}>
<h3 className="rounded-full bg-primary-500 p-2 text-xl font-bold">
{title}
</h3>
<h4 className="my-3 text-lg font-bold">{name}</h4>
<p className="text-lg italic">{description}</p>
</div>
)
}
16 changes: 16 additions & 0 deletions src/components/YouTubeEmbed.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import clsx from 'clsx'

export const YouTubeEmbed = ({ videoId, className }) => {
return (
<div className={clsx('my-3 aspect-video md:my-0', className)}>
<iframe
width="100%"
height="110%"
src={`https://www.youtube.com/embed/${videoId}`}
title="YouTube video player"
allowFullScreen
className="mx-auto rounded-2xl"
></iframe>
</div>
)
}

0 comments on commit 5e0ca78

Please sign in to comment.