style(ui): adjust primitives, card shadow and header nav

This commit is contained in:
zetaloop
2026-02-25 14:21:18 +08:00
parent cd759ae309
commit 7a55f35b76
5 changed files with 24 additions and 24 deletions
+17 -17
View File
@@ -100,20 +100,20 @@ export function Header() {
</Link>
<nav className="hidden md:flex items-center gap-1">
{navLinks.map((link) => (
<Link
key={link.href}
href={link.href}
className={cn(
"rounded-lg px-4 py-2 text-sm font-medium transition-colors",
pathname === link.href || (link.href !== "/" && pathname.startsWith(link.href))
? "bg-secondary text-foreground"
: "text-muted-foreground hover:bg-secondary/60 hover:text-foreground",
)}
>
{link.label}
</Link>
))}
{navLinks.map((link) => {
const isActive =
pathname === link.href || (link.href !== "/" && pathname.startsWith(link.href))
return (
<Button
key={link.href}
variant={isActive ? "secondary" : "ghost"}
className={!isActive ? "text-muted-foreground" : undefined}
asChild
>
<Link href={link.href}>{link.label}</Link>
</Button>
)
})}
</nav>
</div>
<div className="flex items-center justify-end gap-1">
@@ -227,11 +227,11 @@ export function Header() {
</DropdownMenu>
</>
) : (
<div className="hidden md:flex items-center gap-2">
<Button variant="ghost" size="sm" asChild>
<div className="hidden md:flex items-center gap-1">
<Button variant="ghost" className="text-muted-foreground" asChild>
<Link href="/login"></Link>
</Button>
<Button size="sm" asChild>
<Button variant="ghost" className="text-muted-foreground" asChild>
<Link href="/register"></Link>
</Button>
</div>