fix: CTABlock field mapping to match Payload CMS schema
Map buttons array (text/link/style), description, and backgroundColor instead of legacy flat fields (ctaLink, ctaLabel, backgroundImage) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3
.playwright-mcp/console-2026-02-16T10-46-48-597Z.log
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[ 189429ms] [ERROR] Failed to load resource: the server responded with a status of 404 (Not Found) @ http://localhost:3000/favicon.ico:0
|
||||
[ 194441ms] [WARNING] The resource http://localhost:3000/_next/static/chunks/%5Broot-of-the-server%5D__29ca5531._.css was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. @ http://localhost:3000/:0
|
||||
[ 201925ms] [WARNING] The resource http://localhost:3000/_next/static/chunks/%5Broot-of-the-server%5D__29ca5531._.css was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally. @ http://localhost:3000/:0
|
||||
12
.playwright-mcp/console-2026-02-16T14-58-43-548Z.log
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[ 3464984ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3465988ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3466990ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3467993ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3468998ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3474002ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3479009ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3484016ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3489033ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3494089ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3499230ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
[ 3504455ms] [ERROR] WebSocket connection to 'ws://localhost:3000/_next/webpack-hmr?id=puJjKHXOKy35PaBsj2fmd' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED @ http://localhost:3000/_next/static/chunks/af9ea_next_dist_client_3d23be48._.js:10116
|
||||
BIN
porwoll-hero-fixed.png
Normal file
|
After Width: | Height: | Size: 227 KiB |
BIN
porwoll-hero-left-aligned.png
Normal file
|
After Width: | Height: | Size: 234 KiB |
BIN
porwoll-hero-smaller.png
Normal file
|
After Width: | Height: | Size: 230 KiB |
BIN
porwoll-hero-subline.png
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
porwoll-hero-title.png
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
porwoll-homepage-fixed.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
porwoll-homepage.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
|
|
@ -3,48 +3,75 @@
|
|||
import { motion } from 'framer-motion'
|
||||
import { Button } from '../ui/Button'
|
||||
|
||||
interface CTAButton {
|
||||
text?: string
|
||||
link?: string
|
||||
style?: 'primary' | 'secondary' | 'outline'
|
||||
id?: string
|
||||
}
|
||||
|
||||
interface CTABlockProps {
|
||||
block: Record<string, unknown>
|
||||
block: {
|
||||
headline?: string
|
||||
description?: string
|
||||
buttons?: CTAButton[]
|
||||
backgroundColor?: 'dark' | 'light' | 'accent'
|
||||
}
|
||||
}
|
||||
|
||||
const bgStyles = {
|
||||
dark: 'bg-dark',
|
||||
light: 'bg-light',
|
||||
accent: 'bg-accent',
|
||||
}
|
||||
|
||||
const buttonVariantMap = {
|
||||
primary: 'default' as const,
|
||||
secondary: 'ghost-light' as const,
|
||||
outline: 'ghost-light' as const,
|
||||
}
|
||||
|
||||
export function CTABlock({ block }: CTABlockProps) {
|
||||
const title = (block.headline as string) || (block.title as string) || ''
|
||||
const subtitle = (block.subheadline as string) || (block.subtitle as string) || ''
|
||||
const backgroundMedia = block.backgroundImage as Record<string, unknown> | undefined
|
||||
const backgroundUrl = backgroundMedia?.url as string | undefined
|
||||
const ctaLabel = (block.ctaLabel as string) || (block.buttonText as string) || 'Mehr erfahren'
|
||||
const ctaLink = (block.ctaLink as string) || (block.buttonLink as string) || '#'
|
||||
const { headline, description, buttons, backgroundColor = 'dark' } = block
|
||||
const isDark = backgroundColor === 'dark' || backgroundColor === 'accent'
|
||||
|
||||
return (
|
||||
<section
|
||||
className="relative h-[365px] bg-cover bg-center"
|
||||
style={{
|
||||
backgroundImage: backgroundUrl ? `url(${backgroundUrl})` : undefined,
|
||||
backgroundColor: !backgroundUrl ? '#111' : undefined,
|
||||
}}
|
||||
>
|
||||
{/* Overlay */}
|
||||
<div className="absolute inset-0 bg-dark/50" />
|
||||
|
||||
{/* Content */}
|
||||
<section className={`relative py-20 ${bgStyles[backgroundColor] || bgStyles.dark}`}>
|
||||
<motion.div
|
||||
className="relative pt-[100px] w-full h-full text-center"
|
||||
className="container mx-auto px-4 text-center"
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
whileInView={{ opacity: 1, y: 0 }}
|
||||
viewport={{ once: true }}
|
||||
transition={{ duration: 0.6 }}
|
||||
>
|
||||
<h2 className="font-heading font-bold text-[1.5em] tracking-[8px] uppercase text-white mb-4">
|
||||
{title}
|
||||
{headline && (
|
||||
<h2
|
||||
className={`font-heading font-bold text-[1.5em] tracking-[8px] uppercase mb-4 ${isDark ? 'text-white' : 'text-dark'}`}
|
||||
>
|
||||
{headline}
|
||||
</h2>
|
||||
|
||||
{subtitle && (
|
||||
<p className="text-white/80 mb-8">{subtitle}</p>
|
||||
)}
|
||||
|
||||
<Button href={ctaLink} variant="ghost-light" size="large">
|
||||
{ctaLabel}
|
||||
{description && (
|
||||
<p className={`max-w-2xl mx-auto mb-8 ${isDark ? 'text-white/80' : 'text-gray'}`}>
|
||||
{description}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{buttons && buttons.length > 0 && (
|
||||
<div className="flex flex-wrap justify-center gap-4">
|
||||
{buttons.map((btn, index) => (
|
||||
<Button
|
||||
key={btn.id || index}
|
||||
href={btn.link || '#'}
|
||||
variant={buttonVariantMap[btn.style || 'primary'] || 'default'}
|
||||
size="large"
|
||||
>
|
||||
{btn.text || 'Mehr erfahren'}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
</section>
|
||||
)
|
||||
|
|
|
|||