diff --git a/src/components/blocks/ImageTextBlock.tsx b/src/components/blocks/ImageTextBlock.tsx index aeed857..4d405a5 100644 --- a/src/components/blocks/ImageTextBlock.tsx +++ b/src/components/blocks/ImageTextBlock.tsx @@ -17,8 +17,9 @@ export function ImageTextBlock({ block }: ImageTextBlockProps) { const imageUrl = (media?.url as string) || '' const imageAlt = (media?.alt as string) || title const imagePosition = (block.imagePosition as string) || 'left' - const ctaLabel = (block.ctaLabel as string) || (block.buttonText as string) || '' - const ctaLink = (block.ctaLink as string) || (block.buttonLink as string) || '' + const cta = block.cta as Record | undefined + const ctaLabel = (cta?.text as string) || (block.ctaLabel as string) || '' + const ctaLink = (cta?.link as string) || (block.ctaLink as string) || '' const backgroundColor = (block.backgroundColor as string) || 'light' const isImageLeft = imagePosition === 'left' diff --git a/src/components/blocks/QuoteBlock.tsx b/src/components/blocks/QuoteBlock.tsx index ca10c23..c0fa47a 100644 --- a/src/components/blocks/QuoteBlock.tsx +++ b/src/components/blocks/QuoteBlock.tsx @@ -1,6 +1,7 @@ 'use client' import { motion } from 'framer-motion' +import Image from 'next/image' interface QuoteBlockProps { block: Record @@ -10,14 +11,25 @@ export function QuoteBlock({ block }: QuoteBlockProps) { const quote = (block.quote as string) || (block.text as string) || '' const author = (block.author as string) || (block.attribution as string) || '' const role = (block.role as string) || '' - const backgroundMedia = block.backgroundImage as Record | undefined - const backgroundUrl = backgroundMedia?.url as string | undefined - const style = (block.style as string) || (backgroundUrl ? 'parallax' : 'simple') + const media = block.image as Record | undefined + const imageUrl = (media?.url as string) || '' + const imageAlt = (media?.alt as string) || author + const style = (block.style as string) || 'simple' - if (style === 'simple') { + // Style "with-image": Autor mit Bild + if (style === 'with-image' && imageUrl) { return (
+
+ {imageAlt} +
“{quote}”
@@ -36,36 +48,50 @@ export function QuoteBlock({ block }: QuoteBlockProps) { ) } + // Style "highlighted": Hervorgehobenes Zitat mit dunklem Hintergrund + if (style === 'highlighted') { + return ( +
+ + {/* Quote Icon */} + + + {/* Quote */} +
+ “{quote}” +
+ + {/* Author */} +
+ + {author} + + {role && ( + + {role} + + )} +
+
+
+ ) + } + + // Default: Style "simple" return ( -
- {/* Overlay */} -
- - {/* Content */} - - {/* Quote Icon */} - - - {/* Quote */} -
+
+
+
“{quote}”
- - {/* Author */} - +
) }