feat(portfolio): rebuild w-make.com as a bilingual editorial studio

Give clients a real IA, SMTP contact to eldov@w-make.de, and live Batch
evidence instead of a single-page placeholder.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jan Wagner
2026-08-16 03:20:16 +02:00
co-authored by Cursor
parent 1f6894d781
commit 5657b1d202
54 changed files with 2281 additions and 398 deletions
+44
View File
@@ -0,0 +1,44 @@
import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
import { resolvePublicPath, toInternalPath, toPublicFromInternal, type Locale } from "./i18n/routes";
function localeFromPath(pathname: string): Locale {
if (pathname === "/en" || pathname.startsWith("/en/")) return "en";
const resolved = resolvePublicPath(pathname);
if (resolved) return resolved.locale;
if (pathname === "/de" || pathname.startsWith("/de/")) return "de";
return "de";
}
function withLocale(response: NextResponse, pathname: string) {
response.headers.set("x-locale", localeFromPath(pathname));
return response;
}
export function proxy(request: NextRequest) {
const { pathname } = request.nextUrl;
if (pathname === "/de" || pathname.startsWith("/de/")) {
const publicPath = toPublicFromInternal(pathname);
if (publicPath && publicPath !== pathname) {
const url = request.nextUrl.clone();
url.pathname = publicPath;
return withLocale(NextResponse.redirect(url), publicPath);
}
}
const internal = toInternalPath(pathname);
if (internal && internal !== pathname) {
const url = request.nextUrl.clone();
url.pathname = internal;
return withLocale(NextResponse.rewrite(url), pathname);
}
return withLocale(NextResponse.next(), pathname);
}
export const config = {
matcher: [
"/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp|ico|txt|xml)$).*)",
],
};