-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Hero Section (#27) * set up initial template * added navbar to hero section * responsive hero section * Basic About is done
- Loading branch information
1 parent
f9c6f1e
commit 78c5fce
Showing
3 changed files
with
110 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,116 @@ | ||
import Image from 'next/image'; | ||
import clsx from 'clsx'; | ||
|
||
function AboutInfo({ children, title, imageSrc, alt, reverse }: | ||
{ | ||
children: React.ReactNode, | ||
title: string, | ||
imageSrc: string, | ||
alt: string, | ||
reverse?: boolean, | ||
} | ||
) { | ||
|
||
function AboutInfoContent() { | ||
return ( | ||
<div | ||
className={clsx( | ||
"bg-red-100 w-full md:w-1/2 md:grow md:justify-end h-fit p-20", | ||
{ | ||
'text-end': reverse, | ||
} | ||
)} | ||
> | ||
<h1 className="font-extrabold bg-red-100 text-5xl"> | ||
{title} | ||
</h1> | ||
{children} | ||
</div> | ||
); | ||
} | ||
|
||
function AboutImage() { | ||
return ( | ||
<div | ||
className={clsx( | ||
"bg-red-200 w-full md:w-1/2 h-fit flex justify-center", | ||
{ | ||
"md:justify-start": !reverse, | ||
"md:justify-end": reverse, | ||
} | ||
)} | ||
> | ||
<Image | ||
src={imageSrc} | ||
width="400" | ||
height="400" | ||
alt={alt} | ||
priority | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
if (reverse) { | ||
return ( | ||
<> | ||
<AboutImage /> | ||
<AboutInfoContent /> | ||
</> | ||
) | ||
} | ||
|
||
return ( | ||
<> | ||
<AboutInfoContent /> | ||
<AboutImage /> | ||
</> | ||
) | ||
} | ||
|
||
|
||
export default function About() { | ||
return ( | ||
<div | ||
className="flex h-[100vh] max-h-[1300px] w-full | ||
flex-col items-center justify-center bg-gray-200" | ||
className="bg-gray-200 w-full h-fit | ||
flex flex-col md:flex-row flex-wrap" | ||
> | ||
<h1 className="text-5xl font-extrabold">About</h1> | ||
<AboutInfo title="WHAT" imageSrc='/landing/python.png' alt="Python"> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
</p> | ||
</AboutInfo> | ||
|
||
<AboutInfo title="TRACKS" imageSrc='/landing/python.png' alt="Python" reverse> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
</p> | ||
</AboutInfo> | ||
|
||
<AboutInfo title="JOIN US" imageSrc='/landing/python.png' alt="Python"> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed | ||
imperdiet, nibh nec dictum consectetur, lorem nisi | ||
</p> | ||
</AboutInfo> | ||
</div> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.