style(web): Anmeldeseite geteilt mit dunklem Markenpanel und Farbmosaik
Ab lg links 45 % dunkles Panel (Ton der App-Leiste) mit Bildmarke, Claim und stillem Mosaik aus den Modulfarben; rechts die Anmeldekarte auf der Arbeitsflaeche. Darunter nur die Karte. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,14 +5,13 @@ import { useTranslations } from 'next-intl';
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { login } from '@/lib/auth-actions';
|
import { login } from '@/lib/auth-actions';
|
||||||
import { sanitizeNextPath } from '@/lib/safe-next';
|
import { sanitizeNextPath } from '@/lib/safe-next';
|
||||||
import { BRAND_YELLOW } from '@/components/brand/brand';
|
|
||||||
import { TesseraLogo } from '@/components/brand/tessera-logo';
|
import { TesseraLogo } from '@/components/brand/tessera-logo';
|
||||||
import { DesktopDownloadLinks } from '@/components/desktop/desktop-download-links';
|
import { DesktopDownloadLinks } from '@/components/desktop/desktop-download-links';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Split-screen login page (D-01).
|
* Split-screen login page (D-01), Design „Mosaik“.
|
||||||
* Left: Tessera branding on the brand yellow background (BRAND_YELLOW).
|
* Left (ab lg): dunkles Markenpanel mit Bildmarke, Claim und Farbmosaik.
|
||||||
* Right: Login form on neutral background.
|
* Right: Anmeldekarte auf der Arbeitsflaeche; unter lg nur die Karte.
|
||||||
* No sidebar or header (D-04, handled by (auth) layout).
|
* No sidebar or header (D-04, handled by (auth) layout).
|
||||||
*/
|
*/
|
||||||
export default function LoginPage() {
|
export default function LoginPage() {
|
||||||
@@ -42,41 +41,52 @@ export default function LoginPage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex min-h-screen">
|
<div className="flex min-h-screen bg-background">
|
||||||
{/* Left: Branding panel (hidden on mobile, visible on md+) */}
|
{/* Links (ab lg): dunkles Markenpanel im Ton der App-Leiste mit
|
||||||
<div
|
grosser Bildmarke, Produktname, einem ruhigen Satz und einem
|
||||||
className="hidden md:flex md:flex-1 items-center justify-center"
|
stillen Mosaik aus den Modulfarben — kein Verlauf, keine Animation. */}
|
||||||
style={{ backgroundColor: BRAND_YELLOW }}
|
<div className="relative hidden w-[45%] shrink-0 flex-col overflow-hidden bg-appbar px-14 py-12 text-appbar-foreground lg:flex">
|
||||||
>
|
<TesseraLogo
|
||||||
<div className="px-8 text-gray-900">
|
variant="horizontal"
|
||||||
<TesseraLogo
|
size={40}
|
||||||
variant="horizontal"
|
plateOutline="always"
|
||||||
size={104}
|
className="gap-3"
|
||||||
plateOutline={false}
|
wordmarkClassName="text-xl font-semibold tracking-normal text-appbar-foreground"
|
||||||
tagline={t('branding.tagline')}
|
/>
|
||||||
className="gap-6"
|
|
||||||
wordmarkClassName="text-5xl"
|
<div className="my-auto max-w-[30rem]">
|
||||||
taglineClassName="text-lg text-gray-800 max-w-xs"
|
<LoginMosaic />
|
||||||
/>
|
<p className="mt-12 text-[32px] font-semibold leading-10 tracking-tight">
|
||||||
|
{t('branding.claim')}
|
||||||
|
</p>
|
||||||
|
<p className="mt-3 text-base leading-6 text-appbar-muted">
|
||||||
|
{t('branding.tagline')}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Right: Login form */}
|
{/* Rechts: Anmeldekarte zentriert auf der Arbeitsflaeche */}
|
||||||
<div className="flex flex-1 items-center justify-center bg-background px-4 py-8">
|
<div className="flex flex-1 items-center justify-center px-4 py-10">
|
||||||
<div className="w-full max-w-sm space-y-8">
|
<div className="w-full max-w-[400px]">
|
||||||
{/* Mobile-only branding */}
|
{/* Unter lg: Bildmarke ueber der Karte */}
|
||||||
<div className="text-center md:hidden">
|
<div className="mb-6 flex justify-center lg:hidden">
|
||||||
<TesseraLogo variant="horizontal" size={32} />
|
<TesseraLogo
|
||||||
<p className="mt-2 text-sm text-muted-foreground">
|
variant="horizontal"
|
||||||
{t('branding.tagline')}
|
size={32}
|
||||||
</p>
|
className="gap-2.5"
|
||||||
|
wordmarkClassName="text-lg font-semibold tracking-normal"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="surface space-y-6 p-6 sm:p-8">
|
||||||
{/* Login heading */}
|
{/* Login heading */}
|
||||||
<div className="text-center">
|
<div>
|
||||||
<h2 className="text-2xl font-bold text-foreground">
|
<h1 className="text-2xl font-semibold text-foreground">
|
||||||
{t('login')}
|
{t('login')}
|
||||||
</h2>
|
</h1>
|
||||||
|
<p className="mt-1 text-sm text-muted-foreground">
|
||||||
|
{t('loginSubtitle')}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Error message */}
|
{/* Error message */}
|
||||||
@@ -87,12 +97,12 @@ export default function LoginPage() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Login form */}
|
{/* Login form */}
|
||||||
<form onSubmit={handleSubmit} className="space-y-5">
|
<form onSubmit={handleSubmit} className="space-y-4">
|
||||||
{/* Username */}
|
{/* Username */}
|
||||||
<div className="space-y-2">
|
<div className="space-y-1.5">
|
||||||
<label
|
<label
|
||||||
htmlFor="username"
|
htmlFor="username"
|
||||||
className="text-sm font-medium text-foreground"
|
className="block text-sm font-semibold text-foreground"
|
||||||
>
|
>
|
||||||
{t('username')}
|
{t('username')}
|
||||||
</label>
|
</label>
|
||||||
@@ -102,16 +112,15 @@ export default function LoginPage() {
|
|||||||
type="text"
|
type="text"
|
||||||
required
|
required
|
||||||
autoComplete="username"
|
autoComplete="username"
|
||||||
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
className="flex h-8 w-full rounded-md border border-input bg-card px-2.5 text-sm placeholder:text-muted-foreground"
|
||||||
placeholder={t('username')}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Password */}
|
{/* Password */}
|
||||||
<div className="space-y-2">
|
<div className="space-y-1.5">
|
||||||
<label
|
<label
|
||||||
htmlFor="password"
|
htmlFor="password"
|
||||||
className="text-sm font-medium text-foreground"
|
className="block text-sm font-semibold text-foreground"
|
||||||
>
|
>
|
||||||
{t('password')}
|
{t('password')}
|
||||||
</label>
|
</label>
|
||||||
@@ -121,33 +130,30 @@ export default function LoginPage() {
|
|||||||
type="password"
|
type="password"
|
||||||
required
|
required
|
||||||
autoComplete="current-password"
|
autoComplete="current-password"
|
||||||
className="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
className="flex h-8 w-full rounded-md border border-input bg-card px-2.5 text-sm placeholder:text-muted-foreground"
|
||||||
placeholder={t('password')}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Remember me (D-02) */}
|
{/* Angemeldet bleiben (D-02) und Passwort vergessen (D-03) in einer Zeile */}
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center justify-between gap-3">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
<input
|
<input
|
||||||
id="rememberMe"
|
id="rememberMe"
|
||||||
name="rememberMe"
|
name="rememberMe"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
defaultChecked
|
defaultChecked
|
||||||
className="h-4 w-4 rounded border-input text-primary focus:ring-ring"
|
className="h-4 w-4 rounded border-input"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
htmlFor="rememberMe"
|
htmlFor="rememberMe"
|
||||||
className="text-sm text-muted-foreground"
|
className="whitespace-nowrap text-sm text-muted-foreground"
|
||||||
>
|
>
|
||||||
{t('rememberMe')}
|
{t('rememberMe')}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Forgot password link (D-03) */}
|
|
||||||
<div className="flex justify-end">
|
|
||||||
<Link
|
<Link
|
||||||
href="/reset-password"
|
href="/reset-password"
|
||||||
className="text-sm text-muted-foreground hover:text-foreground transition-colors"
|
className="whitespace-nowrap text-sm link"
|
||||||
>
|
>
|
||||||
{t('forgotPassword')}
|
{t('forgotPassword')}
|
||||||
</Link>
|
</Link>
|
||||||
@@ -157,7 +163,7 @@ export default function LoginPage() {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={isPending}
|
disabled={isPending}
|
||||||
className="flex w-full items-center justify-center rounded-md bg-primary px-4 py-2.5 text-sm font-medium text-primary-foreground hover:opacity-90 transition-opacity disabled:opacity-50"
|
className="btn btn-primary w-full"
|
||||||
>
|
>
|
||||||
{isPending ? (
|
{isPending ? (
|
||||||
<svg
|
<svg
|
||||||
@@ -186,11 +192,48 @@ export default function LoginPage() {
|
|||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Desktop-App-Link (D-12), blendet sich aus ohne API-Antwort */}
|
{/* Desktop-App-Link (D-12), blendet sich aus ohne API-Antwort */}
|
||||||
<DesktopDownloadLinks />
|
<div className="mt-6">
|
||||||
|
<DesktopDownloadLinks />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stilles Mosaik aus den Modulfarben (Design „Mosaik“): acht Kacheln in einem
|
||||||
|
* lockeren 4 x 3-Raster, eine davon in der Akzentfarbe und — wie die
|
||||||
|
* Signalkachel der Bildmarke — leicht gedreht. Rein dekorativ.
|
||||||
|
*/
|
||||||
|
function LoginMosaic() {
|
||||||
|
const tiles: { col: number; row: number; color: string; rotate?: boolean }[] = [
|
||||||
|
{ col: 1, row: 1, color: 'oklch(0.56 0.09 195)' },
|
||||||
|
{ col: 2, row: 1, color: 'oklch(0.55 0.14 292)' },
|
||||||
|
{ col: 4, row: 1, color: 'oklch(0.58 0.14 250)' },
|
||||||
|
{ col: 2, row: 2, color: 'oklch(0.62 0.135 68)' },
|
||||||
|
{ col: 3, row: 2, color: 'var(--primary)', rotate: true },
|
||||||
|
{ col: 4, row: 2, color: 'oklch(0.58 0.16 35)' },
|
||||||
|
{ col: 1, row: 3, color: 'oklch(0.58 0.12 150)' },
|
||||||
|
{ col: 3, row: 3, color: 'oklch(1 0 0 / 0.1)' },
|
||||||
|
];
|
||||||
|
return (
|
||||||
|
<div aria-hidden="true" className="grid w-max grid-cols-4 grid-rows-3 gap-3">
|
||||||
|
{tiles.map((tile) => (
|
||||||
|
<span
|
||||||
|
key={`${tile.col}-${tile.row}`}
|
||||||
|
className="h-14 w-14 rounded-xl"
|
||||||
|
style={{
|
||||||
|
gridColumn: tile.col,
|
||||||
|
gridRow: tile.row,
|
||||||
|
backgroundColor: tile.color,
|
||||||
|
transform: tile.rotate ? 'rotate(12deg)' : undefined,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user