Spaces:
Sleeping
Sleeping
Download components/Navbar.jsx from Maj3stiCD/anycoder-69112ea1: direct link, hf CLI and curl.
- Browser
- Download file 4.84 kB
-
https://huggingface.co/spaces/Maj3stiCD/anycoder-69112ea1/resolve/main/components/Navbar.jsx
- Command line
-
hf download hf://spaces/Maj3stiCD/anycoder-69112ea1/components/Navbar.jsx
-
curl -L -o Navbar.jsx https://huggingface.co/spaces/Maj3stiCD/anycoder-69112ea1/resolve/main/components/Navbar.jsx
4.84 kB
| import { useState, useEffect } from 'react' | |
| import { Code2, Menu, X, ExternalLink, Github, GitBranch } from 'lucide-react' | |
| export default function Navbar() { | |
| const [isScrolled, setIsScrolled] = useState(false) | |
| const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false) | |
| useEffect(() => { | |
| const handleScroll = () => { | |
| setIsScrolled(window.scrollY > 20) | |
| } | |
| window.addEventListener('scroll', handleScroll) | |
| return () => window.removeEventListener('scroll', handleScroll) | |
| }, []) | |
| const navLinks = [ | |
| { href: '#projects', label: 'Projects' }, | |
| { href: '#repo', label: 'Repository' }, | |
| { href: '#stats', label: 'Stats' }, | |
| { href: '#downloads', label: 'Downloads' }, | |
| { href: '#team', label: 'Team' }, | |
| { href: '#terminal', label: 'Terminal' }, | |
| ] | |
| return ( | |
| <nav | |
| className={`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${ | |
| isScrolled ? 'glass-strong py-3 shadow-lg' : 'bg-transparent py-5' | |
| }`} | |
| > | |
| <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div className="flex items-center justify-between"> | |
| <a href="#" className="flex items-center gap-2.5 group"> | |
| <div className="relative w-9 h-9 flex items-center justify-center"> | |
| <div className="absolute inset-0 rounded-lg bg-gradient-to-br from-primary-500 to-sky-400 opacity-20 group-hover:opacity-40 transition-opacity" /> | |
| <Code2 className="w-5 h-5 text-primary-400 relative z-10" /> | |
| </div> | |
| <div className="flex flex-col"> | |
| <span className="font-bold text-lg tracking-tight text-white leading-none"> | |
| daKI<span className="text-primary-400">tech</span> | |
| </span> | |
| <span className="text-[10px] text-slate-400 font-mono leading-none mt-0.5 tracking-wider">DEV.ORG</span> | |
| </div> | |
| </a> | |
| <div className="hidden md:flex items-center gap-1"> | |
| {navLinks.map((link) => ( | |
| <a | |
| key={link.href} | |
| href={link.href} | |
| className="px-3 py-1.5 text-sm text-slate-300 hover:text-white rounded-md hover:bg-white/5 transition-colors" | |
| > | |
| {link.label} | |
| </a> | |
| ))} | |
| <div className="w-px h-5 bg-slate-700 mx-2" /> | |
| <a | |
| href="https://huggingface.co/spaces/akhaliq/anycoder" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| className="flex items-center gap-1.5 px-3 py-1.5 text-sm text-primary-400 hover:text-primary-300 rounded-md hover:bg-primary-500/10 transition-colors" | |
| > | |
| <ExternalLink className="w-3.5 h-3.5" /> | |
| Built with anycoder | |
| </a> | |
| <a | |
| href="https://github.com/Maj3sTiCDD83/daKItech-dev" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| className="flex items-center gap-2 ml-2 px-4 py-2 text-sm font-medium text-white bg-slate-800 hover:bg-slate-700 rounded-lg border border-slate-700 transition-all" | |
| > | |
| <Github className="w-4 h-4" /> | |
| <GitBranch className="w-3 h-3" /> | |
| <span>GitHub</span> | |
| </a> | |
| </div> | |
| <button | |
| onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)} | |
| className="md:hidden p-2 text-slate-300 hover:text-white" | |
| > | |
| {isMobileMenuOpen ? <X className="w-5 h-5" /> : <Menu className="w-5 h-5" />} | |
| </button> | |
| </div> | |
| {isMobileMenuOpen && ( | |
| <div className="md:hidden mt-4 pb-4 border-t border-slate-800 pt-4 space-y-1"> | |
| {navLinks.map((link) => ( | |
| <a | |
| key={link.href} | |
| href={link.href} | |
| onClick={() => setIsMobileMenuOpen(false)} | |
| className="block px-3 py-2 text-sm text-slate-300 hover:text-white rounded-md hover:bg-white/5" | |
| > | |
| {link.label} | |
| </a> | |
| ))} | |
| <a | |
| href="https://huggingface.co/spaces/akhaliq/anycoder" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| className="flex items-center gap-1.5 px-3 py-2 text-sm text-primary-400" | |
| > | |
| <ExternalLink className="w-3.5 h-3.5" /> | |
| Built with anycoder | |
| </a> | |
| <a | |
| href="https://github.com/Maj3sTiCDD83/daKItech-dev" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| className="flex items-center gap-2 px-3 py-2 text-sm font-medium text-white" | |
| > | |
| <Github className="w-4 h-4" /> | |
| <span>View on GitHub</span> | |
| </a> | |
| </div> | |
| )} | |
| </div> | |
| </nav> | |
| ) | |
| } |