feat(og): improve design with background image, logo and dynamic geometry

This commit is contained in:
2026-06-22 11:31:19 +02:00
parent 3e2b20ce0e
commit 84f10694bb
3 changed files with 68 additions and 29 deletions

View File

@@ -1,7 +1,7 @@
import { ImageResponse } from 'next/og';
import { getTranslations } from 'next-intl/server';
import { OGImageTemplate } from '@/components/OGImageTemplate';
import { getOgFonts, OG_IMAGE_SIZE } from '@/lib/og-helper';
import { getOgFonts, getOgBackground, getOgLogo, OG_IMAGE_SIZE } from '@/lib/og-helper';
export const size = OG_IMAGE_SIZE;
export const contentType = 'image/png';
@@ -11,12 +11,16 @@ export default async function Image({ params }: { params: Promise<{ locale: stri
const { locale } = await params;
const t = await getTranslations({ locale, namespace: 'Index.meta' });
const fonts = await getOgFonts();
const bg = getOgBackground();
const logo = getOgLogo();
return new ImageResponse(
<OGImageTemplate
title={t('title')}
description={t('description')}
label="Kabelnetzbau & Infrastruktur"
image={bg}
logo={logo}
/>,
{
...OG_IMAGE_SIZE,