feat: UI redesign — polished layout, modal, nav, profile
- CSS: refined shadows with border ring, dark bg #0A0A0A, larger card radius (16/22px), modal-backdrop blur, scrollbar styling, new dropzone + profile-grid CSS classes - Navbar: paw emoji logo, labels under icons, accent gradient bar, active-state ring on avatar - Login / Register: auth card with decorative background blobs, form wrapped in card, cleaner spacing - CatModal: two-column layout on desktop (photo left, info right), modal-backdrop blur, comment input with user avatar, like label - ProfilePage: 88px avatar with camera overlay, inline stat bar with icons, grid section divider, Stat helper component - CatCard: points badge in header (amber), caption text secondary color, ring on avatar - FeedSidebar: color-coded rank badges, hover rows, star icon - UploadPage: new dropzone-idle/dropzone-active CSS classes, filename chip on preview, UserAvatar in caption row, HEIC/AVIF in accepted formats hint, 500-char counter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,6 @@ import { Link, Navigate } from 'react-router-dom';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Cat } from 'lucide-react';
|
||||
|
||||
export default function LoginPage() {
|
||||
const { user, login } = useAuth();
|
||||
@@ -24,46 +23,73 @@ export default function LoginPage() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center p-5 bg-[var(--bg)]">
|
||||
<div className="w-full max-w-[380px] animate-fade-up">
|
||||
<div className="text-center mb-10">
|
||||
<div className="mx-auto mb-5 h-14 w-14 rounded-2xl flex items-center justify-center bg-[var(--accent)] shadow-sm">
|
||||
<Cat className="h-7 w-7 text-white" strokeWidth={1.5} />
|
||||
<div className="relative flex min-h-screen items-center justify-center p-5 overflow-hidden bg-[var(--bg)]">
|
||||
{/* Декоративные пятна */}
|
||||
<div className="auth-bg-blob w-96 h-96 bg-[var(--accent)] -top-20 -left-20 absolute" />
|
||||
<div className="auth-bg-blob w-72 h-72 bg-pink-300 bottom-10 right-5 absolute" />
|
||||
|
||||
<div className="relative w-full max-w-[380px] animate-fade-up">
|
||||
{/* Логотип */}
|
||||
<div className="text-center mb-8">
|
||||
<div className="mx-auto mb-5 h-[72px] w-[72px] rounded-[22px] flex items-center justify-center bg-[var(--accent)] shadow-lg">
|
||||
<span className="text-4xl select-none">🐾</span>
|
||||
</div>
|
||||
<h1 className="text-2xl font-800 tracking-tight">Котограм</h1>
|
||||
<p className="text-sm text-[var(--fg-tertiary)] mt-1">Войдите, чтобы смотреть котов</p>
|
||||
<h1 className="text-2xl font-extrabold tracking-tight">Котограм</h1>
|
||||
<p className="text-sm text-[var(--fg-tertiary)] mt-1.5">Войдите, чтобы смотреть котов</p>
|
||||
</div>
|
||||
|
||||
<form onSubmit={handleSubmit} className="space-y-3">
|
||||
<Input value={username} onChange={e => setUsername(e.target.value)}
|
||||
placeholder="Имя пользователя" required autoFocus
|
||||
className="h-12 text-sm rounded-xl bg-[var(--surface)] border-[var(--border)] focus-ring" />
|
||||
<Input type="password" value={password} onChange={e => setPassword(e.target.value)}
|
||||
placeholder="Пароль" required
|
||||
className="h-12 text-sm rounded-xl bg-[var(--surface)] border-[var(--border)] focus-ring" />
|
||||
|
||||
{error && (
|
||||
<div className="flex items-center gap-2 px-4 py-3 rounded-xl bg-[var(--danger-light)] text-[var(--danger)] text-xs font-medium animate-fade-up">
|
||||
{error}
|
||||
{/* Форма */}
|
||||
<div className="card p-6 space-y-3">
|
||||
<form onSubmit={handleSubmit} className="space-y-3">
|
||||
<div className="space-y-2">
|
||||
<Input
|
||||
value={username}
|
||||
onChange={e => setUsername(e.target.value)}
|
||||
placeholder="Имя пользователя"
|
||||
required
|
||||
autoFocus
|
||||
autoComplete="username"
|
||||
className="h-12 text-sm rounded-xl bg-[var(--bg)] border-[var(--border)] focus-ring"
|
||||
/>
|
||||
<Input
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={e => setPassword(e.target.value)}
|
||||
placeholder="Пароль"
|
||||
required
|
||||
autoComplete="current-password"
|
||||
className="h-12 text-sm rounded-xl bg-[var(--bg)] border-[var(--border)] focus-ring"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<Button type="submit" disabled={loading}
|
||||
className="w-full h-12 rounded-xl text-sm font-semibold bg-[var(--accent)] hover:bg-[var(--accent-hover)] text-white transition-all active:scale-[0.98]">
|
||||
{loading ? (
|
||||
<span className="flex items-center gap-2">
|
||||
<span className="h-4 w-4 rounded-full border-2 border-white/30 border-t-white animate-spin" />
|
||||
Вход...
|
||||
</span>
|
||||
) : 'Войти'}
|
||||
</Button>
|
||||
</form>
|
||||
{error && (
|
||||
<div className="flex items-center gap-2 px-4 py-3 rounded-xl bg-[var(--danger-light)] text-[var(--danger)] text-xs font-medium animate-fade-up">
|
||||
{error}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<p className="mt-8 text-center text-sm text-[var(--fg-tertiary)]">
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={loading}
|
||||
className="w-full h-12 rounded-xl text-sm font-semibold bg-[var(--accent)] hover:bg-[var(--accent-hover)] text-white transition-all active:scale-[0.98] shadow-sm"
|
||||
>
|
||||
{loading ? (
|
||||
<span className="flex items-center gap-2">
|
||||
<span className="h-4 w-4 rounded-full border-2 border-white/30 border-t-white animate-spin" />
|
||||
Вход...
|
||||
</span>
|
||||
) : 'Войти'}
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p className="mt-5 text-center text-sm text-[var(--fg-tertiary)]">
|
||||
Нет аккаунта?{' '}
|
||||
<Link to="/register" className="font-semibold text-[var(--accent)] hover:opacity-80 transition-opacity">Зарегистрироваться</Link>
|
||||
<Link to="/register" className="font-semibold text-[var(--accent)] hover:opacity-80 transition-opacity">
|
||||
Зарегистрироваться
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user