style(ui): adjust primitives, card shadow and header nav
This commit is contained in:
+17
-17
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user