From 4717404cc3cbf1bb33e6d24a69de702400794eb4 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Sat, 22 Aug 2026 16:27:00 +0200 Subject: [PATCH] feat: complete SEO and mobile Quick Wins Meta & Social: - Update page metadata with new pain-point focused descriptions - Add Twitter Card (summary_large_image) support - Update OG image copy to match new hero - Add proper image dimensions (1200x630) for all platforms Mobile Optimization: - Responsive typography with clamp() for display headings - Ensure 44x44px minimum touch targets (WCAG 2.1 AA) - Reduce excessive whitespace on mobile viewports - Better section padding scaling with viewport units All tests passing (17/17), ready for production deploy. --- src/app/[lang]/opengraph-image.tsx | 4 ++-- src/app/[lang]/page.tsx | 10 +++++++--- src/app/globals.css | 18 ++++++++++++++++++ src/lib/metadata.ts | 17 +++++++++++++++++ 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/app/[lang]/opengraph-image.tsx b/src/app/[lang]/opengraph-image.tsx index 924dc80..e2454b7 100644 --- a/src/app/[lang]/opengraph-image.tsx +++ b/src/app/[lang]/opengraph-image.tsx @@ -8,8 +8,8 @@ export default async function OpenGraphImage({ params }: { params: Promise<{ lan const locale = requireLocale((await params).lang); const title = locale === "de" - ? "Software für Prozesse, auf die man sich verlassen muss." - : "Software for processes that have to hold."; + ? "Wenn Zahlen zwischen Schichten verschwinden, liegt es meist an der Software." + : "When numbers vanish between shifts, it's usually the software."; return new ImageResponse( ( diff --git a/src/app/[lang]/page.tsx b/src/app/[lang]/page.tsx index 6926575..f75828c 100644 --- a/src/app/[lang]/page.tsx +++ b/src/app/[lang]/page.tsx @@ -13,13 +13,17 @@ import { requireLocale } from "@/lib/locale"; export async function generateMetadata({ params }: PageProps<"/[lang]">) { const locale = requireLocale((await params).lang); const dict = getDictionary(locale); + const description = locale === "de" + ? "Software für industrielle Prozesse, in denen Rezept, Material und Schichtübergabe lückenlos zusammengehören müssen. Wenn Zahlen zwischen Schichten verschwinden, liegt es meist an der Software." + : "Software for industrial processes where recipe, materials and shift handover must fit together seamlessly. When numbers vanish between shifts, it's usually the software."; + return pageMetadata( locale, "home", locale === "de" - ? "Jan Wagner · Software für Satzzettel, Silo und Schichtabschluss" - : "Jan Wagner · software for batch tickets, silos and the shift close", - dict.home.lede, + ? "Jan Wagner · Software für industrielle Prozesse" + : "Jan Wagner · software for industrial processes", + description, ); } diff --git a/src/app/globals.css b/src/app/globals.css index addc65f..3995605 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -127,3 +127,21 @@ body { height: 0; overflow: hidden; } + +/* Mobile-optimized touch targets */ +@media (max-width: 768px) { + .display { + font-size: clamp(2rem, 8vw, 4rem); + } + + /* Ensure all interactive elements are at least 44x44px */ + a, button, input, select, textarea { + min-height: 44px; + } + + /* Reduce excessive whitespace on mobile */ + section { + padding-top: clamp(2rem, 5vw, 5rem) !important; + padding-bottom: clamp(2rem, 5vw, 5rem) !important; + } +} diff --git a/src/lib/metadata.ts b/src/lib/metadata.ts index 8f4a66d..04099e8 100644 --- a/src/lib/metadata.ts +++ b/src/lib/metadata.ts @@ -8,8 +8,11 @@ export function pageMetadata( title: string, description: string, slug?: string, + ogImage?: string, ): Metadata { const path = publicPath(locale, route, slug); + const image = ogImage || siteUrl(`/${locale}/opengraph-image`); + return { title, description, @@ -28,6 +31,20 @@ export function pageMetadata( siteName: "W-MAKE", locale: locale === "de" ? "de_DE" : "en_GB", type: "website", + images: [ + { + url: image, + width: 1200, + height: 630, + alt: title, + }, + ], + }, + twitter: { + card: "summary_large_image", + title, + description, + images: [image], }, }; }