Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const MATRIX_CELLS = Array.from({ length: 21 }, (_, i) => i);

const Hero = () => {
return (
<section className="relative overflow-hidden bg-slate-50 dark:bg-[#030712] text-slate-900 dark:text-white px-6 py-20 lg:py-32 min-h-[90vh] flex items-center transition-colors duration-500">
<section id="home" className="relative overflow-hidden bg-slate-50 dark:bg-[#030712] text-slate-900 dark:text-white px-6 py-20 lg:py-32 min-h-[90vh] flex items-center transition-colors duration-500">

{/* 1. Cyber Grid Overlay */}
<div className="absolute inset-0 bg-[linear-gradient(to_right,#e2e8f0_1px,transparent_1px),linear-gradient(to_bottom,#e2e8f0_1px,transparent_1px)] dark:bg-[linear-gradient(to_right,#1f293710_1px,transparent_1px),linear-gradient(to_bottom,#1f293710_1px,transparent_1px)] bg-[size:4rem_4rem] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_100%)] pointer-events-none" />
Expand Down
44 changes: 33 additions & 11 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ const Navbar: React.FC = () => {

{/* Desktop Navigation */}
<div className="hidden md:flex items-center gap-3">
<NavLink to="/" className={navLinkStyles}>
Home
</NavLink>

<a href="#home" className="px-4 py-2 rounded-xl text-sm lg:text-base font-semibold transition-all duration-300 text-slate-700 dark:text-gray-300 hover:text-blue-500">
Home
</a>
Comment on lines +44 to +46
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use homepage hash for “Home” links to avoid broken cross-page navigation.

Line 44 and Line 117 use href="#home", which won’t navigate back to the landing page from routes like /contributors. Use /#home (consistent with the other section links) so Home works from any page.

Proposed patch
-          <a href="`#home`" className="px-4 py-2 rounded-xl text-sm lg:text-base font-semibold transition-all duration-300 text-slate-700 dark:text-gray-300 hover:text-blue-500">
+          <a href="/#home" className="px-4 py-2 rounded-xl text-sm lg:text-base font-semibold transition-all duration-300 text-slate-700 dark:text-gray-300 hover:text-blue-500">
   Home
 </a>
@@
-            <a
-  href="`#home`"
+            <a
+  href="/#home"
   className="px-4 py-2 rounded-xl text-sm lg:text-base font-semibold transition-all duration-300 text-slate-700 dark:text-gray-300 hover:text-blue-500"
   onClick={closeMenu}
 >

Also applies to: 116-123

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/Navbar.tsx` around lines 44 - 46, The "Home" anchor elements
in the Navbar component currently use href="`#home`" which breaks cross-page
navigation; update the Home link(s) (the <a> elements whose inner text is "Home"
and className includes "px-4 py-2 rounded-xl..." in the Navbar component) to use
"/#home" instead so the link returns to the landing page from any route (apply
the same change to both occurrences referenced in the diff).

<a href="/#features" className="px-4 py-2 rounded-xl text-sm lg:text-base font-semibold transition-all duration-300 text-slate-700 dark:text-gray-300 hover:text-blue-500">
Features
</a>

<a href="/#how-it-works" className="px-4 py-2 rounded-xl text-sm lg:text-base font-semibold transition-all duration-300 text-slate-700 dark:text-gray-300 hover:text-blue-500">
How It Works
</a>
<NavLink to="/track" className={navLinkStyles}>
Tracker
</NavLink>
Expand Down Expand Up @@ -107,13 +113,29 @@ const Navbar: React.FC = () => {
<div className="md:hidden border-t border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900">
<div className="px-6 py-5 flex flex-col gap-3">

<NavLink
to="/"
className={navLinkStyles}
onClick={closeMenu}
>
Home
</NavLink>
<a
href="#home"
className="px-4 py-2 rounded-xl text-sm lg:text-base font-semibold transition-all duration-300 text-slate-700 dark:text-gray-300 hover:text-blue-500"
onClick={closeMenu}
>
Home
</a>

<a
href="/#features"
className="px-4 py-2 rounded-xl text-sm lg:text-base font-semibold transition-all duration-300 text-slate-700 dark:text-gray-300 hover:text-blue-500"
onClick={closeMenu}
>
Features
</a>

<a
href="/#how-it-works"
className="px-4 py-2 rounded-xl text-sm lg:text-base font-semibold transition-all duration-300 text-slate-700 dark:text-gray-300 hover:text-blue-500"
onClick={closeMenu}
>
How It Works
</a>

<NavLink
to="/track"
Expand Down
7 changes: 7 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,10 @@
.icon-issue-closed {
color: #cf222e;
}
html {
scroll-behavior: smooth;
}

section {
scroll-margin-top: 90px;
}
Loading