feat: complete editorial redesign of Wordly.art SaaS
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m31s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m31s
New design system with cream/dark/copper palette (#FDFCF9, #1A1A1A, #C5A17A), Inter font, rounded editorial cards, and dark mode support. - globals.css: Rewritten from 1867→200 lines, new brand colors + editorial utilities - Landing page: New editorial design with Hero, Steps, Features, Layout, Formats, Pricing, CTA, Footer - Auth pages: Editorial card design with decorative blur blobs and back-to-home links - Dashboard sidebar: New w-72 sidebar with Momento promo section - Dashboard header: New h-20 topbar with editorial styling - i18n: Added memento/common/dashboard keys for all 13 locales, cleaned duplicate landing keys Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -2,12 +2,8 @@
|
||||
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { Languages, LogOut } from 'lucide-react';
|
||||
import { LogOut } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { Avatar, AvatarFallback } from '@/components/ui/avatar';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { useUser } from './useUser';
|
||||
import { useLogout } from './useLogout';
|
||||
import { getNavItems } from './constants';
|
||||
@@ -24,19 +20,19 @@ export function DashboardSidebar() {
|
||||
const navItems = getNavItems(['pro', 'business', 'enterprise'].includes(user?.tier ?? ''));
|
||||
|
||||
return (
|
||||
<aside className="hidden w-64 shrink-0 border-r border-border bg-card lg:flex lg:flex-col">
|
||||
<aside className="hidden w-72 shrink-0 border-r border-black/5 dark:border-white/5 bg-white dark:bg-[#141414] lg:flex lg:flex-col">
|
||||
{/* Brand */}
|
||||
<div className="flex h-14 items-center gap-2.5 px-5">
|
||||
<div className="flex size-7 items-center justify-center rounded-md bg-foreground">
|
||||
<Languages className="size-3.5 text-background" />
|
||||
<div className="flex items-center gap-3 px-6 py-6">
|
||||
<div className="flex size-9 items-center justify-center rounded-xl bg-brand-dark text-white font-bold text-sm">
|
||||
W
|
||||
</div>
|
||||
<span className="text-sm font-semibold tracking-tight text-foreground">{t('auth.brandName')}</span>
|
||||
<span className="text-sm font-bold tracking-tight text-brand-dark dark:text-white">
|
||||
{t('auth.brandName')}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<Separator />
|
||||
|
||||
{/* Navigation */}
|
||||
<nav className="flex-1 overflow-y-auto px-3 py-4">
|
||||
<nav className="flex-1 overflow-y-auto px-3 py-2">
|
||||
<div className="flex flex-col gap-1">
|
||||
{navItems.map((item) => {
|
||||
const isActive = pathname === item.href;
|
||||
@@ -45,13 +41,13 @@ export function DashboardSidebar() {
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
className={cn(
|
||||
'flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors',
|
||||
'flex items-center gap-4 rounded-2xl px-6 py-4 text-[11px] font-black uppercase tracking-[0.2em] transition-all duration-200',
|
||||
isActive
|
||||
? 'bg-secondary text-foreground'
|
||||
: 'text-muted-foreground hover:bg-secondary/60 hover:text-foreground'
|
||||
? 'bg-brand-dark text-white shadow-xl'
|
||||
: 'text-brand-dark/40 dark:text-white/40 hover:bg-brand-muted dark:hover:bg-[#1f1f1f]'
|
||||
)}
|
||||
>
|
||||
<item.icon className="size-4 shrink-0" />
|
||||
<item.icon size={18} className="shrink-0" />
|
||||
{t(item.labelKey)}
|
||||
</Link>
|
||||
);
|
||||
@@ -59,54 +55,68 @@ export function DashboardSidebar() {
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{/* Bottom section: user + actions */}
|
||||
<div className="mt-auto border-t border-border">
|
||||
{/* User section */}
|
||||
{/* Upgrade link for free users */}
|
||||
{(!user?.tier || user.tier === 'free') && (
|
||||
<div className="px-6 py-2">
|
||||
<Link
|
||||
href="/pricing"
|
||||
className="text-[10px] font-black uppercase tracking-widest text-brand-accent hover:text-brand-dark dark:hover:text-white transition-colors"
|
||||
>
|
||||
{t('dashboard.sidebar.upgradeToPro', { defaultValue: 'Passer Pro →' })}
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Momento promo section */}
|
||||
<div className="px-6 py-4">
|
||||
<div className="bg-brand-muted/50 dark:bg-[#1f1f1f]/50 rounded-3xl p-6 border border-black/5 dark:border-white/5 group cursor-pointer hover:bg-brand-dark dark:hover:bg-brand-accent transition-all duration-500">
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="w-8 h-8 bg-brand-dark group-hover:bg-brand-accent rounded-lg flex items-center justify-center text-white text-xs font-black shadow-sm transition-all group-hover:rotate-12">M</div>
|
||||
<span className="text-[10px] font-black uppercase tracking-widest text-brand-dark group-hover:text-white dark:text-white transition-colors">{t('memento.title')}</span>
|
||||
</div>
|
||||
<p className="text-[9px] text-brand-dark/40 group-hover:text-white/60 font-medium leading-relaxed mb-6">
|
||||
{t('memento.slogan').substring(0, 80)}...
|
||||
</p>
|
||||
<button className="w-full py-2.5 bg-brand-dark group-hover:bg-white text-white group-hover:text-brand-dark dark:bg-[#272727] rounded-xl text-[8px] font-black uppercase tracking-widest shadow-sm transition-all">
|
||||
{t('memento.ctaFree')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* User section */}
|
||||
<div className="border-t border-black/5 dark:border-white/5">
|
||||
{!isLoading && user && (
|
||||
<>
|
||||
<div className="flex items-center gap-2.5 px-4 py-3">
|
||||
<Avatar className="size-8 shrink-0">
|
||||
<AvatarFallback className="bg-primary text-primary-foreground text-xs font-semibold">
|
||||
{getInitials(user.name)}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<div className="flex min-w-0 flex-1 flex-col gap-0.5">
|
||||
<span className="truncate text-sm font-medium leading-none text-foreground">{user.name}</span>
|
||||
<span className="truncate text-xs leading-none text-muted-foreground">{user.email}</span>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<Badge
|
||||
variant="secondary"
|
||||
className={cn(
|
||||
'text-xs',
|
||||
user.tier !== 'free' && user.tier && 'border border-primary/20 bg-primary/10 text-primary'
|
||||
)}
|
||||
>
|
||||
{translateTier(t, user.tier)}
|
||||
</Badge>
|
||||
{(!user.tier || user.tier === 'free') && (
|
||||
<Link href="/pricing" className="text-xs font-medium text-primary hover:underline">
|
||||
{t('dashboard.sidebar.upgradeToPro', { defaultValue: 'Passer Pro →' })}
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
<div className="px-6 py-4">
|
||||
<div className="flex items-center gap-3 mb-3">
|
||||
<div className="flex size-10 shrink-0 items-center justify-center rounded-xl bg-brand-dark dark:bg-brand-accent text-white dark:text-brand-dark font-bold text-[11px]">
|
||||
{getInitials(user.name)}
|
||||
</div>
|
||||
<div className="flex min-w-0 flex-1 flex-col gap-0.5">
|
||||
<span className="truncate text-[11px] font-black uppercase tracking-tight text-brand-dark dark:text-white">
|
||||
{user.name}
|
||||
</span>
|
||||
<span className="truncate text-[9px] text-brand-dark/40 dark:text-white/40">
|
||||
{user.email}
|
||||
</span>
|
||||
</div>
|
||||
<ThemeToggle />
|
||||
</div>
|
||||
<Separator />
|
||||
</>
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<span className="px-1.5 py-0 rounded-full border border-brand-accent/30 text-brand-accent text-[7px] font-black uppercase">
|
||||
{translateTier(t, user.tier)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Actions */}
|
||||
<div className="px-3 py-3">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="w-full justify-start gap-2 text-muted-foreground hover:text-foreground"
|
||||
<div className="flex items-center gap-2 px-6 py-3">
|
||||
<ThemeToggle />
|
||||
<button
|
||||
className="flex items-center gap-2 text-[10px] font-black uppercase tracking-widest text-brand-dark/40 dark:text-white/40 hover:text-red-500 transition-colors"
|
||||
onClick={logout}
|
||||
>
|
||||
<LogOut className="size-3.5" />
|
||||
<LogOut size={14} />
|
||||
{t('dashboard.sidebar.signOut')}
|
||||
</Button>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user