import { notFound } from 'next/navigation'; import { getPageBySlug, getAllPages, getMediaById } from '@/lib/data'; import { Metadata } from 'next'; import { SEO } from '@/components/SEO'; import { processHTML } from '@/lib/html-compat'; import { LocaleSwitcher } from '@/components/LocaleSwitcher'; import Link from 'next/link'; import { ResponsiveSection, ResponsiveWrapper, ResponsiveGrid } from '@/components/layout/ResponsiveWrapper'; import { FeaturedImage } from '@/components/content/FeaturedImage'; import { Container } from '@/components/ui/Container'; import { Button } from '@/components/ui/Button'; interface PageProps { params: { locale: string; slug?: string; }; } export async function generateStaticParams() { const pages = await getAllPages(); const params = pages.map((page) => ({ locale: page.locale, slug: page.slug, })); return params; } export async function generateMetadata({ params }: PageProps): Promise { const { locale, slug = 'home' } = params; // Map root path to actual home page slugs const homeSlugs: Record = { 'en': 'corporate-3-landing-2', 'de': 'start' }; const actualSlug = slug === 'home' ? homeSlugs[locale] || 'home' : slug; const page = await getPageBySlug(actualSlug, locale); if (!page) { return { title: 'Page Not Found', }; } return { title: page.title, description: page.excerptHtml || '', alternates: { languages: { de: slug === 'home' ? '/de' : `/de/${slug}`, en: slug === 'home' ? '/en' : `/en/${slug}`, }, }, }; } export default async function Page({ params }: PageProps) { const { locale, slug = 'home' } = params; // Map root path to actual home page slugs const homeSlugs: Record = { 'en': 'corporate-3-landing-2', 'de': 'start' }; const actualSlug = slug === 'home' ? homeSlugs[locale] || 'home' : slug; const page = await getPageBySlug(actualSlug, locale); if (!page) { notFound(); } // Use contentHtml if available, otherwise use excerptHtml const contentToDisplay = page.contentHtml && page.contentHtml.trim() !== '' ? page.contentHtml : page.excerptHtml; const processedContent = processHTML(contentToDisplay || ''); // Get featured image if available const featuredImage = page.featuredImage ? getMediaById(page.featuredImage) : null; return ( <> {/* Hero Section with Featured Image */} {featuredImage && (

{page.title}

)} {/* Main Content */} {!featuredImage && (

{page.title}

{page.excerptHtml && (
)} )} {processedContent && (
)} {/* Navigation Links */}
Blog
Read our latest posts
Products
Browse our catalog
Contact
Get in touch
News
Latest updates
{/* Tailwind CSS Test Section */}

Tailwind CSS Test

If you can see styled components below, Tailwind CSS is working correctly!

Card 1

This card uses Tailwind shadow, rounded, and border utilities.

Card 2

Different shadow intensity and border color.

Card 3

Rounded-xl and shadow-xl for emphasis.

Success!

If you see this styled alert box with proper colors, spacing, and borders, Tailwind CSS is processing correctly.

{/* Locale Switcher */} ); }