Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98d6e7df46 |
No files matched your search
@@ -7,7 +7,7 @@
|
||||
> **Plattform:** Olares One (Kubernetes), Repo und CI auf Gitea — kein Supabase,
|
||||
> kein Vercel (E-0001). Eigene Gestaltung, nicht AImighty (E-0002).
|
||||
> Verteilung über den Markt, Repo öffentlich (E-0005).
|
||||
> **Status:** 26.11.3 — Arbeitspakete 1 und 2 fertig: Anmeldung mit Passkeys,
|
||||
> **Status:** 26.11.4 (Gestaltung E-0009) — Arbeitspakete 1 und 2 fertig: Anmeldung mit Passkeys,
|
||||
> Datenmodell (24 Tabellen, E-0007/E-0008), Test mit zwei Haushalten, Sicherung nach
|
||||
> `/app/data`. Als Nächstes Arbeitspaket 3, Seed (`docs/PROJEKTSTART.md`).
|
||||
> **Letzte Aktualisierung:** 6. November 2026
|
||||
@@ -74,10 +74,14 @@ Datenmodells (`households`, `dishes`, `rounds`, `slots`, …).
|
||||
5. **Der Wochenvorschlag ist Regelwerk, keine KI** (`lib/suggest.ts`, mit
|
||||
Tests): Wünsche zuerst, dann Vetos, Kostenbalance, Basis-Wechsel, keine
|
||||
Wiederholung der Vorrunde, Frisches zuerst; jeder Slot trägt einen Satz, warum.
|
||||
6. **Gestaltung (E-0002):** warme Palette (Creme, Terrakotta, Salbei) als
|
||||
CSS-Variablen, dunkler Modus von Anfang an, shadcn/ui, Icons aus Lucide, keine
|
||||
Emojis, Schrift lokal (nie vom CDN). Leere Zustände sagen, was als Nächstes zu
|
||||
tun ist. Mobile zuerst.
|
||||
6. **Gestaltung (E-0002, E-0009):** Pastell Coral & Lavendel, nur als Token in
|
||||
`app/globals.css` (nie Farbwerte am Bauteil); Hauptaktion als Pille in Coral mit
|
||||
dunkler Schrift, Etiketten `.eyebrow` in tiefem Lavendel, Überschriften in Newsreader
|
||||
(lokal, `app/fonts/`), Abschnitte mit feinen Linien statt Kästen. Dunkler Modus von
|
||||
Anfang an; `tests/contrast.test.ts` verlangt 4,5:1. shadcn/ui, Icons aus Lucide,
|
||||
keine Emojis, nichts vom CDN. Leere Zustände sagen, was als Nächstes zu tun ist.
|
||||
Mobile zuerst. Ändert sich das Symbol: `docs/icon/lunch.svg`, dann
|
||||
`scripts/app-icons.mjs`, und `olares/icon.png` per PR nach `aimighty/bilder`.
|
||||
7. **PWA:** Serwist; App-Shell und Rezepte offline, Einkaufsliste als lokale
|
||||
Warteschlange mit Abgleich. Wake Lock im Kochmodus. Web Push mit Opt-in beim
|
||||
ersten sinnvollen Anlass, Kinder nie per Push.
|
||||
|
||||
@@ -21,7 +21,7 @@ metadata:
|
||||
title: What's cooking?
|
||||
description: The family decides together what's for dinner — and the shopping list writes itself. Runs entirely on your own box.
|
||||
icon: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
|
||||
version: 26.11.3
|
||||
version: 26.11.4
|
||||
categories:
|
||||
- Applications
|
||||
|
||||
@@ -61,7 +61,7 @@ permission:
|
||||
appData: true
|
||||
|
||||
spec:
|
||||
versionName: '26.11.3'
|
||||
versionName: '26.11.4'
|
||||
|
||||
featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
|
||||
promoteImage:
|
||||
|
||||
@@ -6,10 +6,11 @@ import { requireSession } from "@/lib/auth/session";
|
||||
import { withHousehold } from "@/lib/db";
|
||||
import { isLocale } from "@/lib/locale";
|
||||
|
||||
// Abschnitte ohne Kasten: ein Etikett in Versalien, getrennt durch eine feine Linie.
|
||||
function Section({ title, children }: { title: string; children: React.ReactNode }) {
|
||||
return (
|
||||
<section className="flex flex-col gap-3 rounded-2xl border border-border bg-card p-4">
|
||||
<h2 className="text-lg font-semibold">{title}</h2>
|
||||
<section className="flex flex-col gap-3 border-t border-border pt-5">
|
||||
<h2 className="eyebrow">{title}</h2>
|
||||
{children}
|
||||
</section>
|
||||
);
|
||||
@@ -32,11 +33,13 @@ export default async function MorePage() {
|
||||
const date = new Intl.DateTimeFormat(locale, { dateStyle: "medium" });
|
||||
|
||||
return (
|
||||
<main className="mx-auto flex max-w-md flex-col gap-4 px-4 py-6">
|
||||
<h1 className="text-2xl font-semibold">{t("title")}</h1>
|
||||
<main className="mx-auto flex max-w-md flex-col gap-6 px-4 py-6">
|
||||
<header className="flex flex-col gap-1">
|
||||
<p className="eyebrow">{t("household")}</p>
|
||||
<h1 className="text-4xl leading-tight">{session.householdName}</h1>
|
||||
</header>
|
||||
|
||||
<Section title={`${t("household")}: ${session.householdName}`}>
|
||||
<h3 className="text-sm font-medium text-muted-foreground">{t("members")}</h3>
|
||||
<Section title={t("members")}>
|
||||
<ul className="flex flex-col divide-y divide-border">
|
||||
{members.map((m) => (
|
||||
<li key={m.id} className="flex min-h-11 items-center justify-between gap-2">
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
import { CookingPot } from "lucide-react";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { getLocale, getTranslations } from "next-intl/server";
|
||||
import { requireSession } from "@/lib/auth/session";
|
||||
|
||||
// „Heute“ — vorerst nur der leere Zustand. Er sagt, was als Nächstes kommt.
|
||||
// Wo später das Foto des Gerichts steht, steht bis dahin eine Illustration
|
||||
// (Konzept, „Design-Richtung“: keine Stockfotos).
|
||||
export default async function TodayPage() {
|
||||
await requireSession();
|
||||
const session = await requireSession();
|
||||
const t = await getTranslations("today");
|
||||
const date = new Intl.DateTimeFormat(await getLocale(), { weekday: "long", day: "numeric", month: "long" }).format(new Date());
|
||||
return (
|
||||
<main className="mx-auto flex min-h-[calc(100dvh-3.5rem)] max-w-md flex-col items-center justify-center gap-4 px-4 text-center">
|
||||
<CookingPot aria-hidden className="size-10 text-primary" strokeWidth={1.5} />
|
||||
<h1 className="text-2xl font-semibold">{t("emptyTitle")}</h1>
|
||||
<p className="text-muted-foreground">{t("emptyText")}</p>
|
||||
<main className="mx-auto flex max-w-md flex-col gap-6 px-4 py-6">
|
||||
<header className="flex flex-col gap-1">
|
||||
<p className="eyebrow">{t("eyebrow", { date })}</p>
|
||||
<h1 className="text-4xl leading-tight">{t("greeting", { name: session.displayName })}</h1>
|
||||
</header>
|
||||
<article className="overflow-hidden rounded-2xl bg-muted">
|
||||
<div className="flex aspect-[4/3] items-center justify-center bg-secondary">
|
||||
<CookingPot aria-hidden className="size-20 text-accent/70" strokeWidth={1} />
|
||||
</div>
|
||||
<div className="flex flex-col gap-2 p-5">
|
||||
<p className="eyebrow">{t("emptyEyebrow")}</p>
|
||||
<h2 className="text-2xl leading-snug">{t("emptyTitle")}</h2>
|
||||
<p className="text-muted-foreground">{t("emptyText")}</p>
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2020 The Newsreader Project Authors (http://github.com/productiontype/Newsreader) Newsreader-Italic[opsz,wght].ttf: Copyright 2020 The Newsreader Project Authors (http://github.com/productiontype/Newsreader)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -1,38 +1,42 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
/* Farben nur als Token (E-0002): warme Palette — Creme, Terrakotta, Salbei.
|
||||
Dunkler Modus von Anfang an. Werte als OKLCH, Kontrast Text/Fläche >= 4.5:1. */
|
||||
/* Farben nur als Token (E-0009, löst die Palette aus E-0002 ab): Pastell,
|
||||
Coral und Lavendel. Viel helle Fläche, das Foto des Gerichts trägt die
|
||||
Seite. Die Hauptaktion ist ein Knopf in Pastell-Coral mit dunkler Schrift,
|
||||
Etiketten und Links in einem tiefen Lavendel. Pastell nie als Schriftfarbe
|
||||
auf Hell — dafür ist es zu blass. Dunkler Modus von Anfang an; Kontrast
|
||||
Text/Fläche mindestens 4,5:1 (tests/contrast.test.ts). */
|
||||
:root {
|
||||
--background: oklch(0.975 0.012 85); /* Creme */
|
||||
--foreground: oklch(0.27 0.02 50); /* warmes Dunkelbraun */
|
||||
--muted: oklch(0.935 0.018 80);
|
||||
--muted-foreground: oklch(0.47 0.025 55);
|
||||
--card: oklch(0.99 0.008 85);
|
||||
--background: oklch(0.995 0.004 300);
|
||||
--foreground: oklch(0.23 0.015 295);
|
||||
--muted: oklch(0.965 0.022 300); /* Lavendel, ganz hell: Flächen */
|
||||
--muted-foreground: oklch(0.47 0.02 295);
|
||||
--card: oklch(0.995 0.004 300);
|
||||
--card-foreground: var(--foreground);
|
||||
--border: oklch(0.87 0.02 75);
|
||||
--primary: oklch(0.55 0.13 40); /* Terrakotta */
|
||||
--primary-foreground: oklch(0.99 0.008 85);
|
||||
--secondary: oklch(0.89 0.04 145); /* Salbei, hell */
|
||||
--secondary-foreground: oklch(0.3 0.04 150);
|
||||
--accent: oklch(0.62 0.06 150); /* Salbei */
|
||||
--ring: oklch(0.55 0.13 40);
|
||||
--radius: 0.875rem;
|
||||
--border: oklch(0.9 0.015 300);
|
||||
--primary: oklch(0.82 0.095 32); /* Pastell-Coral: die Hauptaktion */
|
||||
--primary-foreground: oklch(0.28 0.06 30);
|
||||
--secondary: oklch(0.94 0.035 300);
|
||||
--secondary-foreground: var(--foreground);
|
||||
--accent: oklch(0.48 0.11 295); /* tiefer Lavendel: Etiketten, Links */
|
||||
--ring: oklch(0.48 0.11 295);
|
||||
--radius: 1rem;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background: oklch(0.2 0.012 55);
|
||||
--foreground: oklch(0.94 0.015 80);
|
||||
--muted: oklch(0.26 0.015 55);
|
||||
--muted-foreground: oklch(0.74 0.02 70);
|
||||
--card: oklch(0.24 0.014 55);
|
||||
--border: oklch(0.34 0.015 55);
|
||||
--primary: oklch(0.7 0.12 42);
|
||||
--primary-foreground: oklch(0.2 0.012 55);
|
||||
--secondary: oklch(0.33 0.04 150);
|
||||
--secondary-foreground: oklch(0.92 0.03 145);
|
||||
--accent: oklch(0.72 0.07 150);
|
||||
--ring: oklch(0.7 0.12 42);
|
||||
--background: oklch(0.2 0.015 295);
|
||||
--foreground: oklch(0.95 0.008 300);
|
||||
--muted: oklch(0.25 0.02 295);
|
||||
--muted-foreground: oklch(0.76 0.02 300);
|
||||
--card: oklch(0.24 0.018 295);
|
||||
--border: oklch(0.35 0.02 295);
|
||||
--primary: oklch(0.82 0.095 32);
|
||||
--primary-foreground: oklch(0.26 0.05 30);
|
||||
--secondary: oklch(0.3 0.025 295);
|
||||
--secondary-foreground: var(--foreground);
|
||||
--accent: oklch(0.84 0.07 300);
|
||||
--ring: oklch(0.84 0.07 300);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +56,7 @@
|
||||
--color-ring: var(--ring);
|
||||
--radius-xl: var(--radius);
|
||||
--font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;
|
||||
--font-serif: var(--font-newsreader), ui-serif, Georgia, serif;
|
||||
}
|
||||
|
||||
html {
|
||||
@@ -66,3 +71,25 @@ body {
|
||||
/* iPhone: Inhalt nie hinter Insel oder Home-Leiste */
|
||||
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
||||
}
|
||||
|
||||
@layer base {
|
||||
/* Überschriften in der Serifenschrift, etwas enger gesetzt. */
|
||||
h1,
|
||||
h2 {
|
||||
font-family: var(--font-newsreader), ui-serif, Georgia, serif;
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
/* Kleines Etikett in Versalien über einem Abschnitt („ZUTATEN“, „HEUTE“). */
|
||||
.eyebrow {
|
||||
font-family: var(--font-sans);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: var(--accent);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,19 @@
|
||||
import type { Metadata, Viewport } from "next";
|
||||
import { GeistSans } from "geist/font/sans";
|
||||
import localFont from "next/font/local";
|
||||
import { NextIntlClientProvider } from "next-intl";
|
||||
import { getLocale, getTranslations } from "next-intl/server";
|
||||
import "./globals.css";
|
||||
|
||||
// Überschriften in einer Serifenschrift (E-0009), lokal aus app/fonts —
|
||||
// nie vom CDN. Newsreader, SIL Open Font License (app/fonts/Newsreader-OFL.txt).
|
||||
const serif = localFont({
|
||||
src: "./fonts/newsreader-latin-opsz-normal.woff2",
|
||||
weight: "200 800",
|
||||
variable: "--font-newsreader",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const t = await getTranslations("app");
|
||||
return {
|
||||
@@ -20,15 +30,15 @@ export const viewport: Viewport = {
|
||||
initialScale: 1,
|
||||
viewportFit: "cover",
|
||||
themeColor: [
|
||||
{ media: "(prefers-color-scheme: light)", color: "#faf6ee" },
|
||||
{ media: "(prefers-color-scheme: dark)", color: "#221d19" },
|
||||
{ media: "(prefers-color-scheme: light)", color: "#fdfcfe" },
|
||||
{ media: "(prefers-color-scheme: dark)", color: "#1c1823" },
|
||||
],
|
||||
};
|
||||
|
||||
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
const locale = await getLocale();
|
||||
return (
|
||||
<html lang={locale} className={GeistSans.variable}>
|
||||
<html lang={locale} className={`${GeistSans.variable} ${serif.variable}`}>
|
||||
<body className="min-h-dvh antialiased">
|
||||
<NextIntlClientProvider>{children}</NextIntlClientProvider>
|
||||
</body>
|
||||
|
||||
@@ -9,8 +9,8 @@ export default async function manifest(): Promise<MetadataRoute.Manifest> {
|
||||
description: t("tagline"),
|
||||
start_url: "/",
|
||||
display: "standalone",
|
||||
background_color: "#faf6ee",
|
||||
theme_color: "#faf6ee",
|
||||
background_color: "#fdfcfe",
|
||||
theme_color: "#fdfcfe",
|
||||
icons: [
|
||||
{ src: "/icon-192.png", sizes: "192x192", type: "image/png" },
|
||||
{ src: "/icon-512.png", sizes: "512x512", type: "image/png" },
|
||||
|
||||
@@ -19,7 +19,7 @@ export function AppNav() {
|
||||
return (
|
||||
<nav
|
||||
aria-label="Navigation"
|
||||
className="fixed inset-x-0 bottom-0 z-10 border-t border-border bg-background/95 pb-[env(safe-area-inset-bottom)] backdrop-blur-none"
|
||||
className="fixed inset-x-0 bottom-0 z-10 border-t border-border bg-background pb-[env(safe-area-inset-bottom)]"
|
||||
>
|
||||
<ul className="mx-auto flex max-w-md justify-around">
|
||||
{ITEMS.map(({ href, key, icon: Icon }) => {
|
||||
@@ -31,10 +31,10 @@ export function AppNav() {
|
||||
aria-current={active ? "page" : undefined}
|
||||
className={cn(
|
||||
"flex min-h-14 min-w-20 flex-col items-center justify-center gap-0.5 text-xs",
|
||||
active ? "font-semibold text-primary" : "text-muted-foreground",
|
||||
active ? "font-semibold text-accent" : "text-muted-foreground",
|
||||
)}
|
||||
>
|
||||
<Icon aria-hidden className="size-6" strokeWidth={1.75} />
|
||||
<Icon aria-hidden className="size-6" strokeWidth={1.5} />
|
||||
{t(key)}
|
||||
</Link>
|
||||
</li>
|
||||
|
||||
@@ -5,8 +5,8 @@ export function AuthShell({ title, intro, children }: { title: string; intro?: s
|
||||
return (
|
||||
<main className="mx-auto flex min-h-dvh w-full max-w-sm flex-col justify-center gap-6 px-4 py-10">
|
||||
<div className="flex flex-col items-center gap-4 text-center">
|
||||
<Image src="/icon.svg" alt="" width={64} height={64} priority />
|
||||
<h1 className="text-2xl font-semibold">{title}</h1>
|
||||
<Image src="/icon.svg" alt="" width={56} height={56} priority />
|
||||
<h1 className="text-4xl leading-tight">{title}</h1>
|
||||
{intro ? <p className="text-muted-foreground">{intro}</p> : null}
|
||||
</div>
|
||||
{children}
|
||||
|
||||
@@ -78,7 +78,7 @@ export function InvitePerson() {
|
||||
<legend className="mb-2 text-sm font-medium">{t("inviteRole")}</legend>
|
||||
{(["member", "admin"] as const).map((role) => (
|
||||
<label key={role} className="flex min-h-11 items-start gap-3">
|
||||
<input type="radio" name="role" value={role} defaultChecked={role === "member"} className="mt-1 size-5 accent-primary" />
|
||||
<input type="radio" name="role" value={role} defaultChecked={role === "member"} className="mt-1 size-5 shrink-0 accent-primary" />
|
||||
<span>
|
||||
<span className="block">{t(`roles.${role}`)}</span>
|
||||
<span className="block text-sm text-muted-foreground">{t(`roleHints.${role}`)}</span>
|
||||
|
||||
@@ -5,18 +5,18 @@ import { cn } from "@/lib/utils";
|
||||
|
||||
// shadcn/ui Button, Größen auf mindestens 44 px (Leitprinzip 7).
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-base font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-5 [&_svg]:shrink-0",
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-base font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-5 [&_svg]:shrink-0",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
||||
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
||||
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/70",
|
||||
outline: "border border-border bg-background hover:bg-muted",
|
||||
ghost: "hover:bg-muted",
|
||||
},
|
||||
size: {
|
||||
default: "min-h-11 px-5 py-2",
|
||||
lg: "min-h-12 px-6 text-lg",
|
||||
default: "min-h-11 px-6 py-2",
|
||||
lg: "min-h-13 px-7 text-lg",
|
||||
icon: "size-11",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ export const Input = React.forwardRef<HTMLInputElement, React.InputHTMLAttribute
|
||||
<input
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"flex min-h-11 w-full rounded-xl border border-border bg-card px-4 py-2 text-base text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",
|
||||
"flex min-h-11 w-full rounded-xl border border-border bg-background px-4 py-2 text-base text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -4,8 +4,8 @@ import { cn } from "@/lib/utils";
|
||||
// Ein Fehler hat immer ein Zeichen und einen Satz — Farbe allein trägt nichts.
|
||||
export function ErrorNotice({ children, className }: { children: React.ReactNode; className?: string }) {
|
||||
return (
|
||||
<p role="alert" className={cn("flex items-start gap-2 rounded-xl border border-primary/40 bg-primary/10 px-4 py-3 text-sm", className)}>
|
||||
<CircleAlert aria-hidden className="mt-0.5 size-4 shrink-0 text-primary" />
|
||||
<p role="alert" className={cn("flex items-start gap-2 rounded-xl border border-accent/40 bg-accent/10 px-4 py-3 text-sm", className)}>
|
||||
<CircleAlert aria-hidden className="mt-0.5 size-4 shrink-0 text-accent" />
|
||||
<span>{children}</span>
|
||||
</p>
|
||||
);
|
||||
|
||||
@@ -159,3 +159,27 @@ mit `check` statt als Postgres-Enum: Ein neuer Wert ist dann eine Zeile in einer
|
||||
kein `alter type` mit seinen Einschränkungen.
|
||||
|
||||
**Offen:** `dish_costs` (Kosten pro Portion und Konfidenz) kommt mit den Preisen in V2.
|
||||
|
||||
---
|
||||
|
||||
## E-0009 · Gestaltung: Pastell Coral & Lavendel, Serifen-Überschriften
|
||||
|
||||
**Stand:** entschieden, Kai, 6.11.2026 (Richtung „wie ein ruhiges Koch-Magazin“, aus
|
||||
acht Paletten Variante H gewählt). Löst die Palette aus E-0002 ab; der Rest von E-0002
|
||||
(eigene Gestaltung, shadcn/ui, Lucide, keine Emojis, Schrift lokal) gilt weiter.
|
||||
|
||||
- **Flächen** hell, fast weiß mit einem Hauch Lavendel; Karten und Abschnitte in einem
|
||||
sehr hellen Lavendel. Das Foto des Gerichts trägt die Seite, bis dahin eine Illustration.
|
||||
- **Hauptaktion:** Knopf in Pillenform, Pastell-Coral mit dunkler Schrift — eine
|
||||
Hauptaktion je Ansicht.
|
||||
- **Etiketten und Links:** kleine Versalien in tiefem Lavendel (`.eyebrow`), etwa
|
||||
„HEUTE“, „ZUTATEN“. Pastell nie als Schriftfarbe auf heller Fläche.
|
||||
- **Schrift:** Überschriften `h1`/`h2` in Newsreader (Serifen, SIL OFL, lokal unter
|
||||
`app/fonts/`), Text in Geist.
|
||||
- **Abschnitte** ohne Kasten, getrennt durch feine Linien.
|
||||
- **Symbol:** Teller mit Dampf auf Coral, Blatt in Lavendel (`docs/icon/lunch.svg`).
|
||||
- **Kontrast** jeder Schrift auf ihrer Fläche mindestens 4,5:1, hell und dunkel —
|
||||
`tests/contrast.test.ts` rechnet ihn aus den Token.
|
||||
|
||||
Die Richtung ist an bekannte Koch-Apps angelehnt (Weißraum, Foto, Serifen,
|
||||
Versalien-Etiketten), übernimmt aber weder deren Farben noch Logo oder Bausteine.
|
||||
@@ -1,15 +1,15 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<rect width="512" height="512" rx="112" fill="#b8573a"/>
|
||||
<rect width="512" height="512" rx="112" fill="#f39380"/>
|
||||
<!-- Teller -->
|
||||
<circle cx="256" cy="292" r="142" fill="#faf6ee"/>
|
||||
<circle cx="256" cy="292" r="98" fill="none" stroke="#e7dccb" stroke-width="14"/>
|
||||
<circle cx="256" cy="292" r="142" fill="#fefdff"/>
|
||||
<circle cx="256" cy="292" r="98" fill="none" stroke="#e7e1f6" stroke-width="14"/>
|
||||
<!-- Dampf -->
|
||||
<g fill="none" stroke="#faf6ee" stroke-width="18" stroke-linecap="round">
|
||||
<g fill="none" stroke="#fefdff" stroke-width="18" stroke-linecap="round">
|
||||
<path d="M206 78c-16 18 16 30 0 48"/>
|
||||
<path d="M256 64c-16 20 16 34 0 54"/>
|
||||
<path d="M306 78c-16 18 16 30 0 48"/>
|
||||
</g>
|
||||
<!-- Salbeiblatt -->
|
||||
<path d="M206 316c20-62 86-82 116-72-6 52-58 98-116 72z" fill="#8aa486"/>
|
||||
<path d="M214 312c30-24 58-42 96-62" stroke="#faf6ee" stroke-width="7" stroke-linecap="round" fill="none"/>
|
||||
<path d="M206 316c20-62 86-82 116-72-6 52-58 98-116 72z" fill="#7761b0"/>
|
||||
<path d="M214 312c30-24 58-42 96-62" stroke="#fefdff" stroke-width="7" stroke-linecap="round" fill="none"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 719 B After Width: | Height: | Size: 719 B |
@@ -4,8 +4,11 @@
|
||||
"tagline": "Gemeinsam entscheiden, was es gibt — die Einkaufsliste entsteht von selbst."
|
||||
},
|
||||
"today": {
|
||||
"emptyTitle": "Noch kein Plan",
|
||||
"emptyText": "Sobald die erste Planungsrunde steht, siehst du hier, was es heute gibt und wer kocht."
|
||||
"emptyTitle": "Was es heute gibt, steht hier",
|
||||
"emptyText": "Sobald die erste Planungsrunde steht, siehst du hier, was es heute gibt und wer kocht.",
|
||||
"eyebrow": "Heute · {date}",
|
||||
"greeting": "Hallo {name}",
|
||||
"emptyEyebrow": "Noch kein Plan"
|
||||
},
|
||||
"auth": {
|
||||
"setup": {
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
"tagline": "Decide together what's for dinner — the shopping list writes itself."
|
||||
},
|
||||
"today": {
|
||||
"emptyTitle": "No plan yet",
|
||||
"emptyText": "Once the first planning round is set, you'll see here what's for dinner today and who's cooking."
|
||||
"emptyTitle": "What's for dinner shows up here",
|
||||
"emptyText": "Once the first planning round is set, you'll see here what's for dinner today and who's cooking.",
|
||||
"eyebrow": "Today · {date}",
|
||||
"greeting": "Hi {name}",
|
||||
"emptyEyebrow": "No plan yet"
|
||||
},
|
||||
"auth": {
|
||||
"setup": {
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
"tagline": "Decide together what's for dinner — the shopping list writes itself."
|
||||
},
|
||||
"today": {
|
||||
"emptyTitle": "No plan yet",
|
||||
"emptyText": "Once the first planning round is set, you'll see here what's for dinner today and who's cooking."
|
||||
"emptyTitle": "What's for dinner shows up here",
|
||||
"emptyText": "Once the first planning round is set, you'll see here what's for dinner today and who's cooking.",
|
||||
"eyebrow": "Today · {date}",
|
||||
"greeting": "Hi {name}",
|
||||
"emptyEyebrow": "No plan yet"
|
||||
},
|
||||
"auth": {
|
||||
"setup": {
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
"tagline": "Decide together what's for dinner — the shopping list writes itself."
|
||||
},
|
||||
"today": {
|
||||
"emptyTitle": "No plan yet",
|
||||
"emptyText": "Once the first planning round is set, you'll see here what's for dinner today and who's cooking."
|
||||
"emptyTitle": "What's for dinner shows up here",
|
||||
"emptyText": "Once the first planning round is set, you'll see here what's for dinner today and who's cooking.",
|
||||
"eyebrow": "Today · {date}",
|
||||
"greeting": "Hi {name}",
|
||||
"emptyEyebrow": "No plan yet"
|
||||
},
|
||||
"auth": {
|
||||
"setup": {
|
||||
|
||||
@@ -2,5 +2,5 @@ apiVersion: v2
|
||||
name: lunch
|
||||
description: Was gibt's? — die Familie entscheidet gemeinsam, was es gibt; aus dem Plan entsteht die Einkaufsliste
|
||||
type: application
|
||||
version: 26.11.3 # YY.M.<n> wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen
|
||||
appVersion: "26.11.3" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran
|
||||
version: 26.11.4 # YY.M.<n> wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen
|
||||
appVersion: "26.11.4" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran
|
||||
@@ -21,7 +21,7 @@ metadata:
|
||||
title: What's cooking?
|
||||
description: The family decides together what's for dinner — and the shopping list writes itself. Runs entirely on your own box.
|
||||
icon: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
|
||||
version: 26.11.3
|
||||
version: 26.11.4
|
||||
categories:
|
||||
- Applications
|
||||
|
||||
@@ -61,7 +61,7 @@ permission:
|
||||
appData: true
|
||||
|
||||
spec:
|
||||
versionName: '26.11.3'
|
||||
versionName: '26.11.4'
|
||||
|
||||
featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
|
||||
promoteImage:
|
||||
|
||||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 23 KiB |
@@ -0,0 +1,5 @@
|
||||
# New look: pastel coral and lavender
|
||||
v26.11.4: A calmer, lighter look in pastel coral and lavender, with serif headings and small capital labels above each section, in light and dark mode. The main action on every screen is a single coral button; sections are separated by fine lines instead of boxes. The app icon follows the new colours. Every text colour is checked for legibility against its background.
|
||||
|
||||
## Deutsch
|
||||
v26.11.4: Ein ruhigeres, helleres Aussehen in Pastell-Coral und Lavendel, mit Überschriften in einer Serifenschrift und kleinen Etiketten in Versalien über jedem Abschnitt, hell und dunkel. Die Hauptaktion jeder Seite ist ein einzelner Knopf in Coral; Abschnitte trennen feine Linien statt Kästen. Das App-Symbol folgt den neuen Farben. Jede Schriftfarbe ist auf ihrem Hintergrund auf Lesbarkeit geprüft.
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,15 +1,15 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<rect width="512" height="512" rx="112" fill="#b8573a"/>
|
||||
<rect width="512" height="512" rx="112" fill="#f39380"/>
|
||||
<!-- Teller -->
|
||||
<circle cx="256" cy="292" r="142" fill="#faf6ee"/>
|
||||
<circle cx="256" cy="292" r="98" fill="none" stroke="#e7dccb" stroke-width="14"/>
|
||||
<circle cx="256" cy="292" r="142" fill="#fefdff"/>
|
||||
<circle cx="256" cy="292" r="98" fill="none" stroke="#e7e1f6" stroke-width="14"/>
|
||||
<!-- Dampf -->
|
||||
<g fill="none" stroke="#faf6ee" stroke-width="18" stroke-linecap="round">
|
||||
<g fill="none" stroke="#fefdff" stroke-width="18" stroke-linecap="round">
|
||||
<path d="M206 78c-16 18 16 30 0 48"/>
|
||||
<path d="M256 64c-16 20 16 34 0 54"/>
|
||||
<path d="M306 78c-16 18 16 30 0 48"/>
|
||||
</g>
|
||||
<!-- Salbeiblatt -->
|
||||
<path d="M206 316c20-62 86-82 116-72-6 52-58 98-116 72z" fill="#8aa486"/>
|
||||
<path d="M214 312c30-24 58-42 96-62" stroke="#faf6ee" stroke-width="7" stroke-linecap="round" fill="none"/>
|
||||
<path d="M206 316c20-62 86-82 116-72-6 52-58 98-116 72z" fill="#7761b0"/>
|
||||
<path d="M214 312c30-24 58-42 96-62" stroke="#fefdff" stroke-width="7" stroke-linecap="round" fill="none"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 719 B After Width: | Height: | Size: 719 B |
@@ -13,10 +13,10 @@ const browser = await chromium.launch();
|
||||
const page = await browser.newPage();
|
||||
|
||||
async function render(file, size, { maskable = false } = {}) {
|
||||
// Maskierbar: Motiv auf 80 % in sicherer Zone, Rand in Terrakotta.
|
||||
// Maskierbar: Motiv auf 80 % in sicherer Zone, Rand in Coral.
|
||||
const inner = maskable ? Math.round(size * 0.8) : size;
|
||||
await page.setViewportSize({ width: size, height: size });
|
||||
await page.setContent(`<html><body style="margin:0;background:${maskable ? "#b8573a" : "transparent"};display:grid;place-items:center;width:${size}px;height:${size}px">
|
||||
await page.setContent(`<html><body style="margin:0;background:${maskable ? "#f39380" : "transparent"};display:grid;place-items:center;width:${size}px;height:${size}px">
|
||||
<div style="width:${inner}px;height:${inner}px">${svg.replace("<svg ", `<svg width="${inner}" height="${inner}" `)}</div></body></html>`);
|
||||
await page.screenshot({ path: file, omitBackground: !maskable });
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
// Kontrast aus den Token in app/globals.css gerechnet (E-0009): Jede Schrift
|
||||
// auf ihrer Fläche mindestens 4,5:1, hell und dunkel. Wer eine Farbe ändert,
|
||||
// merkt hier, wenn sie unlesbar wird.
|
||||
|
||||
const css = readFileSync("app/globals.css", "utf8");
|
||||
|
||||
function block(source: string): Record<string, string> {
|
||||
return Object.fromEntries([...source.matchAll(/--([a-z-]+):\s*(oklch\([^)]*\)|var\(--[a-z-]+\))/g)].map((m) => [m[1]!, m[2]!]));
|
||||
}
|
||||
|
||||
const light = block(css.slice(css.indexOf(":root {"), css.indexOf("@media (prefers-color-scheme: dark)")));
|
||||
const dark = { ...light, ...block(css.slice(css.indexOf("@media (prefers-color-scheme: dark)"), css.indexOf("@theme inline"))) };
|
||||
|
||||
function resolve(tokens: Record<string, string>, name: string): string {
|
||||
let value = tokens[name]!;
|
||||
while (value.startsWith("var(")) value = tokens[value.slice(6, -1)]!;
|
||||
return value;
|
||||
}
|
||||
|
||||
/** OKLCH → relative Leuchtdichte nach WCAG (über lineares sRGB, auf den Farbraum begrenzt). */
|
||||
function luminance(oklch: string): number {
|
||||
const [L, C, h] = oklch.slice(6, -1).trim().split(/\s+/).map(Number) as [number, number, number];
|
||||
const a = C * Math.cos((h * Math.PI) / 180);
|
||||
const b = C * Math.sin((h * Math.PI) / 180);
|
||||
const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3;
|
||||
const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3;
|
||||
const s = (L - 0.0894841775 * a - 1.291485548 * b) ** 3;
|
||||
const clamp = (v: number) => Math.min(1, Math.max(0, v));
|
||||
const r = clamp(4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s);
|
||||
const g = clamp(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s);
|
||||
const bl = clamp(-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s);
|
||||
return 0.2126 * r + 0.7152 * g + 0.0722 * bl;
|
||||
}
|
||||
|
||||
function contrast(tokens: Record<string, string>, fg: string, bg: string): number {
|
||||
const [x, y] = [luminance(resolve(tokens, fg)), luminance(resolve(tokens, bg))].sort((p, q) => q - p);
|
||||
return (x! + 0.05) / (y! + 0.05);
|
||||
}
|
||||
|
||||
const PAIRS: [string, string][] = [
|
||||
["foreground", "background"],
|
||||
["foreground", "muted"],
|
||||
["muted-foreground", "background"],
|
||||
["muted-foreground", "muted"],
|
||||
["accent", "background"],
|
||||
["accent", "muted"],
|
||||
["primary-foreground", "primary"],
|
||||
["secondary-foreground", "secondary"],
|
||||
["card-foreground", "card"],
|
||||
];
|
||||
|
||||
describe.each([
|
||||
["light", light],
|
||||
["dark", dark],
|
||||
])("contrast (%s)", (_, tokens) => {
|
||||
it.each(PAIRS)("%s on %s is at least 4.5:1", (fg, bg) => {
|
||||
expect(contrast(tokens, fg, bg)).toBeGreaterThanOrEqual(4.5);
|
||||
});
|
||||
});
|
||||