Design: 'Calm Cloud' Farbwelt (Dunkelblau/Türkis, GitHub-Dark), untere Navigation auf Mobilgeräten
This commit is contained in:
parent
2d168ff9cc
commit
69fbad9090
2 changed files with 30 additions and 17 deletions
|
|
@ -44,8 +44,16 @@ export default function AppLayout({ children }: { children: ReactNode }) {
|
||||||
<button className="btn small" onClick={logout}>Abmelden</button>
|
<button className="btn small" onClick={logout}>Abmelden</button>
|
||||||
</nav>
|
</nav>
|
||||||
);
|
);
|
||||||
|
const bottomLink = (href: string, label: string) => <Link href={href} aria-current={path === href || path.startsWith(href + '/') ? 'page' : undefined}>{label}</Link>;
|
||||||
return (<div className="shell">
|
return (<div className="shell">
|
||||||
<div className="topbar"><strong>Kundencenter</strong><div className="row" style={{ gap: 8 }}><ThemeToggle compact /><button className="btn small" aria-expanded={open} onClick={() => setOpen(!open)}>Menü</button></div></div>
|
<div className="topbar"><strong>Kundencenter</strong><ThemeToggle compact /></div>
|
||||||
{nav}<main id="main" className="main">{children}</main>
|
{nav}<main id="main" className="main">{children}</main>
|
||||||
|
{!enrollNeeded && <nav className="bottomnav" aria-label="Hauptnavigation (mobil)">
|
||||||
|
{bottomLink('/dashboard', 'Übersicht')}
|
||||||
|
{(me.kind === 'customer' || can('resources.read')) && bottomLink('/ressourcen', 'Ressourcen')}
|
||||||
|
{(me.kind === 'customer' || can('tickets.read')) && bottomLink('/tickets', 'Tickets')}
|
||||||
|
{(me.kind === 'customer' || can('invoices.read')) && bottomLink('/rechnungen', 'Rechnungen')}
|
||||||
|
<button type="button" aria-expanded={open} onClick={() => setOpen(!open)}>Mehr</button>
|
||||||
|
</nav>}
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,23 @@
|
||||||
/* Designsystem v1: klare Flächen, dezente Tiefe (Schatten statt schwerer Rahmen), eine Akzentfarbe.
|
/* Designsystem v2 "Calm Cloud": warmgraue/GitHub-dunkle Flächen, Dunkelblau als vertrauenswürdige Hauptfarbe,
|
||||||
Hell/Dunkel automatisch über prefers-color-scheme, zusätzlich manuell über [data-theme] umschaltbar (siehe ThemeToggle). */
|
Türkis nur für aktive Navigation/technische Marker. Hell/Dunkel automatisch über prefers-color-scheme,
|
||||||
|
zusätzlich manuell über [data-theme] umschaltbar (siehe ThemeToggle). */
|
||||||
:root {
|
:root {
|
||||||
--bg: #f5f6f9; --surface: #ffffff; --surface-2: #eef0f5; --border: #e3e6ec; --text: #13161c; --muted: #656d7a;
|
--bg: #f6f8fa; --surface: #ffffff; --surface-2: #eef1f5; --border: #e1e5eb; --text: #172033; --muted: #5b6472;
|
||||||
--accent: #4356e8; --accent-contrast: #ffffff; --focus: #4356e8;
|
--accent: #315efb; --accent2: #14b8a6; --accent-contrast: #ffffff; --focus: #315efb;
|
||||||
--ok: #15803d; --ok-bg: #e7f6ec; --info: #1d5fa8; --info-bg: #e6f1fb; --warn: #92660a; --warn-bg: #fdf3dc; --err: #b3261e; --err-bg: #fbeaea; --lock: #4b5563; --lock-bg: #eceef2;
|
--ok: #22a06b; --ok-bg: #e4f5ec; --info: #2e6fe0; --info-bg: #e7f1fc; --warn: #e59a17; --warn-bg: #fdf1dc; --err: #dc4c64; --err-bg: #fbe7ea; --lock: #4b5563; --lock-bg: #eceef2;
|
||||||
--shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 1px rgba(16, 24, 40, .04);
|
--shadow-sm: 0 1px 2px rgba(23, 32, 51, .04), 0 1px 1px rgba(23, 32, 51, .04);
|
||||||
--shadow-md: 0 8px 20px rgba(16, 24, 40, .07), 0 2px 6px rgba(16, 24, 40, .05);
|
--shadow-md: 0 8px 20px rgba(23, 32, 51, .06), 0 2px 6px rgba(23, 32, 51, .04);
|
||||||
--radius: 14px; --radius-sm: 10px; --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px;
|
--radius: 12px; --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;
|
--font: var(--font-inter), system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
||||||
}
|
}
|
||||||
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) {
|
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) {
|
||||||
--bg: #0a0d12; --surface: #12161d; --surface-2: #1a1f28; --border: #262c37; --text: #e8ebf0; --muted: #96a0b0; --accent: #8ea2ff; --accent-contrast: #0a0d12; --focus: #8ea2ff;
|
--bg: #0d1117; --surface: #161b22; --surface-2: #1c2129; --border: #262c36; --text: #e6edf3; --muted: #8b98a5; --accent: #6e8dff; --accent2: #2dd4bf; --accent-contrast: #0d1117; --focus: #6e8dff;
|
||||||
--ok: #6fd39a; --ok-bg: #123321; --info: #8bbcf2; --info-bg: #132a44; --warn: #f0c063; --warn-bg: #3a2c0b; --err: #f2a3a3; --err-bg: #3d1a1a; --lock: #b7c0cc; --lock-bg: #242a33;
|
--ok: #34d399; --ok-bg: #10281d; --info: #8ab4f8; --info-bg: #16283d; --warn: #f5b84d; --warn-bg: #3a2b0c; --err: #f1798d; --err-bg: #3b1620; --lock: #b7c0cc; --lock-bg: #232932;
|
||||||
--shadow-sm: 0 1px 2px rgba(0, 0, 0, .45); --shadow-md: 0 10px 24px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
|
--shadow-sm: 0 1px 2px rgba(0, 0, 0, .45); --shadow-md: 0 10px 24px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
|
||||||
} }
|
} }
|
||||||
:root[data-theme='dark'] {
|
:root[data-theme='dark'] {
|
||||||
--bg: #0a0d12; --surface: #12161d; --surface-2: #1a1f28; --border: #262c37; --text: #e8ebf0; --muted: #96a0b0; --accent: #8ea2ff; --accent-contrast: #0a0d12; --focus: #8ea2ff;
|
--bg: #0d1117; --surface: #161b22; --surface-2: #1c2129; --border: #262c36; --text: #e6edf3; --muted: #8b98a5; --accent: #6e8dff; --accent2: #2dd4bf; --accent-contrast: #0d1117; --focus: #6e8dff;
|
||||||
--ok: #6fd39a; --ok-bg: #123321; --info: #8bbcf2; --info-bg: #132a44; --warn: #f0c063; --warn-bg: #3a2c0b; --err: #f2a3a3; --err-bg: #3d1a1a; --lock: #b7c0cc; --lock-bg: #242a33;
|
--ok: #34d399; --ok-bg: #10281d; --info: #8ab4f8; --info-bg: #16283d; --warn: #f5b84d; --warn-bg: #3a2b0c; --err: #f1798d; --err-bg: #3b1620; --lock: #b7c0cc; --lock-bg: #232932;
|
||||||
--shadow-sm: 0 1px 2px rgba(0, 0, 0, .45); --shadow-md: 0 10px 24px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
|
--shadow-sm: 0 1px 2px rgba(0, 0, 0, .45); --shadow-md: 0 10px 24px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .35);
|
||||||
}
|
}
|
||||||
* { box-sizing: border-box; }
|
* { box-sizing: border-box; }
|
||||||
|
|
@ -33,15 +34,19 @@ a { color: var(--accent); } p { margin: 0 0 var(--s3); } .muted { color: var(--m
|
||||||
.nav .brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; padding: 0 var(--s3) var(--s4); }
|
.nav .brand { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; padding: 0 var(--s3) var(--s4); }
|
||||||
.nav a { display: block; padding: 10px var(--s3); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
|
.nav a { display: block; padding: 10px var(--s3); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
|
||||||
.nav a:hover { background: var(--surface-2); }
|
.nav a:hover { background: var(--surface-2); }
|
||||||
.nav a[aria-current='page'] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
|
.nav a[aria-current='page'] { background: color-mix(in srgb, var(--accent2) 14%, transparent); color: var(--accent2); font-weight: 600; }
|
||||||
.nav .group { margin: var(--s3) var(--s3) var(--s1); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
|
.nav .group { margin: var(--s3) var(--s3) var(--s1); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
|
||||||
.nav .spacer { flex: 1; }
|
.nav .spacer { flex: 1; }
|
||||||
.main { padding: var(--s5) var(--s4); max-width: 1100px; width: 100%; }
|
.main { padding: var(--s5) var(--s4); max-width: 1100px; width: 100%; }
|
||||||
.topbar { display: none; }
|
.topbar { display: none; } .bottomnav { display: none; }
|
||||||
@media (max-width: 800px) {
|
@media (max-width: 800px) {
|
||||||
.shell { grid-template-columns: 1fr; } .nav { display: none; } .nav.open { display: flex; position: fixed; inset: 0 30% 0 0; z-index: 5; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); overflow: auto; }
|
.shell { grid-template-columns: 1fr; } .nav { display: none; } .nav.open { display: flex; position: fixed; inset: 0 30% 56px 0; 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); }
|
.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); }
|
.main { padding: var(--s4) var(--s3) calc(var(--s4) + 56px); }
|
||||||
|
.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 { font-size: 1.15rem; line-height: 1; }
|
||||||
|
.bottomnav a[aria-current='page'] { color: var(--accent2); 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); }
|
.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)); }
|
.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue