-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rebrand from solution challenge to mac-a-thon
- Loading branch information
1 parent
bf7ebfe
commit eb0bc63
Showing
24 changed files
with
822 additions
and
1,100 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"use client"; | ||
import { useState, ReactNode } from "react"; | ||
import { motion } from "framer-motion"; | ||
import { MdExpandMore } from "react-icons/md"; | ||
|
||
interface AccordionProps { | ||
title: string; | ||
children: ReactNode; | ||
} | ||
|
||
const Accordion = ({ title, children }: AccordionProps) => { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
return ( | ||
<div className="w-full"> | ||
<button | ||
className="flex items-center justify-between w-full px-4 py-2 text-lg font-medium text-left" | ||
onClick={() => setIsOpen(!isOpen)} | ||
aria-expanded={isOpen} | ||
> | ||
<span>{title}</span> | ||
<motion.div | ||
className="flex items-center" | ||
animate={{ rotate: isOpen ? 180 : 0 }} | ||
transition={{ duration: 0.3 }} | ||
> | ||
<MdExpandMore className="w-6 h-6" /> | ||
</motion.div> | ||
</button> | ||
<motion.div | ||
className="overflow-hidden" | ||
initial={{ opacity: 0, height: 0 }} | ||
animate={{ opacity: isOpen ? 1 : 0, height: isOpen ? "auto" : 0 }} | ||
transition={{ duration: 0.3 }} | ||
> | ||
<div className="px-4 py-2">{children}</div> | ||
</motion.div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Accordion; | ||
|
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,11 @@ | ||
|
||
|
||
const MLHTrustBadge = () => { | ||
return ( | ||
<a id="mlh-trust-badge" style={{ display: "block", maxWidth: "100px", minWidth: "60px", position: "fixed", right: "50px", top: "0", width: "10%", zIndex: 10000 }} href="https://mlh.io/na?utm_source=na-hackathon&utm_medium=TrustBadge&utm_campaign=2025-season&utm_content=white" target="_blank"> | ||
<img src="https://s3.amazonaws.com/logged-assets/trust-badge/2025/mlh-trust-badge-2025-white.svg" alt="Major League Hacking 2025 Hackathon Season" style={{ width: "100%" }}/> | ||
</a> | ||
) | ||
} | ||
|
||
export default MLHTrustBadge; |
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,105 @@ | ||
"use client"; | ||
import { motion } from "framer-motion"; | ||
import { useState, useEffect } from "react"; | ||
|
||
interface StickyScrollProps { | ||
data: { | ||
title: string; | ||
description: string; | ||
value: string; | ||
}[]; | ||
} | ||
|
||
const StickyScroll = ({data}: StickyScrollProps) => { | ||
|
||
const [activeFeature, setActiveFeature] = useState(0); | ||
|
||
useEffect(() => { | ||
const observerOptions = { threshold: 0.5 }; | ||
const observers: IntersectionObserver[] = []; | ||
|
||
data.forEach((_, index) => { | ||
const element = document.getElementById(`key-feature-${index}`); | ||
if (element) { | ||
const observer = new IntersectionObserver( | ||
([entry]) => { | ||
if (entry.isIntersecting) { | ||
setActiveFeature(index); | ||
} | ||
}, | ||
observerOptions | ||
); | ||
observer.observe(element); | ||
observers.push(observer); | ||
} | ||
}); | ||
|
||
return () => { | ||
observers.forEach((observer) => observer.disconnect()); | ||
}; | ||
}, [data]); | ||
|
||
return ( | ||
<section className="relative"> | ||
<div className="grid grid-cols-1 md:grid-cols-2 gap-x-8"> | ||
{/* Left: Key Features */} | ||
<div className="flex flex-col gap-y-16"> | ||
{data.map((feature, index) => ( | ||
<div | ||
key={index} | ||
id={`key-feature-${index}`} | ||
className="flex flex-col justify-center gap-y-8 md:gap-y-4" | ||
> | ||
{/* Mobile: Mockups */} | ||
<div | ||
id="key-feature-image" | ||
className="flex md:hidden w-full max-h-fit items-center justify-center rounded-full bg-google-grey bg-opacity-10 p-8" | ||
> | ||
<h1 className="max-h-fit md:max-h-full max-w-full"> | ||
{feature.value} | ||
</h1> | ||
</div> | ||
{/* Text */} | ||
<div | ||
id="key-feature-text" | ||
className="flex flex-col justify-center gap-y-2 md:h-screen" | ||
> | ||
<div className="flex flex-row items-center gap-x-2"> | ||
<h3 className="text-2xl md:text-4xl font-semibold"> | ||
{feature.title} | ||
</h3> | ||
</div> | ||
<p className="text-base md:text-lg">{feature.description}</p> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
|
||
{/* Right: Mockups */} | ||
<div className="hidden sticky top-[5vh] h-[90vh] md:flex items-center justify-center w-full bg-google-grey bg-opacity-10 rounded-full overflow-hidden"> | ||
{data.map((feature, index) => ( | ||
<motion.div | ||
key={index} | ||
initial={{ opacity: 0 }} | ||
animate={{ opacity: activeFeature === index ? 1 : 0 }} | ||
transition={{ duration: 1 }} | ||
exit={{ | ||
opacity: 0.5, | ||
transition: { duration: 1 } | ||
}} | ||
className={`absolute w-full h-full flex items-center justify-center p-16 ${ | ||
activeFeature === index ? "block" : "hidden" | ||
}`} | ||
> | ||
<h1 className="max-h-fit md:max-h-full max-w-full"> | ||
{feature.value} | ||
</h1> | ||
</motion.div> | ||
))} | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
} | ||
|
||
export default StickyScroll; |
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
Oops, something went wrong.