BSJ2004 commited on
Commit
2863dfe
·
verified ·
1 Parent(s): aa6b87f

Upload components/Navbar.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. 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="fixed top-0 left-0 right-0 z-50 bg-slate-900/80 backdrop-blur-md border-b border-slate-800">
 
 
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:block">
20
- <div className="ml-10 flex items-baseline space-x-8">
21
- {['Features', 'Demo', 'Pricing', 'About'].map((item) => (
22
- <Link
23
- key={item}
24
- href={`#${item.toLowerCase()}`}
25
- className="text-slate-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200"
26
- >
27
- {item}
28
- </Link>
29
- ))}
30
- <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">
31
- Get Started
32
- </button>
33
- </div>
 
 
 
 
 
 
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>