feat: complete editorial redesign of Wordly.art SaaS
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:
2026-05-16 12:03:49 +02:00
parent 18e1aca148
commit b2b6f03399
10 changed files with 2583 additions and 4180 deletions

View File

@@ -3,17 +3,12 @@
import { useState } from 'react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import {
Languages,
Menu,
X,
import {
Menu,
X,
LogOut
} from 'lucide-react';
import { cn } from '@/lib/utils';
import { Avatar, AvatarFallback } from '@/components/ui/avatar';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { Separator } from '@/components/ui/separator';
import { useUser } from './useUser';
import { useLogout } from './useLogout';
import { getNavItems } from './constants';
@@ -32,62 +27,78 @@ export function DashboardHeader() {
return (
<>
<header className="flex h-14 shrink-0 items-center justify-between border-b border-border bg-card px-4 lg:px-6">
<header className="flex h-20 shrink-0 items-center justify-between border-b border-black/5 dark:border-white/5 bg-white/50 dark:bg-[#141414]/50 backdrop-blur-md px-6 lg:px-8">
{/* Mobile menu button */}
<Button
variant="ghost"
size="icon"
className="lg:hidden"
<button
className="lg:hidden p-2 text-brand-dark/40 dark:text-white/40 hover:text-brand-dark dark:hover:text-white transition-colors"
onClick={() => setMobileOpen(!mobileOpen)}
aria-label={t('dashboard.header.toggleMenu')}
>
{mobileOpen ? <X className="size-4" /> : <Menu className="size-4" />}
</Button>
{mobileOpen ? <X size={20} /> : <Menu size={20} />}
</button>
{/* Mobile brand */}
<div className="flex items-center gap-2 lg:hidden">
<div className="flex size-6 items-center justify-center rounded-md bg-foreground">
<Languages className="size-3 text-background" />
<div className="flex size-7 items-center justify-center rounded-xl bg-brand-dark text-white font-bold text-xs">
W
</div>
<span className="text-sm font-semibold text-foreground">{t('auth.brandName')}</span>
<span className="text-sm font-bold text-brand-dark dark:text-white">{t('auth.brandName')}</span>
</div>
{/* Page title - desktop */}
<div className="hidden items-center gap-3 lg:flex">
<h1 className="text-sm font-semibold text-foreground">{t('dashboard.header.title')}</h1>
{/* Left side - desktop */}
<div className="hidden lg:flex items-center gap-3">
<span className="text-[10px] font-bold uppercase tracking-[0.4em] text-brand-dark/30 dark:text-white/30">
{t('dashboard.topbar.interfaceLabel')}
</span>
</div>
{/* Right side */}
<div className="flex items-center gap-2">
<ThemeToggle />
<div className="flex items-center gap-3">
{/* Theme toggle */}
<div className="hidden lg:block p-3 bg-brand-muted dark:bg-[#1f1f1f] rounded-xl">
<ThemeToggle />
</div>
<div className="hidden lg:block h-6 w-px bg-black/5 dark:bg-white/5" />
{/* User info */}
{!isLoading && user && (
<>
<Badge
variant="secondary"
className={cn(
'border border-accent/20',
user.tier === 'free' || !user.tier
? 'bg-muted text-muted-foreground'
: 'bg-accent/10 text-accent'
)}
>
{translateTier(t, user.tier)}
</Badge>
<div className="hidden lg:flex items-center gap-3">
<div className="flex flex-col items-end gap-0.5">
<span className="text-[11px] font-black uppercase tracking-tight text-brand-dark dark:text-white">
{user.name}
</span>
<span className="text-[9px] font-black uppercase tracking-widest text-brand-accent">
{user.tier && user.tier !== 'free'
? t('dashboard.topbar.premiumAccess', { defaultValue: 'Premium Access' })
: translateTier(t, user.tier)}
</span>
</div>
<Link href="/dashboard/profile" title={t('dashboard.header.profileTitle')}>
<Avatar className="size-8 cursor-pointer ring-2 ring-transparent hover:ring-accent/40 transition-all">
<AvatarFallback className="bg-accent text-accent-foreground text-xs font-semibold">
{getInitials(user.name)}
</AvatarFallback>
</Avatar>
<div className="flex size-9 items-center justify-center rounded-xl bg-brand-dark dark:bg-brand-accent text-white dark:text-brand-dark font-bold text-[11px] cursor-pointer hover:shadow-lg transition-shadow">
{getInitials(user.name)}
</div>
</Link>
</>
</div>
)}
{/* Mobile theme + avatar */}
{!isLoading && user && (
<div className="flex lg:hidden items-center gap-2">
<ThemeToggle />
<Link href="/dashboard/profile" title={t('dashboard.header.profileTitle')}>
<div className="flex size-8 items-center justify-center rounded-xl bg-brand-dark dark:bg-brand-accent text-white dark:text-brand-dark font-bold text-[10px]">
{getInitials(user.name)}
</div>
</Link>
</div>
)}
</div>
</header>
{/* Mobile navigation drawer */}
{mobileOpen && (
<div className="border-b border-border bg-card px-4 py-3 lg:hidden">
<div className="border-b border-black/5 dark:border-white/5 bg-white dark:bg-[#141414] px-6 py-4 lg:hidden">
<nav className="flex flex-col gap-1">
{navItems.map((item) => {
const isActive = pathname === item.href;
@@ -97,48 +108,41 @@ export function DashboardHeader() {
href={item.href}
onClick={() => setMobileOpen(false)}
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>
);
})}
<Separator className="my-2" />
<div className="my-3 h-px bg-black/5 dark:bg-white/5" />
{!isLoading && user && (
<Link
href="/dashboard/profile"
onClick={() => setMobileOpen(false)}
className="flex items-center gap-3 px-3 py-2 rounded-lg hover:bg-secondary/60 transition-colors"
>
<Avatar className="size-8">
<AvatarFallback className="bg-accent text-accent-foreground text-xs font-semibold">
{getInitials(user.name)}
</AvatarFallback>
</Avatar>
<div className="flex flex-col gap-0.5">
<span className="text-sm font-medium text-foreground">{user.name}</span>
<Badge
variant="secondary"
className={cn(
'text-xs w-fit',
user.tier === 'pro' && 'border border-accent/20 bg-accent/10 text-accent'
)}
>
{translateTier(t, user.tier)}
</Badge>
<div className="flex items-center gap-3 px-4 py-3">
<div className="flex size-10 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>
</Link>
<div className="flex flex-col gap-0.5">
<span className="text-[11px] font-black uppercase tracking-tight text-brand-dark dark:text-white">
{user.name}
</span>
<span className="px-1.5 py-0 rounded-full border border-brand-accent/30 text-brand-accent text-[7px] font-black uppercase w-fit">
{translateTier(t, user.tier)}
</span>
</div>
</div>
)}
<button
onClick={logout}
className="flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-muted-foreground hover:bg-secondary/60 hover:text-foreground"
className="flex items-center gap-3 rounded-2xl px-6 py-4 text-[11px] font-black uppercase tracking-[0.2em] text-brand-dark/40 dark:text-white/40 hover:text-red-500 transition-colors"
>
<LogOut className="size-4 shrink-0" />
<LogOut size={18} className="shrink-0" />
{t('dashboard.sidebar.signOut')}
</button>
</nav>