From 1bd9f26356873a9b7bec5a0f1a28a62ddcf44f94 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 22 Jun 2026 12:04:53 +0200 Subject: [PATCH] style(og): improve spacing, truncate text, and switch to flex layout --- app/[locale]/opengraph-image.tsx | 4 +- components/OGImageTemplate.tsx | 173 ++++++++++++++++--------------- 2 files changed, 94 insertions(+), 83 deletions(-) diff --git a/app/[locale]/opengraph-image.tsx b/app/[locale]/opengraph-image.tsx index 68183bea6..94fea49e8 100644 --- a/app/[locale]/opengraph-image.tsx +++ b/app/[locale]/opengraph-image.tsx @@ -16,8 +16,8 @@ export default async function Image({ params }: { params: Promise<{ locale: stri return new ImageResponse( -
- {/* Label / Category */} - {label && ( -
- {label} -
- )} - - {/* Title */} -
40 ? '64px' : '82px', - fontWeight: 700, - color: 'white', - lineHeight: '1.05', - maxWidth: '950px', - marginBottom: '40px', - display: 'flex', - letterSpacing: '-0.02em', - }} - > - {title} -
- - {/* Description */} - {description && ( -
- {description.length > 160 ? description.substring(0, 157) + '...' : description} -
- )} -
- - {/* Brand Footer */} + {/* Main Content Wrapper */}
- {logo ? ( - // eslint-disable-next-line @next/next/no-img-element - E-TIB GmbH - ) : ( + {/* Top: Text Content */} +
+ {/* Label / Category */} + {label && ( +
+ {label} +
+ )} + + {/* Title */}
- )} - {!logo && ( -
35 ? '64px' : '76px', fontWeight: 700, color: 'white', - textTransform: 'uppercase', - letterSpacing: '0.15em', + lineHeight: '1.1', + maxWidth: '900px', + marginBottom: '32px', display: 'flex', + letterSpacing: '-0.02em', }} > - E-TIB GmbH + {title}
- )} + + {/* Description */} + {description && ( +
+ {description} +
+ )} +
+ + {/* Bottom: Brand Footer */} +
+ {logo ? ( + // eslint-disable-next-line @next/next/no-img-element + E-TIB GmbH + ) : ( +
+ )} + {!logo && ( +
+ E-TIB GmbH +
+ )} +
{/* Primary Green Brand Strip */}