-
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.
Feature: Mentor and Volunteer Section (#26)
* feat: basic layout * feat: bottom of stand dynamically adjusts to text height * fix: replace HackUCI with IrvineHacks in copy * fix: remove extraneous div * fix: add more horizontal space between stands * fix: swap row and column gaps between stands * fix: add padding to center stands on mobile
- Loading branch information
1 parent
f978154
commit 7510e9e
Showing
15 changed files
with
105 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import { Landing } from "./sections"; | ||
import { Landing, MentorVolunteer } from "./sections"; | ||
|
||
export default function Home() { | ||
// Show landing section only if still in maintenance, | ||
// otherwise show the rest of the sections | ||
return process.env.MAINTENANCE_MODE_HOME ? <Landing /> : <Landing />; | ||
return process.env.MAINTENANCE_MODE_HOME ? ( | ||
<Landing /> | ||
) : ( | ||
<> | ||
<Landing /> | ||
<MentorVolunteer /> | ||
</> | ||
); | ||
} |
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
26 changes: 26 additions & 0 deletions
26
apps/site/src/app/(home)/sections/MentorVolunteer/MentorVolunteer.tsx
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import Stand from "./Stand"; | ||
import stand1 from "./stand-1.png"; | ||
import stand2 from "./stand-2.png"; | ||
|
||
const MentorVolunteer = () => { | ||
return ( | ||
<div className="grid max-w-lg lg:max-w-none lg:grid-cols-[repeat(2,450px)] lg:items-stretch justify-center m-auto gap-y-8 gap-x-24 mt-24 pl-3 pr-4"> | ||
<Stand | ||
imageSrc={stand1} | ||
header="Apply to be a Mentor" | ||
description="Interested in inspiring the next generation of developers? Our mentors are vital to making IrvineHacks 2024 successful and enjoyable for our hackers." | ||
buttonText="Mentor Application" | ||
buttonHref="google.com" | ||
/> | ||
<Stand | ||
imageSrc={stand2} | ||
header="Become a Volunteer" | ||
description="Want a peek behind the scenes? Join our team of event volunteers that make IrvineHacks run as smoothly as possible! Get access to all the free food and all our hackathon swag." | ||
buttonText="Volunteer Form" | ||
buttonHref="google.com" | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MentorVolunteer; |
50 changes: 50 additions & 0 deletions
50
apps/site/src/app/(home)/sections/MentorVolunteer/Stand.tsx
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import type { ComponentProps } from "react"; | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
import Button from "@/lib/components/Button/Button"; | ||
import standBottom from "./stand-bottom.png"; | ||
|
||
interface StandProps { | ||
imageSrc: ComponentProps<typeof Image>["src"]; | ||
header: string; | ||
description: string; | ||
buttonText: string; | ||
buttonHref: ComponentProps<typeof Link>["href"]; | ||
} | ||
|
||
const Stand: React.FC<StandProps> = ({ | ||
imageSrc, | ||
header, | ||
description, | ||
buttonText, | ||
buttonHref, | ||
}) => { | ||
return ( | ||
<div className="max-w-[450px] text-center flex flex-col items-stretch"> | ||
<div className="relative aspect-[1/0.7] z-10"> | ||
<h2 className="absolute mt-[4.5%] text-2xl z-20 w-full text-[#FFDA7B]"> | ||
{header} | ||
</h2> | ||
<Image | ||
className="absolute left-0 top-0 w-full" | ||
src={imageSrc} | ||
alt="" | ||
aria-hidden | ||
/> | ||
</div> | ||
<div | ||
style={{ | ||
backgroundImage: `url(${standBottom.src})`, | ||
}} | ||
className="relative ml-2 border-[6px] border-solid border-t-0 border-[#1B1006] overflow-hidden bg-top bg-repeat-y bg-[length:100%] flex-grow" | ||
> | ||
<p className="text-base pt-[16%] pb-4 px-12">{description}</p> | ||
<div className="mb-8"> | ||
<Button text={buttonText} href={buttonHref} /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Stand; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 +1,2 @@ | ||
export { default as Landing } from "./Landing/Landing"; | ||
export { default as MentorVolunteer } from "./MentorVolunteer/MentorVolunteer"; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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