feat: plakat redesign phase 3 (windows on desktop, sheets on mobile) (#76)
- Tapping an object on the desk opens a window (desktop) or a bottom sheet (mobile) instead of flipping: projects, now, servers, reading, about, contact - Desktop windows in poster style (2px ink rule, hard offset shadow), open from the tapped object, thrown by the title bar with momentum and elastic viewport edges, stack by focus, minimize into a tray, Escape closes the top window, focus moves to close and returns to the trigger - Mobile sheets via vaul 1.1.2: drag down to dismiss, overlay, focus trap - Project window shows live/source links from Directus when present - Hero "Write me" opens the contact window; still a plain #contact link without JavaScript - Shared current-book loader for desk, deck and reading window - Texts in de/en, i18n key check extended Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import type { WindowLabels } from "./types";
|
||||
|
||||
/** Alle Texte für Fenster und Sheets, serverseitig geladen und als Props weitergereicht. */
|
||||
export async function getWindowLabels(locale: string): Promise<WindowLabels> {
|
||||
const t = await getTranslations({ locale, namespace: "home.windows" });
|
||||
const tisch = await getTranslations({ locale, namespace: "home.tisch" });
|
||||
|
||||
return {
|
||||
close: t("close"),
|
||||
minimize: t("minimize"),
|
||||
openWindows: t("openWindows"),
|
||||
projectPage: t("projectPage"),
|
||||
source: t("source"),
|
||||
live: t("live"),
|
||||
stack: t("stack"),
|
||||
year: t("year"),
|
||||
now: {
|
||||
title: t("now.title"),
|
||||
days: t("now.days"),
|
||||
rows: (["study", "work", "side"] as const).map((k) => ({ label: t(`now.${k}.label`), text: t(`now.${k}.text`) })),
|
||||
},
|
||||
server: {
|
||||
title: t("server.title"),
|
||||
headline: t("server.headline"),
|
||||
rows: (["ingress", "mail", "home"] as const).map((k) => ({
|
||||
name: tisch(`servers.${k}.name`),
|
||||
detail: tisch(`servers.${k}.detail`),
|
||||
})),
|
||||
note: tisch("serverNote"),
|
||||
},
|
||||
read: {
|
||||
title: t("read.title"),
|
||||
progress: t("read.progress"),
|
||||
empty: t("read.empty"),
|
||||
library: t("read.library"),
|
||||
libraryHref: `/${locale}/books`,
|
||||
},
|
||||
about: {
|
||||
title: t("about.title"),
|
||||
paragraphs: [t("about.p1"), t("about.p2")],
|
||||
facts: (["laptop", "pc", "study", "languages"] as const).map((k) => ({
|
||||
label: t(`about.facts.${k}.label`),
|
||||
value: t(`about.facts.${k}.value`),
|
||||
})),
|
||||
},
|
||||
contact: {
|
||||
title: t("contact.title"),
|
||||
body: t("contact.body"),
|
||||
copy: t("contact.copy"),
|
||||
copied: t("contact.copied"),
|
||||
form: t("contact.form"),
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user