Apply Second Brain design: Fira Mono, Aubade cards, brand palette
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const links = [
|
||||
{ href: "/admin/dashboard", label: "Обзор" },
|
||||
@@ -15,20 +14,29 @@ export function AdminNav() {
|
||||
|
||||
return (
|
||||
<>
|
||||
{links.map(({ href, label }) => (
|
||||
<Link
|
||||
key={href}
|
||||
href={href}
|
||||
className={cn(
|
||||
"block px-3 py-2 rounded-lg text-sm transition-colors",
|
||||
pathname === href || (href !== "/admin/dashboard" && pathname.startsWith(href))
|
||||
? "bg-slate-700 text-white"
|
||||
: "text-slate-300 hover:bg-slate-800 hover:text-white"
|
||||
)}
|
||||
>
|
||||
{label}
|
||||
</Link>
|
||||
))}
|
||||
{links.map(({ href, label }) => {
|
||||
const active =
|
||||
pathname === href ||
|
||||
(href !== "/admin/dashboard" && pathname.startsWith(href));
|
||||
return (
|
||||
<Link
|
||||
key={href}
|
||||
href={href}
|
||||
className="admin-sidebar-nav-link"
|
||||
style={
|
||||
active
|
||||
? {
|
||||
color: "#E8F0D8",
|
||||
borderLeftColor: "#E8F0D8",
|
||||
backgroundColor: "var(--sidebar-surface)",
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{label}
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user