Neues Erscheinungsbild: ruhig und erwachsen statt verspielt
Angelehnt an die Gestaltung der Ledder Werkstätten: - Farbpaar aus dunkler Hauptfarbe und Akzent (Standard Indigo/Pflaume), alle weiteren Töne daraus abgeleitet; weißer Grund, Lavendel-Flächen - Montserrat (selbst gehostet) statt Atkinson/Bricolage - Startseite: randloses Titelbild mit Akzentkreis, umlaufendem Text und Hinweis-Fahne; Platzhalter in der Markenfarbe statt Illustration - Bereiche als ruhige Pillen statt bunter Kacheln, Termine als Farbblock - Gesperrte Kleinzeilen mit Punktlinie, Punkt-Trenner in der Navigation - Redaktion: Akzentfarbe und Kreistext in den Einstellungen, Farbauswahl bei Kacheln/Seiten entfällt - Demo-Titelbilder als ruhige Farbflächen Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6f706dfa49
commit
562fa56228
44 changed files with 563 additions and 517 deletions
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
<div class="grid grid-cols-2 lg:grid-cols-4 gap-3 mb-8">
|
||||
{#each stats as s (s.label)}
|
||||
<a href={s.href} class="card pressable p-4 tone-{s.tone}">
|
||||
<span class="grid place-items-center size-10 rounded-xl bg-tone-soft text-tone-ink mb-3"><s.icon class="size-5" /></span>
|
||||
<a href={s.href} class="card pressable p-4">
|
||||
<span class="grid place-items-center size-10 rounded-full bg-surface-2 text-brand-ink mb-3"><s.icon class="size-5" /></span>
|
||||
<p class="font-display text-3xl font-extrabold">{s.value}</p>
|
||||
<p class="text-sm text-ink-3">{s.label}</p>
|
||||
</a>
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
</div>
|
||||
|
||||
{#if data.messages.length}
|
||||
<a href="/admin/postfach" class="card pressable flex items-center gap-4 p-4 mb-8 tone-coral">
|
||||
<span class="grid place-items-center size-11 rounded-xl bg-tone text-white"><Inbox class="size-5" /></span>
|
||||
<a href="/admin/postfach" class="card pressable flex items-center gap-4 p-4 mb-8">
|
||||
<span class="grid place-items-center size-11 rounded-full bg-accent text-white"><Inbox class="size-5" /></span>
|
||||
<span class="flex-1 min-w-0">
|
||||
<span class="block font-bold">{data.unread} neue {data.unread === 1 ? 'Nachricht' : 'Nachrichten'}</span>
|
||||
<span class="block text-sm text-ink-3 truncate">Von {data.messages.map((m) => m.name).join(', ')}</span>
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ export const actions = {
|
|||
const f = fields(await request.formData());
|
||||
const appName = f.str('appName', 40);
|
||||
const brandColor = f.str('brandColor', 7);
|
||||
const accentColor = f.str('accentColor', 7);
|
||||
if (!appName) return fail(400, { error: 'Die App braucht einen Namen.' });
|
||||
if (!/^#[0-9a-f]{6}$/i.test(brandColor)) return fail(400, { error: 'Die Farbe ist ungültig.' });
|
||||
if (![brandColor, accentColor].every((c) => /^#[0-9a-f]{6}$/i.test(c))) return fail(400, { error: 'Eine der Farben ist ungültig.' });
|
||||
const website = f.str('website', 300);
|
||||
if (website && !/^https?:\/\//.test(website)) return fail(400, { error: 'Die Website muss mit https:// beginnen.' });
|
||||
|
||||
|
|
@ -27,9 +28,11 @@ export const actions = {
|
|||
greeting: f.str('greeting', 120),
|
||||
intro: f.str('intro', 400),
|
||||
brandColor,
|
||||
accentColor,
|
||||
logoId: f.int('logoId'),
|
||||
heroEnabled: f.bool('heroEnabled'),
|
||||
heroImageId: f.int('heroImageId'),
|
||||
heroTagline: f.str('heroTagline', 40),
|
||||
website,
|
||||
contactEmail: f.str('contactEmail', 200),
|
||||
contactIntro: f.str('contactIntro', 400),
|
||||
|
|
|
|||
|
|
@ -9,11 +9,21 @@
|
|||
let { data } = $props();
|
||||
const s = $derived(data.settings);
|
||||
let color = $state('');
|
||||
let accent = $state('');
|
||||
$effect.pre(() => {
|
||||
color = s.brandColor;
|
||||
accent = s.accentColor;
|
||||
});
|
||||
|
||||
const presets = ['#0e7c66', '#1f6fb2', '#4b4fc4', '#8a3fbf', '#c2410c', '#b91c5c', '#0f766e', '#3f6212', '#334155'];
|
||||
// Paare aus Hauptfarbe (Schrift, Buttons) und Akzent (Kreis, Hervorhebungen)
|
||||
const presets = [
|
||||
['#2e2672', '#85357c'],
|
||||
['#0f4c5c', '#e36414'],
|
||||
['#1d3557', '#e63946'],
|
||||
['#264027', '#b5853f'],
|
||||
['#3a2e39', '#1e8a78'],
|
||||
['#12355b', '#d4a017']
|
||||
];
|
||||
</script>
|
||||
|
||||
<PageHeader title="Einstellungen" description="Name, Aussehen und rechtliche Texte der App." />
|
||||
|
|
@ -39,12 +49,17 @@
|
|||
|
||||
<Panel title="Startseite">
|
||||
<Switch name="heroEnabled" checked={s.heroEnabled} label="Bild oben anzeigen" hint="Großes Bild über der Begrüßung" />
|
||||
<div class="max-w-xl">
|
||||
<div class="max-w-xl space-y-4">
|
||||
<ImageField name="heroImageId" value={data.hero} label="Startbild" aspect="aspect-[16/7]" />
|
||||
<p class="hint">
|
||||
Am besten ein Foto im Querformat, mindestens 1600 px breit. Solange keins gewählt ist, erscheint eine
|
||||
Platzhalter-Illustration.
|
||||
Platzhalter in der Markenfarbe.
|
||||
</p>
|
||||
<div>
|
||||
<label class="label" for="heroTagline">Text im Kreis</label>
|
||||
<input id="heroTagline" name="heroTagline" class="field" maxlength="40" value={s.heroTagline} placeholder="z. B. Arbeit, Bildung, Teilhabe" />
|
||||
<p class="hint">Läuft oben am Farbkreis entlang, höchstens 40 Zeichen. Leer lassen, wenn kein Text erscheinen soll.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label" for="greeting">Begrüßung</label>
|
||||
|
|
@ -86,23 +101,43 @@
|
|||
{#snippet aside()}
|
||||
<Panel title="Aussehen">
|
||||
<div>
|
||||
<span class="label">Markenfarbe</span>
|
||||
<div class="flex flex-wrap gap-2 mb-3">
|
||||
{#each presets as p (p)}
|
||||
<span class="label">Farbpaar</span>
|
||||
<div class="flex flex-wrap gap-2 mb-4">
|
||||
{#each presets as [p, a] (p)}
|
||||
<button
|
||||
type="button"
|
||||
class="size-8 rounded-full ring-offset-2 ring-offset-surface transition {color.toLowerCase() === p ? 'ring-3' : 'hover:scale-110'}"
|
||||
style="background:{p}; --tw-ring-color:{p}"
|
||||
aria-label="Farbe {p}"
|
||||
onclick={() => (color = p)}
|
||||
></button>
|
||||
class="flex rounded-full overflow-hidden ring-offset-2 ring-offset-surface transition {color.toLowerCase() === p && accent.toLowerCase() === a ? 'ring-3 ring-ink' : 'hover:scale-105'}"
|
||||
aria-label="Farbpaar {p} und {a}"
|
||||
onclick={() => {
|
||||
color = p;
|
||||
accent = a;
|
||||
}}
|
||||
>
|
||||
<span class="size-8" style="background:{p}"></span><span class="size-8" style="background:{a}"></span>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="color" bind:value={color} class="size-11 rounded-xl border border-line cursor-pointer bg-transparent" aria-label="Eigene Farbe" />
|
||||
<input name="brandColor" bind:value={color} class="field font-mono" maxlength="7" />
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<div>
|
||||
<label class="label" for="brandColor">Hauptfarbe</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="color" bind:value={color} class="size-10 shrink-0 rounded-lg border border-line cursor-pointer bg-transparent" aria-label="Hauptfarbe wählen" />
|
||||
<input id="brandColor" name="brandColor" bind:value={color} class="field font-mono text-sm px-2" maxlength="7" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label" for="accentColor">Akzent</label>
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="color" bind:value={accent} class="size-10 shrink-0 rounded-lg border border-line cursor-pointer bg-transparent" aria-label="Akzentfarbe wählen" />
|
||||
<input id="accentColor" name="accentColor" bind:value={accent} class="field font-mono text-sm px-2" maxlength="7" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="hint">Die Hauptfarbe sollte dunkel sein, weil Schrift und Buttons sie verwenden.</p>
|
||||
<div class="mt-3 relative overflow-hidden rounded-2xl p-4 h-24 text-white font-bold" style="background:{color}">
|
||||
<span class="relative z-10">Vorschau</span>
|
||||
<span class="absolute -right-6 -bottom-10 size-28 rounded-full" style="background:{accent}"></span>
|
||||
</div>
|
||||
<div class="mt-3 rounded-2xl p-4 text-white font-display font-bold" style="background:{color}">Vorschau</div>
|
||||
</div>
|
||||
<ImageField name="logoId" value={data.logo} label="Logo" aspect="aspect-[3/1]" />
|
||||
<p class="hint -mt-3">Am besten ein PNG mit transparentem Hintergrund. Wird auch als App-Symbol verwendet.</p>
|
||||
|
|
|
|||
|
|
@ -8,33 +8,27 @@
|
|||
let { data } = $props();
|
||||
</script>
|
||||
|
||||
<PageHeader title="Startseite" description="Die bunten Kacheln auf der Startseite der App – jede führt zu einer Seite, einem Bereich oder einer Website.">
|
||||
<PageHeader title="Startseite" description="Die Bereiche auf der Startseite der App – jede führt zu einer Seite, einem Bereich oder einer Website.">
|
||||
{#snippet actions()}
|
||||
<a href="/admin/kacheln/neu" class="btn btn-primary"><Plus class="size-4" />Neue Kachel</a>
|
||||
{/snippet}
|
||||
</PageHeader>
|
||||
|
||||
{#if data.tiles.length}
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3">
|
||||
<ul class="grid sm:grid-cols-2 xl:grid-cols-3 gap-3">
|
||||
{#each data.tiles as t, i (t.id)}
|
||||
<div class="tone-{t.color} relative rounded-[1.4rem] bg-tone-soft p-4 min-h-32 flex flex-col justify-between">
|
||||
<div class="flex items-start justify-between">
|
||||
<span class="grid place-items-center size-12 rounded-2xl bg-tone text-white"><Icon name={t.icon} class="size-6" /></span>
|
||||
<div class="flex items-center gap-1 bg-surface/80 rounded-xl p-0.5">
|
||||
<MoveButtons id={t.id} first={i === 0} last={i === data.tiles.length - 1} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-end justify-between gap-2 mt-4">
|
||||
<span class="min-w-0">
|
||||
<span class="block font-display font-bold text-tone-ink leading-tight">{t.label}</span>
|
||||
<span class="block text-xs text-ink-3 truncate mt-0.5">{t.href}</span>
|
||||
</span>
|
||||
<a href="/admin/kacheln/{t.id}" class="btn btn-sm btn-icon bg-surface/80 hover:bg-surface shrink-0" aria-label="{t.label} bearbeiten"><Pencil class="size-4" /></a>
|
||||
</div>
|
||||
</div>
|
||||
<li class="flex items-center gap-3 rounded-full bg-surface-2 pl-2 pr-2 py-2">
|
||||
<span class="grid place-items-center size-12 rounded-full bg-surface text-brand-ink shrink-0"><Icon name={t.icon} class="size-[1.35rem]" /></span>
|
||||
<span class="flex-1 min-w-0">
|
||||
<span class="block font-bold text-brand-ink leading-tight truncate">{t.label}</span>
|
||||
<span class="block text-xs text-ink-3 truncate">{t.href}</span>
|
||||
</span>
|
||||
<MoveButtons id={t.id} first={i === 0} last={i === data.tiles.length - 1} />
|
||||
<a href="/admin/kacheln/{t.id}" class="btn btn-sm btn-icon bg-surface hover:bg-brand-soft shrink-0" aria-label="{t.label} bearbeiten"><Pencil class="size-4" /></a>
|
||||
</li>
|
||||
{/each}
|
||||
</div>
|
||||
<p class="hint mt-4">Die Pfeile ändern die Reihenfolge (oben = weiter vorne).</p>
|
||||
</ul>
|
||||
<p class="hint mt-4">Die Pfeile ändern die Reihenfolge auf der Startseite.</p>
|
||||
{:else}
|
||||
<div class="card p-8 text-center text-ink-3">Noch keine Kacheln. Die Startseite zeigt dann nur Neuigkeiten und Termine.</div>
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
{/if}
|
||||
<input type="hidden" name="href" value={target === 'custom' ? custom : target} />
|
||||
</Panel>
|
||||
<Panel title="Aussehen">
|
||||
<Panel title="Symbol">
|
||||
<IconTonePicker bind:icon bind:color {label} />
|
||||
</Panel>
|
||||
</EditForm>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
<li class="flex items-center gap-3 pr-3 py-1.5 hover:bg-surface-2/60" style="padding-left: {0.75 + p.depth * 1.75}rem">
|
||||
<MoveButtons id={p.id} first={p.first} last={p.last} />
|
||||
{#if p.depth > 0}<CornerDownRight class="size-4 text-ink-3 -ml-1" />{/if}
|
||||
<span class="tone-{p.color} grid place-items-center size-9 rounded-xl bg-tone-soft text-tone-ink shrink-0"><Icon name={p.icon} class="size-[1.1rem]" /></span>
|
||||
<span class="grid place-items-center size-9 rounded-full bg-surface-2 text-brand-ink shrink-0"><Icon name={p.icon} class="size-[1.1rem]" /></span>
|
||||
<a href="/admin/seiten/{p.id}" class="flex-1 min-w-0 py-2">
|
||||
<span class="font-semibold truncate block">{p.title}</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</Panel>
|
||||
<Panel title="Aussehen">
|
||||
<Panel title="Symbol">
|
||||
<IconTonePicker bind:icon bind:color label={title} />
|
||||
</Panel>
|
||||
<Panel>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue