From 385a79a4a1197514fa8887cae32f3a7aeb2c01a2 Mon Sep 17 00:00:00 2001 From: aamoghS Date: Thu, 24 Sep 2026 23:34:11 -0400 Subject: [PATCH] fix(hacklytics): countdown time, nav links on 404, mobile menu a11y - The countdown targeted new Date("2027-02-26T23:59:59") with no offset, which means midnight in each visitor's own timezone. Check-in opens at 5pm ET (the JSON-LD startDate), so ET visitors saw it keep running ~7h after doors and PT visitors' target was ~3am ET Saturday. - Navbar links always preventDefault'd, then bailed when the section was not on the page: on the 404 page About/FAQ did nothing, and cmd/ctrl- click could never open a new tab. They now fall through to normal navigation in both cases. - The closed mobile menu is hidden only by opacity, so its links sat in the tab order and accessibility tree. It is now inert when closed, and the toggle reports aria-expanded / aria-controls. - MLH badge link: add rel="noopener noreferrer" like every other external link. - Remove public/index.html, Firebase's "Hosting Setup Complete" boilerplate, which sits at the same path as the app's / page (next dev reports the conflict; a copy-order change would ship it). --- sites/hacklytics2027/app/page.tsx | 5 +- sites/hacklytics2027/components/Navbar.tsx | 11 +- sites/hacklytics2027/public/index.html | 157 --------------------- 3 files changed, 14 insertions(+), 159 deletions(-) delete mode 100644 sites/hacklytics2027/public/index.html diff --git a/sites/hacklytics2027/app/page.tsx b/sites/hacklytics2027/app/page.tsx index a044f74e..4d976b3d 100644 --- a/sites/hacklytics2027/app/page.tsx +++ b/sites/hacklytics2027/app/page.tsx @@ -124,6 +124,7 @@ export default function HomePage() { Major League Hacking 2027 @@ -202,7 +203,9 @@ export default function HomePage() { - + {/* Check-in opens 5pm ET (the JSON-LD startDate). Without an offset + the string meant midnight in each visitor's own timezone. */} + diff --git a/sites/hacklytics2027/components/Navbar.tsx b/sites/hacklytics2027/components/Navbar.tsx index c4608986..e50dcb0f 100644 --- a/sites/hacklytics2027/components/Navbar.tsx +++ b/sites/hacklytics2027/components/Navbar.tsx @@ -52,11 +52,14 @@ export default function Navbar() { }, [open]); const handleNavClick = (e: React.MouseEvent, href: string) => { - e.preventDefault(); + // Cmd/ctrl-click opens a new tab; that is the browser's to handle. + if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return; setOpen(false); const id = href.replace("/#", ""); const el = document.getElementById(id); + // Off the home page (the 404), let the link navigate to /#id. if (!el) return; + e.preventDefault(); clickScrolling.current = true; setVisible(true); const offset = (headerRef.current?.offsetHeight ?? 0) + 16; @@ -120,6 +123,8 @@ export default function Navbar() {