Skip to content

Commit

Permalink
rebrand from solution challenge to mac-a-thon
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanfroggatt committed Dec 8, 2024
1 parent bf7ebfe commit eb0bc63
Show file tree
Hide file tree
Showing 24 changed files with 822 additions and 1,100 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GDSC McMaster U Solution Challenge Website
# GDSC McMaster U Mac-a-thon Website

Welcome to the GDSC McMaster U Solution Challenge Website project repository! 👋
Welcome to the GDSC McMaster U Mac-a-thon Website project repository! 👋

## Table of Contents

Expand All @@ -14,7 +14,7 @@ Welcome to the GDSC McMaster U Solution Challenge Website project repository!

## General Info

This project aims to create a modern website for the annual Solution Challenge Hackathon presented by McMaster's chapter of Google Developer Student Clubs (GDSC).
This project aims to create a modern website for the annual Mac-a-thon Hackathon presented by McMaster's chapter of Google Developer Student Clubs (GDSC).

### Technologies Used

Expand All @@ -23,7 +23,6 @@ Below is an overview of the key technologies utilized in this project. Familiari
- **Next.JS**: A framework that provides a seamless development experience.
- **Tailwind CSS**: A utility-first CSS framework for rapid UI development, following Material Design principles.
- **Sanity CMS**: A customizable content management system that allows for easy content updates.
- **Firebase Hosting**: Fast and secure hosting for web applications.
- **Jest**: Testing library.
- **GitHub Actions**: CI/CD for automating workflows and deployments.

Expand Down
43 changes: 43 additions & 0 deletions app/components/Accordion.tsx
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;

11 changes: 11 additions & 0 deletions app/components/MLHTrustBadge.tsx
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;
105 changes: 105 additions & 0 deletions app/components/StickyScroll.tsx
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;
40 changes: 23 additions & 17 deletions app/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
import Link from "next/link";
import Image from "next/image";
import BracketIcon from "@/assets/branding/BracketIcon.svg";

const Footer = () => {
return (
<footer data-testid="footer">
<nav className="flex flex-row justify-between w-full">
<ul className="flex flex-row">
<li>
<Link href="/">Home</Link>
</li>
<li>
<Link href="/events">Events</Link>
</li>
<li>
<Link href="/newsletters">Newsletters</Link>
</li>
</ul>
{/* <ul>
<li>
<Link href="/discord">Join our discord</Link>
</li>
</ul> */}
<div className="flex items-center justify-center py-8">
<p>Made with ♥ by your GDSC McMaster Team</p>
</div>
<nav className="flex flex-row justify-between items-center w-full py-8 border-t-2 border-google-grey">
<div>
<Link
href="https://gdscmcmasteru.ca"
className="flex items-center h-fit w-fit"
target="_blank"
rel="noopener noreferrer"
>
<Image
src={BracketIcon}
alt="GDSC Bracket Icon"
className="h-5 w-auto"
/>
</Link>
</div>
<div>
<p>© 2024 GDSC McMaster University</p>
</div>
</nav>
</footer>
);
Expand Down
Loading

0 comments on commit eb0bc63

Please sign in to comment.