|
1 | 1 | "use client"; |
2 | | -import Link from "next/link"; |
3 | | -import { useState } from "react"; |
4 | | -import { |
5 | | - FiHome, |
6 | | - FiFolder, |
7 | | - FiFileText, |
8 | | - FiUser, |
9 | | - FiGithub, |
10 | | - FiMenu, |
11 | | - FiX, |
12 | | -} from "react-icons/fi"; |
13 | | - |
14 | | -export default function Navbar() { |
| 2 | +import React, { useState } from "react"; |
| 3 | +import { Menu, X, Github } from "lucide-react"; |
| 4 | + |
| 5 | +const Navbar = () => { |
15 | 6 | const [isOpen, setIsOpen] = useState(false); |
16 | 7 |
|
17 | | - const toggleMenu = () => { |
18 | | - setIsOpen(!isOpen); |
19 | | - }; |
| 8 | + const toggleMenu = () => setIsOpen(!isOpen); |
20 | 9 |
|
21 | 10 | return ( |
22 | | - <nav className="bg-gray-100 text-black shadow-lg sticky right-0 left-0 z-50"> |
| 11 | + <nav className="bg-black border-b border-gray-800 sticky top-0 z-50"> |
23 | 12 | <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> |
24 | | - <div className="flex items-center justify-between h-16"> |
25 | | - {/* Logo and site name */} |
26 | | - <div className="flex-shrink-0 flex items-center"> |
27 | | - <img className="h-12 w-12" src="/favicon.svg" alt="Open UG Logo" /> |
28 | | - <span className="font-bold text-xl text-black">Open UG Labs</span> |
| 13 | + <div className="flex justify-between items-center h-16"> |
| 14 | + {/* Logo and Brand */} |
| 15 | + <div className="flex items-center space-x-3"> |
| 16 | + <div className="w-10 h-10 bg-gradient-to-r from-red-800 to-red-600 flex items-center justify-center"> |
| 17 | + <span className="text-white font-bold text-lg">UG</span> |
| 18 | + </div> |
| 19 | + <div> |
| 20 | + <span className="text-xl font-semibold text-white"> |
| 21 | + Open UG Labs |
| 22 | + </span> |
| 23 | + </div> |
| 24 | + </div> |
| 25 | + |
| 26 | + {/* Desktop Navigation */} |
| 27 | + <div className="hidden md:flex items-center space-x-8"> |
| 28 | + <a |
| 29 | + href="#home" |
| 30 | + className="text-gray-300 hover:text-white font-medium transition-colors px-4 py-2" |
| 31 | + > |
| 32 | + Home |
| 33 | + </a> |
| 34 | + |
| 35 | + <a |
| 36 | + href="#about" |
| 37 | + className="text-gray-300 hover:text-white font-medium transition-colors px-4 py-2" |
| 38 | + > |
| 39 | + About |
| 40 | + </a> |
| 41 | + |
| 42 | + <a |
| 43 | + href="#projects" |
| 44 | + className="text-gray-300 hover:text-white font-medium transition-colors px-4 py-2" |
| 45 | + > |
| 46 | + Projects |
| 47 | + </a> |
| 48 | + |
| 49 | + <a |
| 50 | + href="#community" |
| 51 | + className="text-gray-300 hover:text-white font-medium transition-colors px-4 py-2" |
| 52 | + > |
| 53 | + Community |
| 54 | + </a> |
| 55 | + |
| 56 | + <a |
| 57 | + href="#contact" |
| 58 | + className="text-gray-300 hover:text-white font-medium transition-colors px-4 py-2" |
| 59 | + > |
| 60 | + Contact |
| 61 | + </a> |
29 | 62 | </div> |
30 | 63 |
|
31 | | - {/* Desktop menu */} |
32 | | - <div className="hidden md:block"> |
33 | | - <div className="ml-10 flex items-center space-x-4"> |
34 | | - <Link |
35 | | - href="/" |
36 | | - className="flex items-center px-3 py-2 rounded-md text-sm font-medium text-black hover:bg-red-600 hover:text-white transition duration-300" |
| 64 | + {/* CTA Buttons */} |
| 65 | + <div className="hidden md:flex items-center space-x-4"> |
| 66 | + <a |
| 67 | + href="#github" |
| 68 | + className="flex items-center space-x-2 text-gray-300 hover:text-white transition-colors px-4 py-2" |
| 69 | + > |
| 70 | + <Github className="w-5 h-5" /> |
| 71 | + <span className="text-sm font-medium">GitHub</span> |
| 72 | + </a> |
| 73 | + <button className="bg-red-800 text-white px-6 py-2 font-medium hover:bg-red-700 transition-colors"> |
| 74 | + Get Started |
| 75 | + </button> |
| 76 | + </div> |
| 77 | + |
| 78 | + {/* Mobile menu button */} |
| 79 | + <div className="md:hidden"> |
| 80 | + <button |
| 81 | + onClick={toggleMenu} |
| 82 | + className="text-gray-300 hover:text-white transition-colors" |
| 83 | + > |
| 84 | + {isOpen ? ( |
| 85 | + <X className="w-6 h-6" /> |
| 86 | + ) : ( |
| 87 | + <Menu className="w-6 h-6" /> |
| 88 | + )} |
| 89 | + </button> |
| 90 | + </div> |
| 91 | + </div> |
| 92 | + |
| 93 | + {/* Mobile Navigation */} |
| 94 | + {isOpen && ( |
| 95 | + <div className="md:hidden border-t border-gray-800"> |
| 96 | + <div className="py-4 space-y-2"> |
| 97 | + <a |
| 98 | + href="#home" |
| 99 | + className="block text-gray-300 hover:text-white hover:bg-gray-900 font-medium px-4 py-3 transition-colors" |
37 | 100 | > |
38 | | - <FiHome className="mr-1" /> |
39 | 101 | Home |
40 | | - </Link> |
| 102 | + </a> |
| 103 | + |
41 | 104 | <a |
42 | | - href="/projects" |
43 | | - className="flex items-center px-3 py-2 rounded-md text-sm font-medium text-black hover:bg-red-600 hover:text-white transition duration-300" |
| 105 | + href="#about" |
| 106 | + className="block text-gray-300 hover:text-white hover:bg-gray-900 font-medium px-4 py-3 transition-colors" |
44 | 107 | > |
45 | | - <FiFolder className="mr-1" /> |
46 | | - Projects |
| 108 | + About |
47 | 109 | </a> |
| 110 | + |
48 | 111 | <a |
49 | | - href="/accords" |
50 | | - className="flex items-center px-3 py-2 rounded-md text-sm font-medium text-black hover:bg-red-600 hover:text-white transition duration-300" |
| 112 | + href="#projects" |
| 113 | + className="block text-gray-300 hover:text-white hover:bg-gray-900 font-medium px-4 py-3 transition-colors" |
51 | 114 | > |
52 | | - <FiFileText className="mr-1" /> |
53 | | - Accords |
| 115 | + Projects |
54 | 116 | </a> |
| 117 | + |
55 | 118 | <a |
56 | | - href="/about" |
57 | | - className="flex items-center px-3 py-2 rounded-md text-sm font-medium text-black hover:bg-red-600 hover:text-white transition duration-300" |
| 119 | + href="#community" |
| 120 | + className="block text-gray-300 hover:text-white hover:bg-gray-900 font-medium px-4 py-3 transition-colors" |
58 | 121 | > |
59 | | - <FiUser className="mr-1" /> |
60 | | - About |
| 122 | + Community |
61 | 123 | </a> |
| 124 | + |
62 | 125 | <a |
63 | | - href="https://github.com/open-ug" |
64 | | - target="_blank" |
65 | | - rel="noopener noreferrer" |
66 | | - className="flex items-center px-3 py-2 rounded-md text-sm font-medium bg-yellow-400 text-black hover:bg-yellow-500 transition duration-300" |
| 126 | + href="#contact" |
| 127 | + className="block text-gray-300 hover:text-white hover:bg-gray-900 font-medium px-4 py-3 transition-colors" |
67 | 128 | > |
68 | | - <FiGithub className="mr-1" /> |
69 | | - GitHub |
| 129 | + Contact |
70 | 130 | </a> |
71 | | - </div> |
72 | | - </div> |
73 | 131 |
|
74 | | - {/* Mobile menu button */} |
75 | | - <div className="md:hidden flex items-center"> |
76 | | - <button |
77 | | - onClick={toggleMenu} |
78 | | - className="inline-flex items-center justify-center p-2 rounded-md text-black hover:text-white hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-red-500" |
79 | | - > |
80 | | - <span className="sr-only">Open main menu</span> |
81 | | - {isOpen ? ( |
82 | | - <FiX className="block h-6 w-6" /> |
83 | | - ) : ( |
84 | | - <FiMenu className="block h-6 w-6" /> |
85 | | - )} |
86 | | - </button> |
| 132 | + <div className="pt-4 border-t border-gray-800 space-y-3 px-4"> |
| 133 | + <a |
| 134 | + href="#github" |
| 135 | + className="flex items-center space-x-2 text-gray-300 hover:text-white py-2" |
| 136 | + > |
| 137 | + <Github className="w-5 h-5" /> |
| 138 | + <span className="font-medium">GitHub</span> |
| 139 | + </a> |
| 140 | + <button className="w-full bg-red-800 text-white px-6 py-3 font-medium hover:bg-red-700 transition-colors"> |
| 141 | + Get Started |
| 142 | + </button> |
| 143 | + </div> |
| 144 | + </div> |
87 | 145 | </div> |
88 | | - </div> |
89 | | - </div> |
90 | | - |
91 | | - {/* Mobile menu, show/hide based on menu state */} |
92 | | - <div className={`${isOpen ? "block" : "hidden"} md:hidden`}> |
93 | | - <div className="px-2 pt-2 pb-3 space-y-1 sm:px-3 border-t border-gray-200"> |
94 | | - <Link |
95 | | - href="/" |
96 | | - className="flex items-center px-3 py-2 rounded-md text-base font-medium text-black hover:bg-red-600 hover:text-white" |
97 | | - > |
98 | | - <FiHome className="mr-2" /> |
99 | | - Home |
100 | | - </Link> |
101 | | - <a |
102 | | - href="/projects" |
103 | | - className="flex items-center px-3 py-2 rounded-md text-base font-medium text-black hover:bg-red-600 hover:text-white" |
104 | | - > |
105 | | - <FiFolder className="mr-2" /> |
106 | | - Projects |
107 | | - </a> |
108 | | - <a |
109 | | - href="/accords" |
110 | | - className="flex items-center px-3 py-2 rounded-md text-base font-medium text-black hover:bg-red-600 hover:text-white" |
111 | | - > |
112 | | - <FiFileText className="mr-2" /> |
113 | | - Accords |
114 | | - </a> |
115 | | - <a |
116 | | - href="/about" |
117 | | - className="flex items-center px-3 py-2 rounded-md text-base font-medium text-black hover:bg-red-600 hover:text-white" |
118 | | - > |
119 | | - <FiUser className="mr-2" /> |
120 | | - About |
121 | | - </a> |
122 | | - <a |
123 | | - href="https://github.com/open-ug" |
124 | | - target="_blank" |
125 | | - rel="noopener noreferrer" |
126 | | - className="flex items-center px-3 py-2 rounded-md text-base font-medium bg-yellow-400 text-black hover:bg-yellow-500" |
127 | | - > |
128 | | - <FiGithub className="mr-2" /> |
129 | | - GitHub |
130 | | - </a> |
131 | | - </div> |
| 146 | + )} |
132 | 147 | </div> |
133 | 148 | </nav> |
134 | 149 | ); |
135 | | -} |
| 150 | +}; |
| 151 | + |
| 152 | +export default Navbar; |
0 commit comments