Spaces:
Build error
Build error
Upload components/Navbar.jsx with huggingface_hub
Browse files- components/Navbar.jsx +42 -17
components/Navbar.jsx
CHANGED
|
@@ -1,12 +1,23 @@
|
|
| 1 |
import Link from 'next/link';
|
| 2 |
import { Menu, X } from 'lucide-react';
|
| 3 |
-
import { useState } from 'react';
|
| 4 |
|
| 5 |
export default function Navbar() {
|
| 6 |
const [isOpen, setIsOpen] = useState(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
return (
|
| 9 |
-
<nav className=
|
|
|
|
|
|
|
| 10 |
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 11 |
<div className="flex items-center justify-between h-20">
|
| 12 |
<div className="flex items-center gap-2">
|
|
@@ -16,21 +27,27 @@ export default function Navbar() {
|
|
| 16 |
<span className="text-xl font-bold text-white">NeuralScroll</span>
|
| 17 |
</div>
|
| 18 |
|
| 19 |
-
<div className="hidden md:
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
</div>
|
| 35 |
|
| 36 |
<div className="md:hidden">
|
|
@@ -57,6 +74,14 @@ export default function Navbar() {
|
|
| 57 |
{item}
|
| 58 |
</Link>
|
| 59 |
))}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
<button className="w-full mt-4 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white px-6 py-3 rounded-lg text-sm font-medium transition-all duration-200">
|
| 61 |
Get Started
|
| 62 |
</button>
|
|
|
|
| 1 |
import Link from 'next/link';
|
| 2 |
import { Menu, X } from 'lucide-react';
|
| 3 |
+
import { useState, useEffect } from 'react';
|
| 4 |
|
| 5 |
export default function Navbar() {
|
| 6 |
const [isOpen, setIsOpen] = useState(false);
|
| 7 |
+
const [scrolled, setScrolled] = useState(false);
|
| 8 |
+
|
| 9 |
+
useEffect(() => {
|
| 10 |
+
const handleScroll = () => {
|
| 11 |
+
setScrolled(window.scrollY > 20);
|
| 12 |
+
};
|
| 13 |
+
window.addEventListener('scroll', handleScroll);
|
| 14 |
+
return () => window.removeEventListener('scroll', handleScroll);
|
| 15 |
+
}, []);
|
| 16 |
|
| 17 |
return (
|
| 18 |
+
<nav className={`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${
|
| 19 |
+
scrolled ? 'bg-slate-900/90 backdrop-blur-md border-b border-slate-800' : 'bg-transparent'
|
| 20 |
+
}`}>
|
| 21 |
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 22 |
<div className="flex items-center justify-between h-20">
|
| 23 |
<div className="flex items-center gap-2">
|
|
|
|
| 27 |
<span className="text-xl font-bold text-white">NeuralScroll</span>
|
| 28 |
</div>
|
| 29 |
|
| 30 |
+
<div className="hidden md:flex items-center gap-8">
|
| 31 |
+
{['Features', 'Demo', 'Pricing', 'About'].map((item) => (
|
| 32 |
+
<Link
|
| 33 |
+
key={item}
|
| 34 |
+
href={`#${item.toLowerCase()}`}
|
| 35 |
+
className="text-slate-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200"
|
| 36 |
+
>
|
| 37 |
+
{item}
|
| 38 |
+
</Link>
|
| 39 |
+
))}
|
| 40 |
+
<a
|
| 41 |
+
href="https://huggingface.co/spaces/akhaliq/anycoder"
|
| 42 |
+
target="_blank"
|
| 43 |
+
rel="noopener noreferrer"
|
| 44 |
+
className="text-sm text-gray-400 hover:text-white transition-colors"
|
| 45 |
+
>
|
| 46 |
+
Built with anycoder
|
| 47 |
+
</a>
|
| 48 |
+
<button className="bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white px-6 py-2 rounded-full text-sm font-medium transition-all duration-200 transform hover:scale-105">
|
| 49 |
+
Get Started
|
| 50 |
+
</button>
|
| 51 |
</div>
|
| 52 |
|
| 53 |
<div className="md:hidden">
|
|
|
|
| 74 |
{item}
|
| 75 |
</Link>
|
| 76 |
))}
|
| 77 |
+
<a
|
| 78 |
+
href="https://huggingface.co/spaces/akhaliq/anycoder"
|
| 79 |
+
target="_blank"
|
| 80 |
+
rel="noopener noreferrer"
|
| 81 |
+
className="text-slate-400 hover:text-white block px-3 py-2 text-sm"
|
| 82 |
+
>
|
| 83 |
+
Built with anycoder
|
| 84 |
+
</a>
|
| 85 |
<button className="w-full mt-4 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white px-6 py-3 rounded-lg text-sm font-medium transition-all duration-200">
|
| 86 |
Get Started
|
| 87 |
</button>
|