-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCyberNav.tsx
More file actions
71 lines (66 loc) · 2.39 KB
/
Copy pathCyberNav.tsx
File metadata and controls
71 lines (66 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { motion } from "framer-motion";
import { Link, useLocation } from "react-router-dom";
import { Lock, Key, BarChart3, QrCode } from "lucide-react";
import logo from "@/assets/logo.png";
const navItems = [
{ path: "/", label: "HOME", icon: QrCode },
{ path: "/generate", label: "GENERATE", icon: Lock },
{ path: "/overlay", label: "OVERLAY", icon: Key },
{ path: "/qr-auth", label: "QR AUTH", icon: QrCode },
{ path: "/analysis", label: "ANALYSIS", icon: BarChart3 },
];
export default function CyberNav() {
const location = useLocation();
return (
<div className="fixed top-4 left-1/2 -translate-x-1/2 z-50 w-auto">
<motion.nav
initial={{ y: -80, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
transition={{ type: "spring", stiffness: 200, damping: 25 }}
className="flex items-center gap-2 px-4 py-2 rounded-full bg-card/90 backdrop-blur-xl border border-border shadow-lg"
>
{/* Logo */}
<Link
to="/"
className="flex items-center justify-center h-10 w-10 rounded-full shrink-0 overflow-hidden"
>
<img
src={logo}
alt="FunAuth logo"
className="h-10 w-10 object-contain"
/>
</Link>
{/* Nav Links */}
<div className="flex items-center gap-2 px-2">
{navItems.map((item) => {
const active = location.pathname === item.path;
return (
<Link
key={item.path}
to={item.path}
className={`px-4 py-2 font-display text-base tracking-wider transition-all duration-300 rounded-full whitespace-nowrap ${
active
? "text-primary bg-primary/10"
: "text-muted-foreground hover:text-primary"
}`}
>
{item.label}
</Link>
);
})}
</div>
{/* Docs pill */}
<Link
to="/docs"
className={`flex items-center gap-2 px-5 py-2 rounded-full border shrink-0 font-display text-sm tracking-wider transition-all duration-300 ${
location.pathname === "/docs"
? "border-primary text-primary-foreground bg-primary/40"
: "border-primary/40 bg-primary/20 text-primary hover:bg-primary/30"
}`}
>
DOCS
</Link>
</motion.nav>
</div>
);
}