9e6ae866d0
- AI chat moves into a window/sheet, opened from a new speech-bubble card on the desk; it now respects the chatbot consent and asks before sending anything to n8n (previously it ignored the consent) - Contact as red poster section with big mail address and the form on a paper card; validation errors are finally shown inline (aria-invalid, role=alert) - Footer as ink strip with dk0 wordmark, legal links and a button to reopen the privacy settings - "About me" in the header opens the about window on the home page - Remove the old About section and its parts (BentoChat, ActivityFeed, CurrentlyReading, ReadBooks), the unused ChatWidget, Projects and BentoGrid, their tests, wrappers, loaders, types and texts - scripts/directus-cleanup-redesign.mjs: dry run by default, --apply archives hobbies, tech stack categories and old content pages and deletes four unused message overrides after a full JSON backup; run only after the redesign is live on production Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59 lines
1.6 KiB
TypeScript
59 lines
1.6 KiB
TypeScript
"use client";
|
|
|
|
/**
|
|
* Transitional Wrapper für bestehende Components
|
|
* Nutzt direkt JSON Messages statt komplexe Translation-Loader
|
|
*/
|
|
|
|
import { NextIntlClientProvider } from 'next-intl';
|
|
import dynamic from 'next/dynamic';
|
|
|
|
// Lazy-load below-fold components so their JS doesn't block initial paint / LCP.
|
|
// SSR stays on (default) so content is in the initial HTML for SEO.
|
|
const Contact = dynamic(() => import('./Contact'));
|
|
const Footer = dynamic(() => import('./Footer'));
|
|
import type {
|
|
ContactTranslations,
|
|
FooterTranslations,
|
|
} from '@/types/translations';
|
|
import enMessages from '@/messages/en.json';
|
|
import deMessages from '@/messages/de.json';
|
|
|
|
const messageMap = { en: enMessages, de: deMessages };
|
|
|
|
function getNormalizedLocale(locale: string): 'en' | 'de' {
|
|
return locale.startsWith('de') ? 'de' : 'en';
|
|
}
|
|
|
|
export function ContactClient({ locale }: { locale: string; translations: ContactTranslations }) {
|
|
const normalLocale = getNormalizedLocale(locale);
|
|
const baseMessages = messageMap[normalLocale];
|
|
|
|
const messages = {
|
|
home: {
|
|
contact: baseMessages.home.contact
|
|
}
|
|
};
|
|
|
|
return (
|
|
<NextIntlClientProvider locale={locale} messages={messages}>
|
|
<Contact />
|
|
</NextIntlClientProvider>
|
|
);
|
|
}
|
|
|
|
export function FooterClient({ locale }: { locale: string; translations: FooterTranslations }) {
|
|
const normalLocale = getNormalizedLocale(locale);
|
|
const baseMessages = messageMap[normalLocale];
|
|
|
|
const messages = {
|
|
footer: baseMessages.footer
|
|
};
|
|
|
|
return (
|
|
<NextIntlClientProvider locale={locale} messages={messages}>
|
|
<Footer />
|
|
</NextIntlClientProvider>
|
|
);
|
|
}
|