Oberfläche modernisiert, Herstellerhinweis FlessingLabs
- Navigation mit Icons, Akzentleiste am aktiven Eintrag, Chevron statt Zeichen, Benutzerblock mit Initialen, dezente Buttons in der Seitenleiste - Markenzeichen „KC“ (Seitenleiste, mobile Kopfzeile, Anmeldeseiten) - Fußzeile „KC@FlessingLabs · © FlessingLabs · flessinglabs.com“ in der App und auf allen Seiten außerhalb der Anmeldung - Behoben: Seite lief auf dem Handy bei breiten Tabellen seitlich über (Rasterspalte minmax(0, 1fr)); Kennungen in Tabellen und Badges brechen nicht mehr um; doppelter Abstand zwischen Übersichtskarten - Links dezenter unterstrichen, in Tabellen erst beim Überfahren Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e0f2141901
commit
f3e89554f4
5 changed files with 100 additions and 34 deletions
|
|
@ -7,6 +7,13 @@ import { useSession } from '@/lib/session';
|
|||
import { ROLE_LABEL } from '@/components/ui';
|
||||
import { ThemeToggle } from '@/components/ThemeToggle';
|
||||
import { Icon, type IconName } from '@/components/Icon';
|
||||
import { Brand, SiteFooter } from '@/components/Brand';
|
||||
|
||||
const ICONS: Record<string, IconName> = {
|
||||
'/dashboard': 'home', '/lizenzen': 'key', '/ressourcen': 'server', '/vertraege': 'fileText', '/bestellungen': 'cart', '/rechnungen': 'receipt', '/tickets': 'ticket', '/admin/posteingang': 'inbox',
|
||||
'/organisation': 'building', '/domains': 'globe', '/admin/kunden': 'users', '/admin/produkte': 'package', '/admin/domains': 'list', '/admin/benutzer': 'userCog', '/admin/auftraege': 'activity',
|
||||
'/admin/audit': 'shield', '/einstellungen': 'settings', '/konto': 'user',
|
||||
};
|
||||
|
||||
export default function AppLayout({ children }: { children: ReactNode }) {
|
||||
const { me, loading, can, reload } = useSession(); const r = useRouter(); const path = usePathname(); const [open, setOpen] = useState(false);
|
||||
|
|
@ -17,10 +24,10 @@ export default function AppLayout({ children }: { children: ReactNode }) {
|
|||
useEffect(() => { if (enrollNeeded && path !== '/konto') r.replace('/konto'); }, [enrollNeeded, path, r]);
|
||||
useEffect(() => setOpen(false), [path]);
|
||||
if (loading || !me || me.pendingMfa) return <div className="center"><p className="muted" role="status">Wird geladen …</p></div>;
|
||||
const link = (href: string, label: string) => <Link href={href} aria-current={path === href || path.startsWith(href + '/') ? 'page' : undefined}>{label}</Link>;
|
||||
const link = (href: string, label: string) => <Link href={href} aria-current={path === href || path.startsWith(href + '/') ? 'page' : undefined}>{ICONS[href] && <Icon name={ICONS[href]} />}{label}</Link>;
|
||||
const inGroup = (hrefs: string[]) => hrefs.some((h) => path === h || path.startsWith(h + '/'));
|
||||
const group = (title: string, hrefs: string[], items: ReactNode) => (
|
||||
<details className="group" open={inGroup(hrefs)}><summary>{title}</summary><div className="items">{items}</div></details>
|
||||
<details className="group" open={inGroup(hrefs)}><summary>{title}<Icon name="chevron" className="icon chev" /></summary><div className="items">{items}</div></details>
|
||||
);
|
||||
async function logout() { await api('POST', '/auth/logout'); await reload(); r.replace('/login'); }
|
||||
async function stopImpersonation() { const orgId = me!.impersonating!.orgId; await api('POST', '/auth/impersonate/stop'); await reload(); r.replace(`/admin/kunden/${orgId}`); }
|
||||
|
|
@ -28,7 +35,7 @@ export default function AppLayout({ children }: { children: ReactNode }) {
|
|||
const verwaltung = [can('customers.read') && ['/admin/kunden', 'Kunden'], can('products.read') && ['/admin/produkte', 'Produkte'], can('domains.read') && ['/admin/domains', 'Domain-Aufstellung'], can('users.read') && ['/admin/benutzer', 'Benutzer'], can('jobs.read') && ['/admin/auftraege', 'Aufträge'], can('audit.read') && ['/admin/audit', 'Audit-Protokoll'], (can('connectors.read') || can('backup.read')) && ['/einstellungen', 'Einstellungen']].filter(Boolean) as [string, string][];
|
||||
const nav = (
|
||||
<nav className={`nav ${open ? 'open' : ''}`} aria-label="Hauptnavigation">
|
||||
<div className="brand">Kundencenter</div>
|
||||
<Link href="/dashboard" className="brandlink" aria-label="Kundencenter – zur Übersicht"><Brand /></Link>
|
||||
{!enrollNeeded && link('/dashboard', 'Übersicht')}
|
||||
{!enrollNeeded && produkte.length > 0 && group('Produkte', produkte.map(([h]) => h), produkte.map(([h, l]) => <span key={h}>{link(h, l)}</span>))}
|
||||
{!enrollNeeded && (me.kind === 'customer' || can('invoices.read')) && group('Abrechnung', ['/rechnungen'], link('/rechnungen', 'Rechnungen'))}
|
||||
|
|
@ -38,12 +45,14 @@ export default function AppLayout({ children }: { children: ReactNode }) {
|
|||
{!enrollNeeded && me.kind === 'staff' && verwaltung.length > 0 && group('Verwaltung', verwaltung.map(([h]) => h), verwaltung.map(([h, l]) => <span key={h}>{link(h, l)}</span>))}
|
||||
<div className="spacer" />
|
||||
{link('/konto', 'Mein Konto')}
|
||||
<div className="small who">
|
||||
{me.kind === 'customer' && me.organizations[0] && <div className="org">{me.organizations[0].name}</div>}
|
||||
{me.user.name}<br />{me.staffRole ? ROLE_LABEL[me.staffRole] : 'Kunde'}
|
||||
<div className="who">
|
||||
<span className="avatar" aria-hidden="true">{me.user.name.split(/\s+/).map((w) => w[0]).slice(0, 2).join('').toUpperCase()}</span>
|
||||
<span className="small">
|
||||
{me.kind === 'customer' && me.organizations[0] && <span className="org">{me.organizations[0].name}</span>}
|
||||
<span className="name">{me.user.name}</span><span className="role">{me.staffRole ? ROLE_LABEL[me.staffRole] : 'Kunde'}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div className="row" style={{ padding: '0 8px' }}><ThemeToggle /></div>
|
||||
<button className="btn small" onClick={logout}>Abmelden</button>
|
||||
<div className="navactions"><ThemeToggle /><button className="btn small" onClick={logout}><Icon name="logout" /> Abmelden</button></div>
|
||||
</nav>
|
||||
);
|
||||
const bottomLink = (href: string, label: string, icon: IconName) => <Link href={href} aria-current={path === href || path.startsWith(href + '/') ? 'page' : undefined}><Icon name={icon} className="ic" />{label}</Link>;
|
||||
|
|
@ -55,8 +64,8 @@ export default function AppLayout({ children }: { children: ReactNode }) {
|
|||
</div>
|
||||
)}
|
||||
<div className="shell">
|
||||
<div className="topbar"><strong>Kundencenter</strong><ThemeToggle compact /></div>
|
||||
{nav}<main id="main" className="main">{trial && path !== '/einstellungen/lizenz' && <div className="alert warn" role="status" style={{ marginBottom: 16 }}>{trial} <Link href="/einstellungen/lizenz">Lizenz hinterlegen</Link></div>}{children}</main>
|
||||
<div className="topbar"><Brand sub={false} /><ThemeToggle compact /></div>
|
||||
{nav}<main id="main" className="main">{trial && path !== '/einstellungen/lizenz' && <div className="alert warn" role="status">{trial} <Link href="/einstellungen/lizenz">Lizenz hinterlegen</Link></div>}{children}<SiteFooter /></main>
|
||||
{!enrollNeeded && <nav className="bottomnav" aria-label="Hauptnavigation (mobil)">
|
||||
{bottomLink('/dashboard', 'Übersicht', 'home')}
|
||||
{(me.kind === 'customer' || can('resources.read')) && bottomLink('/ressourcen', 'Ressourcen', 'server')}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
--nav-bg: #173568; --nav-text: #dbe4f7; --nav-muted: #8fa4d4; --nav-border: #24417f; --nav-hover: #1f4084; --nav-active-bg: #2a4d93; --nav-active-text: #ffffff;
|
||||
--shadow-sm: 0 1px 2px rgba(23, 32, 51, .04), 0 1px 1px rgba(23, 32, 51, .04);
|
||||
--shadow-md: 0 8px 20px rgba(23, 32, 51, .06), 0 2px 6px rgba(23, 32, 51, .04);
|
||||
--radius: 12px; --radius-sm: 8px; --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px;
|
||||
--radius: 12px; --radius-lg: 14px; --radius-sm: 8px; --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px;
|
||||
--font: var(--font-inter), system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) {
|
||||
|
|
@ -27,41 +27,60 @@
|
|||
html { color-scheme: light dark; }
|
||||
body { margin: 0; font: 16px/1.55 var(--font); background: var(--bg); color: var(--text); }
|
||||
body, .btn, .badge, .card, input, select, textarea, a, .alert { transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
|
||||
h1 { font-size: 1.7rem; font-weight: 700; margin: 0 0 var(--s3); letter-spacing: -0.015em; } h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 var(--s3); } h3 { font-size: 1rem; font-weight: 600; margin: 0 0 var(--s2); }
|
||||
a { color: var(--accent); } p { margin: 0 0 var(--s3); } .muted { color: var(--muted); } .small { font-size: .9rem; }
|
||||
h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 var(--s3); letter-spacing: -0.025em; line-height: 1.2; } h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 var(--s3); } h3 { font-size: 1rem; font-weight: 600; margin: 0 0 var(--s2); }
|
||||
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); } a:hover { text-decoration-color: currentColor; } p { margin: 0 0 var(--s3); } .muted { color: var(--muted); } .small { font-size: .9rem; }
|
||||
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
|
||||
.skip { position: absolute; left: -999px; } .skip:focus { left: var(--s3); top: var(--s3); background: var(--surface); padding: var(--s2) var(--s3); z-index: 10; }
|
||||
|
||||
.shell { display: grid; grid-template-columns: 288px 1fr; min-height: 100vh; }
|
||||
.nav { background: var(--nav-bg); border-right: 1px solid var(--nav-border); padding: var(--s4) var(--s3) var(--s3); display: flex; flex-direction: column; gap: 2px; }
|
||||
.nav .brand { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; color: #fff; padding: 0 var(--s2) var(--s4); }
|
||||
.nav a { display: block; padding: 11px var(--s3); border-radius: var(--radius-sm); color: var(--nav-text); text-decoration: none; font-size: .96rem; }
|
||||
.shell { display: grid; grid-template-columns: 288px minmax(0, 1fr); min-height: 100vh; }
|
||||
.nav { background: var(--nav-bg); border-right: 1px solid var(--nav-border); padding: var(--s4) var(--s3) var(--s3); display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
|
||||
.brandlink { display: block; padding: 0 var(--s2) var(--s4); text-decoration: none; color: #fff; border-radius: var(--radius-sm); }
|
||||
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
|
||||
.brandmark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #4f7cf0, #0f9f8f); color: #fff; font-size: .82rem; font-weight: 800; letter-spacing: .02em; box-shadow: 0 2px 8px rgba(15, 40, 100, .35); flex: none; }
|
||||
.brandtext { display: flex; flex-direction: column; font-size: 1.08rem; line-height: 1.15; }
|
||||
.brandtext small { font-size: .7rem; font-weight: 500; letter-spacing: .02em; opacity: .7; }
|
||||
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px var(--s3); border-radius: var(--radius-sm); color: var(--nav-text); text-decoration: none; font-size: .95rem; position: relative; }
|
||||
.nav a .icon { width: 18px; height: 18px; opacity: .85; }
|
||||
.nav a:hover { background: var(--nav-hover); color: #fff; }
|
||||
.nav a[aria-current='page'] { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 600; }
|
||||
.nav a[aria-current='page'] .icon { opacity: 1; }
|
||||
.nav a[aria-current='page']::before { content: ''; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #7fb0ff; }
|
||||
.nav .group { margin: 0; }
|
||||
.nav .group > summary { list-style: none; cursor: pointer; margin: var(--s2) var(--s1) 2px; padding: 8px var(--s2); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--nav-muted); display: flex; align-items: center; justify-content: space-between; border-radius: var(--radius-sm); }
|
||||
.nav .group > summary { list-style: none; cursor: pointer; margin: var(--s3) var(--s1) 2px; padding: 6px var(--s2); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--nav-muted); display: flex; align-items: center; justify-content: space-between; border-radius: var(--radius-sm); }
|
||||
.nav .group > summary::-webkit-details-marker { display: none; }
|
||||
.nav .group > summary:hover { color: #fff; background: var(--nav-hover); }
|
||||
.nav .group > summary::after { content: '▸'; font-size: .7rem; transition: transform .15s ease; }
|
||||
.nav .group[open] > summary::after { transform: rotate(90deg); }
|
||||
.nav .group .items { display: flex; flex-direction: column; gap: 2px; padding-bottom: var(--s2); }
|
||||
.nav .spacer { flex: 1; }
|
||||
.nav .who { padding: var(--s2); color: var(--nav-text); }
|
||||
.nav .who .org { color: #fff; font-weight: 600; }
|
||||
.main { padding: var(--s5) var(--s4); max-width: 1240px; width: 100%; }
|
||||
.nav .group > summary:hover { color: #fff; }
|
||||
.nav .group > summary .chev { width: 14px; height: 14px; transition: transform .2s ease; }
|
||||
.nav .group[open] > summary .chev { transform: rotate(90deg); }
|
||||
.nav .group .items { display: flex; flex-direction: column; gap: 2px; padding-bottom: var(--s1); }
|
||||
.nav .spacer { flex: 1; min-height: var(--s4); }
|
||||
.nav .who { display: flex; align-items: center; gap: 10px; margin: var(--s2) 0; padding: var(--s3) var(--s2) var(--s2); border-top: 1px solid var(--nav-border); color: var(--nav-text); }
|
||||
.nav .who > .small { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
|
||||
.nav .who .name { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.nav .who .role { color: var(--nav-muted); }
|
||||
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--nav-active-bg); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }
|
||||
.navactions { display: flex; gap: var(--s2); padding: 0 var(--s1); }
|
||||
.nav .btn { background: transparent; border-color: var(--nav-border); color: var(--nav-text); box-shadow: none; flex: 1; }
|
||||
.nav .btn:hover { background: var(--nav-hover); color: #fff; transform: none; box-shadow: none; }
|
||||
.nav .who .org { color: var(--nav-muted); font-weight: 600; }
|
||||
.main { padding: var(--s5) var(--s5) var(--s4); max-width: 1280px; width: 100%; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
|
||||
.main > .site-footer { margin-top: auto; }
|
||||
.main > .alert.warn { margin-bottom: var(--s4); }
|
||||
.topbar { display: none; } .bottomnav { display: none; }
|
||||
@media (max-width: 800px) {
|
||||
.shell { grid-template-columns: 1fr; } .nav { display: none; } .nav.open { display: flex; position: fixed; inset: 0 20% 56px 0; z-index: 5; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); overflow: auto; }
|
||||
.shell { grid-template-columns: minmax(0, 1fr); } .nav { display: none; } .nav.open { display: flex; position: fixed; inset: 0 20% 56px 0; height: auto; z-index: 5; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); overflow: auto; }
|
||||
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s3); background: var(--surface); border-bottom: 1px solid var(--border); }
|
||||
.main { padding: var(--s4) var(--s3) calc(var(--s4) + 56px); }
|
||||
.main { padding: var(--s4) var(--s3) calc(var(--s4) + 56px); min-height: 0; }
|
||||
.topbar .brand { color: var(--text); } .topbar .brandmark { width: 30px; height: 30px; font-size: .75rem; }
|
||||
.bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--border); box-shadow: var(--shadow-md); padding-bottom: env(safe-area-inset-bottom, 0); }
|
||||
.bottomnav a, .bottomnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 10px; font-size: .72rem; color: var(--muted); text-decoration: none; background: none; border: none; font: inherit; min-height: 56px; }
|
||||
.bottomnav .ic { width: 22px; height: 22px; }
|
||||
.bottomnav a[aria-current='page'] { color: var(--accent); font-weight: 600; }
|
||||
}
|
||||
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4); margin-bottom: var(--s4); box-shadow: var(--shadow-sm); }
|
||||
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
|
||||
.stat { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; } .row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; }
|
||||
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s4); margin-bottom: var(--s4); box-shadow: var(--shadow-sm); }
|
||||
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: var(--s4); align-items: start; }
|
||||
.grid > .card { margin-bottom: 0; }
|
||||
.grid > .card:hover { box-shadow: var(--shadow-md); }
|
||||
.stat { font-size: 2.25rem; font-variant-numeric: tabular-nums; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; } .row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; }
|
||||
.btn { font: inherit; font-weight: 500; padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; min-height: 44px; box-shadow: var(--shadow-sm); }
|
||||
.btn:hover { background: var(--surface-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
|
||||
.btn:active { transform: translateY(0); }
|
||||
|
|
@ -73,10 +92,12 @@ input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid v
|
|||
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); outline: none; }
|
||||
.cols { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
|
||||
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 12px var(--s3); border-bottom: 1px solid var(--border); vertical-align: top; } th { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
|
||||
tbody tr:hover { background: var(--surface-2); }
|
||||
tbody tr:hover { background: var(--surface-2); } tbody tr:last-child td { border-bottom: none; }
|
||||
td.mono, td .mono, td code { white-space: nowrap; word-break: normal; }
|
||||
td a { text-decoration: none; font-weight: 500; } td a:hover { text-decoration: underline; }
|
||||
.tablewrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
|
||||
.tablewrap table { border: none; } .tablewrap th:first-child, .tablewrap td:first-child { padding-left: var(--s3); }
|
||||
.badge { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
|
||||
.badge { white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
|
||||
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.info { background: var(--info-bg); color: var(--info); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.err { background: var(--err-bg); color: var(--err); } .badge.lock { background: var(--lock-bg); color: var(--lock); }
|
||||
.alert { border-radius: var(--radius-sm); padding: var(--s3); margin-bottom: var(--s3); border: 1px solid transparent; } .alert.err { background: var(--err-bg); color: var(--err); } .alert.ok { background: var(--ok-bg); color: var(--ok); } .alert.warn { background: var(--warn-bg); color: var(--warn); } .alert.info { background: var(--info-bg); color: var(--info); }
|
||||
.empty { text-align: center; padding: var(--s5) var(--s3); color: var(--muted); }
|
||||
|
|
@ -87,6 +108,13 @@ tbody tr:hover { background: var(--surface-2); }
|
|||
.productcard h3 { margin: 0; font-size: 1.05rem; }
|
||||
.productcard .id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: var(--muted); }
|
||||
.center { min-height: 100vh; display: grid; place-items: center; padding: var(--s3); } .auth { width: 100%; max-width: 420px; }
|
||||
body:not(:has(.shell)) { display: flex; flex-direction: column; min-height: 100vh; background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), var(--bg); }
|
||||
body:not(:has(.shell)) > .center { flex: 1; min-height: 0; }
|
||||
body:not(:has(.shell)) .auth.card { box-shadow: var(--shadow-md); padding: var(--s5) var(--s4); }
|
||||
.site-header { display: flex; justify-content: center; padding: var(--s5) var(--s3) 0; color: var(--text); }
|
||||
body:has(.shell) > .site-header, body:has(.shell) > .site-footer { display: none; }
|
||||
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px var(--s2); padding: var(--s4) var(--s3); font-size: .85rem; color: var(--muted); }
|
||||
.main > .site-footer { justify-content: flex-start; padding: var(--s5) 0 0; margin-top: auto; border-top: 0; }
|
||||
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; word-break: break-all; } .codes { columns: 2; background: var(--surface-2); padding: var(--s3); border-radius: var(--radius-sm); }
|
||||
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
|
||||
.impersonate { position: sticky; top: 0; z-index: 100; width: 100%; background: var(--warn-bg); color: var(--warn); border-bottom: 2px solid var(--warn); padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; text-align: center; }
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import type { ReactNode } from 'react';
|
|||
import { Inter } from 'next/font/google';
|
||||
import './globals.css';
|
||||
import { SessionProvider } from '@/lib/session';
|
||||
import { Brand, SiteFooter } from '@/components/Brand';
|
||||
|
||||
const inter = Inter({ subsets: ['latin'], variable: '--font-inter', display: 'swap' });
|
||||
export const metadata: Metadata = { title: { default: 'Kundencenter', template: '%s · Kundencenter' }, robots: { index: false } };
|
||||
|
|
@ -10,5 +11,5 @@ export const metadata: Metadata = { title: { default: 'Kundencenter', template:
|
|||
const themeInit = "try{var t=localStorage.getItem('kc-theme');if(t==='light'||t==='dark')document.documentElement.setAttribute('data-theme',t);}catch(e){}";
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
return <html lang="de" className={inter.variable}><head><script dangerouslySetInnerHTML={{ __html: themeInit }} /></head>
|
||||
<body><a className="skip" href="#main">Zum Inhalt springen</a><SessionProvider>{children}</SessionProvider></body></html>;
|
||||
<body><a className="skip" href="#main">Zum Inhalt springen</a><header className="site-header"><Brand /></header><SessionProvider>{children}</SessionProvider><SiteFooter /></body></html>;
|
||||
}
|
||||
|
|
|
|||
12
apps/web/src/components/Brand.tsx
Normal file
12
apps/web/src/components/Brand.tsx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/** Markenzeichen und Herstellerhinweis (KC@FlessingLabs). */
|
||||
export const Brand = ({ sub = true }: { sub?: boolean }) => (
|
||||
<span className="brand"><span className="brandmark" aria-hidden="true">KC</span><span className="brandtext">Kundencenter{sub && <small>by FlessingLabs</small>}</span></span>
|
||||
);
|
||||
|
||||
export const SiteFooter = () => (
|
||||
<footer className="site-footer">
|
||||
<span>KC@FlessingLabs</span><span aria-hidden="true">·</span>
|
||||
<span>© {Math.max(2026, new Date().getFullYear())} FlessingLabs</span><span aria-hidden="true">·</span>
|
||||
<a href="https://flessinglabs.com" target="_blank" rel="noopener">flessinglabs.com</a>
|
||||
</footer>
|
||||
);
|
||||
|
|
@ -10,6 +10,22 @@ const PATHS = {
|
|||
monitor: <><rect x="2" y="3" width="20" height="14" rx="2" /><path d="M8 21h8M12 17v4" /></>,
|
||||
eye: <><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z" /><circle cx="12" cy="12" r="3" /></>,
|
||||
file: <><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><path d="M14 2v6h6" /></>,
|
||||
key: <><circle cx="7.5" cy="15.5" r="5.5" /><path d="m21 2-9.6 9.6M15.5 7.5l3 3L22 7l-3-3" /></>,
|
||||
fileText: <><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><path d="M14 2v6h6M16 13H8M16 17H8M10 9H8" /></>,
|
||||
cart: <><circle cx="8" cy="21" r="1" /><circle cx="19" cy="21" r="1" /><path d="M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12" /></>,
|
||||
inbox: <><path d="M22 12h-6l-2 3h-4l-2-3H2" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" /></>,
|
||||
building: <><rect x="4" y="2" width="16" height="20" rx="2" /><path d="M9 22v-4h6v4M8 6h.01M16 6h.01M12 6h.01M12 10h.01M12 14h.01M16 10h.01M16 14h.01M8 10h.01M8 14h.01" /></>,
|
||||
globe: <><circle cx="12" cy="12" r="10" /><path d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" /></>,
|
||||
users: <><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /><circle cx="9" cy="7" r="4" /><path d="M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75" /></>,
|
||||
package: <><path d="m7.5 4.27 9 5.15M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" /><path d="m3.3 7 8.7 5 8.7-5M12 22V12" /></>,
|
||||
list: <><path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" /></>,
|
||||
userCog: <><circle cx="10" cy="7" r="4" /><path d="M10.3 15H7a4 4 0 0 0-4 4v2" /><circle cx="18" cy="18" r="3" /><path d="M18 13.5V15M18 21v1.5M22.5 18H21M15 18h-1.5" /></>,
|
||||
activity: <><path d="M22 12h-4l-3 9L9 3l-3 9H2" /></>,
|
||||
shield: <><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /></>,
|
||||
settings: <><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /><circle cx="12" cy="12" r="3" /></>,
|
||||
user: <><circle cx="12" cy="8" r="5" /><path d="M20 21a8 8 0 0 0-16 0" /></>,
|
||||
logout: <><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9" /></>,
|
||||
chevron: <><path d="m9 18 6-6-6-6" /></>,
|
||||
} as const;
|
||||
export type IconName = keyof typeof PATHS;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue