UI: тёплый современный дизайн + русификация
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { Avatar, AvatarFallback } from '@/components/ui/avatar';
|
||||
import { LogOut, Plus, Home, User } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { LogOut, Plus, Home, Cat } from 'lucide-react';
|
||||
|
||||
export default function Navbar() {
|
||||
const { user, logout } = useAuth();
|
||||
@@ -10,29 +11,40 @@ export default function Navbar() {
|
||||
if (!user) return null;
|
||||
|
||||
return (
|
||||
<nav className="sticky top-0 z-50 border-b bg-white">
|
||||
<div className="mx-auto flex h-12 max-w-5xl items-center justify-between px-4">
|
||||
<Link to="/feed" className="text-base font-semibold tracking-tight">
|
||||
Catstagram
|
||||
<nav className="sticky top-0 z-50 border-b bg-white/80 backdrop-blur-md shadow-sm">
|
||||
<div className="mx-auto flex h-14 max-w-5xl items-center justify-between px-4">
|
||||
<Link to="/feed" className="flex items-center gap-2 group">
|
||||
<div className="flex h-8 w-8 items-center justify-center rounded-xl bg-gradient-to-br from-orange-400 to-rose-500 shadow-sm transition-transform group-hover:scale-105">
|
||||
<Cat className="h-4.5 w-4.5 text-white" />
|
||||
</div>
|
||||
<span className="text-base font-bold tracking-tight text-foreground">
|
||||
Catstagram
|
||||
</span>
|
||||
</Link>
|
||||
|
||||
<div className="flex items-center gap-0.5">
|
||||
<Link to="/feed" className="flex h-9 w-9 items-center justify-center rounded hover:bg-secondary transition-colors">
|
||||
<Home className="h-4 w-4" />
|
||||
<Link to="/feed">
|
||||
<Button variant="ghost" size="icon" className="h-9 w-9 rounded-xl text-muted-foreground hover:text-foreground hover:bg-secondary">
|
||||
<Home className="h-4.5 w-4.5" />
|
||||
</Button>
|
||||
</Link>
|
||||
<Link to="/upload" className="flex h-9 w-9 items-center justify-center rounded hover:bg-secondary transition-colors">
|
||||
<Plus className="h-4 w-4" />
|
||||
<Link to="/upload">
|
||||
<Button variant="ghost" size="icon" className="h-9 w-9 rounded-xl text-muted-foreground hover:text-foreground hover:bg-secondary">
|
||||
<Plus className="h-4.5 w-4.5" />
|
||||
</Button>
|
||||
</Link>
|
||||
<Link to="/profile" className="flex h-9 w-9 items-center justify-center rounded hover:bg-secondary transition-colors">
|
||||
<Avatar className="h-6 w-6">
|
||||
<AvatarFallback className="text-[9px] bg-foreground text-background">
|
||||
{user.username.charAt(0).toUpperCase()}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<Link to="/profile">
|
||||
<Button variant="ghost" size="icon" className="h-9 w-9 rounded-xl">
|
||||
<Avatar className="h-7 w-7">
|
||||
<AvatarFallback className="text-[10px] bg-gradient-to-br from-orange-400 to-rose-500 text-white">
|
||||
{user.username.charAt(0).toUpperCase()}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
</Button>
|
||||
</Link>
|
||||
<button
|
||||
onClick={() => { logout(); navigate('/login'); }}
|
||||
className="flex h-9 w-9 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors"
|
||||
className="flex h-9 w-9 items-center justify-center rounded-xl text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors"
|
||||
>
|
||||
<LogOut className="h-4 w-4" />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user