From 62b887c2a3af387f14d582de1de794b755f88db7 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Thu, 29 Jan 2026 15:54:54 +0100 Subject: [PATCH] og image --- app/layout.tsx | 10 +-- app/opengraph-image.tsx | 175 ++++++++++++++++++++++++++++++++++++++++ app/twitter-image.tsx | 175 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 351 insertions(+), 9 deletions(-) create mode 100644 app/opengraph-image.tsx create mode 100644 app/twitter-image.tsx diff --git a/app/layout.tsx b/app/layout.tsx index 824c1a2..94ce133 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -10,6 +10,7 @@ const inter = Inter({ }); export const metadata: Metadata = { + metadataBase: new URL("https://www.mb-grid-solutions.com"), title: { default: "MB Grid Solutions | Energiekabelprojekte & Technische Beratung", template: "%s | MB Grid Solutions" @@ -31,20 +32,11 @@ export const metadata: Metadata = { siteName: "MB Grid Solutions", title: "MB Grid Solutions | Energiekabelprojekte & Technische Beratung", description: "Spezialisierter Partner für Energiekabelprojekte bis 110 kV. Herstellerneutrale technische Beratung und Projektbegleitung.", - images: [ - { - url: "/assets/logo.png", - width: 800, - height: 600, - alt: "MB Grid Solutions Logo", - }, - ], }, twitter: { card: "summary_large_image", title: "MB Grid Solutions | Energiekabelprojekte & Technische Beratung", description: "Spezialisierter Partner für Energiekabelprojekte bis 110 kV.", - images: ["/assets/logo.png"], }, robots: { index: true, diff --git a/app/opengraph-image.tsx b/app/opengraph-image.tsx new file mode 100644 index 0000000..ca37ae9 --- /dev/null +++ b/app/opengraph-image.tsx @@ -0,0 +1,175 @@ +import { ImageResponse } from 'next/og'; + +export const runtime = 'edge'; + +export const alt = 'MB Grid Solutions | Energiekabelprojekte & Technische Beratung'; +export const size = { + width: 1200, + height: 630, +}; + +export const contentType = 'image/png'; + +export default async function Image() { + return new ImageResponse( + ( +
+ {/* Grid Pattern Background - matching .grid-pattern in globals.css */} +
+ + {/* Content Container - matching .card-modern / .glass-panel style */} +
+ {/* Engineering Excellence Badge */} +
+
+
+ Engineering Excellence +
+
+ + {/* Brand Mark */} +
+
+ MB +
+
+ + {/* Title */} +
+ MB Grid Solutions +
+ + {/* Subtitle */} +
+ Energiekabelprojekte & Technische Beratung +
+ bis 110 kV +
+
+ + {/* Tech Lines - matching .tech-line style */} +
+
+
+ ), + { + ...size, + } + ); +} diff --git a/app/twitter-image.tsx b/app/twitter-image.tsx new file mode 100644 index 0000000..c3c2342 --- /dev/null +++ b/app/twitter-image.tsx @@ -0,0 +1,175 @@ +import { ImageResponse } from 'next/og'; + +export const runtime = 'edge'; + +export const alt = 'MB Grid Solutions | Energiekabelprojekte & Technische Beratung'; +export const size = { + width: 1200, + height: 630, +}; + +export const contentType = 'image/png'; + +export default async function Image() { + return new ImageResponse( + ( +
+ {/* Grid Pattern Background */} +
+ + {/* Content Container */} +
+ {/* Engineering Excellence Badge */} +
+
+
+ Engineering Excellence +
+
+ + {/* Brand Mark */} +
+
+ MB +
+
+ + {/* Title */} +
+ MB Grid Solutions +
+ + {/* Subtitle */} +
+ Energiekabelprojekte & Technische Beratung +
+ bis 110 kV +
+
+ + {/* Tech Lines */} +
+
+
+ ), + { + ...size, + } + ); +}