Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pages/hack-school/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"week1": "Week 1: HTML, CSS, and JavaScript",
"react": "Week 2: React and Next.js",
"express": "Week 3: APIs with Express",
"deployment": "Week 4: Debugging and Deployment",
"mongodb": "Week 5: Databases with MongoDB"
"mongodb": "Week 4: Databases with MongoDB",
"deployment": "Week 5: Debugging and Deployment"
}
2 changes: 1 addition & 1 deletion pages/hack-school/deployment.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Week 4: Debugging and Deployment
# Week 5: Debugging and Deployment

## What is deployment?

Expand Down
2 changes: 1 addition & 1 deletion pages/hack-school/mongodb.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Week 5: Databases and MongoDB
# Week 4: Databases and MongoDB

## What is a Database?
A database is an organized collection of data or information. It allows people to store information between sessions on a website.
Expand Down
33 changes: 15 additions & 18 deletions src/components/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,34 @@ const Footer: React.FC = () => {
<h2 className={styles.title}>Connect With Us!</h2>
<div className={styles.content}>
<div className={styles.socialLinks}>
<a href="#email" className={styles.link}>
<a href="mailto:hack@acmucsd.org" className={styles.link}>
<FaEnvelope /> Email
</a>
<a href="#discord" className={styles.link}>
<a href="https://acmurl.com/hack-disc" className={styles.link} target="_blank">
<FaDiscord /> Discord
</a>
<a href="#medium" className={styles.link}>
<FaMediumM /> Medium
</a>
<a href="#facebook" className={styles.link}>
<FaFacebookF /> Facebook
</a>
<a href="#github" className={styles.link}>
<a href="https://github.com/acmucsd" className={styles.link} target="_blank">
<FaGithub /> Github
</a>
<a href="#instagram" className={styles.link}>
<a
href="https://www.instagram.com/acm.ucsd/?hl=en"
className={styles.link}
target="_blank"
>
<FaInstagram /> Instagram
</a>
<a href="#linkedin" className={styles.link}>
<a
href="https://www.linkedin.com/company/acm-ucsd/"
className={styles.link}
target="_blank"
>
<FaLinkedinIn /> LinkedIn
</a>
<a href="#youtube" className={styles.link}>
<FaYoutube /> YouTube
<a href="https://www.facebook.com/acmucsd/" className={styles.link} target="_blank">
<FaFacebookF /> Facebook
</a>
</div>
<div className={styles.newsletter}>
<h3>Newsletter</h3>
<p>Receive weekly events and news!</p>
<button type="button" className={styles.subscribeButton}>
Subscribe!
</button>
<a
href="https://vercel.com?utm_source=your-team&utm_campaign=oss"
target="_blank"
Expand Down
57 changes: 51 additions & 6 deletions src/components/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,44 @@ import Logo from '../../../public/Logo';

const NAV_LINKS = [
{ name: 'Home', href: '/' },
{ name: 'About', href: '/about' },
{ name: 'Events', href: '/events' },
{ name: 'Team', href: '/team' },
{ name: 'Contact', href: '/contact' },
{ name: 'About', href: '/#about' },
{ name: 'Events', href: '/#events' },
{ name: 'Team', href: '/#team' },
{ name: 'Contact', href: '/#contact' },
{ name: 'Hack School', href: '/hack-school' },
];

const Navbar: React.FC = () => {
const [isMenuOpen, setIsMenuOpen] = useState(false);

// Inject smooth scroll CSS once
React.useEffect(() => {
const style = document.createElement('style');
style.innerHTML = 'html { scroll-behavior: smooth; }';
document.head.appendChild(style);
return () => {
document.head.removeChild(style);
};
}, []);

// Custom click handler for hash links
const handleNavClick = (e: React.MouseEvent<HTMLElement>, href: string) => {
if (href.startsWith('/#')) {
e.preventDefault();
const id = href.split('#')[1];
const el = document.getElementById(id);
if (el) {
el.scrollIntoView({ behavior: 'smooth' });
}
// Optionally close menu on mobile
setIsMenuOpen(false);
// Update URL hash without page reload
window.history.pushState(null, '', href);
}
};

return (
<nav className={`${styles.navbar} ${isMenuOpen ? styles.navbarOpen : ''}`}>
<nav className={styles.navbar}>
<div className={styles.navbarContent}>
<Logo />
<button
Expand All @@ -31,7 +58,25 @@ const Navbar: React.FC = () => {
<ul className={`${styles.navLinks} ${isMenuOpen ? styles.navLinksOpen : ''}`}>
{NAV_LINKS.map(link => (
<li key={link.name}>
<Link href={link.href}>{link.name}</Link>
{link.href.startsWith('/#') ? (
<button
type="button"
className={styles.navButton}
onClick={e => handleNavClick(e, link.href)}
onKeyDown={e => {
if (e.key === 'Enter' || e.key === ' ') {
handleNavClick(e as any, link.href);
}
}}
tabIndex={0}
aria-label={link.name}
role="link"
>
{link.name}
</button>
) : (
<Link href={link.href}>{link.name}</Link>
)}
</li>
))}
</ul>
Expand Down
6 changes: 0 additions & 6 deletions src/components/navbar/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.navbarOpen {
background-color: rgba(255, 255, 255, 0.98);
}

.navbarContent {
display: flex;
align-items: center;
Expand Down Expand Up @@ -104,10 +100,8 @@
left: 0;
right: 0;
width: 100%;
background-color: white;
padding: 0 2rem;
z-index: 1000;
border-top: 1px solid #ddd;
max-height: 0;
overflow: hidden;
opacity: 0;
Expand Down
13 changes: 10 additions & 3 deletions src/homepage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,16 @@ const HomePage: NextPage<{ past_events: EventsArray; future_events: EventsArray
return (
<main>
<Hero />
<About />
<Events past_events={past_events} future_events={future_events} />
<Team />
<section id="about">
<About />
</section>
<section id="events">
<Events past_events={past_events} future_events={future_events} />
</section>
<section id="team">
<Team />
</section>
<section id="contact">{/* Add your Contact component or content here */}</section>
</main>
);
};
Expand Down