cms.c2sgmbh/src/blocks/ProcessStepsBlock.ts
Martin Porwoll 95c9d2a4bc feat: add content blocks and global settings
Blocks for page builder:
- HeroBlock: hero sections with CTA
- TextBlock: rich text content
- ImageTextBlock: image with text layout
- CardGridBlock: grid of cards
- CTABlock: call-to-action sections
- QuoteBlock: testimonial quotes
- VideoBlock: embedded videos
- DividerBlock: visual separators
- ContactFormBlock: contact forms
- NewsletterBlock: newsletter signup
- ProcessStepsBlock: step-by-step processes
- TimelineBlock: timeline displays
- TestimonialsBlock: testimonial carousels
- PostsListBlock: blog post listings

Globals:
- Navigation: site navigation structure
- SiteSettings: general site configuration
- SEOSettings: default SEO settings per tenant

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 08:19:15 +00:00

145 lines
3.4 KiB
TypeScript

import type { Block } from 'payload'
/**
* Process Steps Block
* Zeigt Prozess-Schritte / "So funktioniert es"
*/
export const ProcessStepsBlock: Block = {
slug: 'process-steps-block',
labels: {
singular: 'Prozess/Schritte',
plural: 'Prozess/Schritte',
},
fields: [
{
name: 'title',
type: 'text',
defaultValue: 'So funktioniert es',
label: 'Überschrift',
localized: true,
},
{
name: 'subtitle',
type: 'text',
label: 'Untertitel',
localized: true,
},
{
name: 'layout',
type: 'select',
defaultValue: 'horizontal',
label: 'Layout',
options: [
{ label: 'Horizontal (nebeneinander)', value: 'horizontal' },
{ label: 'Vertikal (untereinander)', value: 'vertical' },
{ label: 'Alternierend (Zickzack)', value: 'alternating' },
{ label: 'Mit Verbindungslinien', value: 'connected' },
{ label: 'Timeline-Stil', value: 'timeline' },
],
},
{
name: 'showNumbers',
type: 'checkbox',
defaultValue: true,
label: 'Schritt-Nummern anzeigen',
},
{
name: 'showIcons',
type: 'checkbox',
defaultValue: true,
label: 'Icons anzeigen',
},
{
name: 'steps',
type: 'array',
label: 'Schritte',
minRows: 2,
maxRows: 10,
fields: [
{
name: 'title',
type: 'text',
required: true,
label: 'Schritt-Titel',
localized: true,
},
{
name: 'description',
type: 'textarea',
label: 'Beschreibung',
localized: true,
},
{
name: 'icon',
type: 'text',
label: 'Icon',
admin: {
description: 'Emoji oder Icon-Name (z.B. "📞", "✓", "1")',
},
},
{
name: 'image',
type: 'upload',
relationTo: 'media',
label: 'Bild (optional)',
},
],
},
{
name: 'cta',
type: 'group',
label: 'Call-to-Action',
fields: [
{
name: 'show',
type: 'checkbox',
defaultValue: false,
label: 'CTA anzeigen',
},
{
name: 'label',
type: 'text',
defaultValue: 'Jetzt starten',
label: 'Button-Text',
localized: true,
admin: {
condition: (data, siblingData) => siblingData?.show,
},
},
{
name: 'href',
type: 'text',
label: 'Link',
admin: {
condition: (data, siblingData) => siblingData?.show,
},
},
{
name: 'variant',
type: 'select',
defaultValue: 'default',
label: 'Button-Stil',
options: [
{ label: 'Standard', value: 'default' },
{ label: 'Ghost', value: 'ghost' },
{ label: 'Light', value: 'light' },
],
admin: {
condition: (data, siblingData) => siblingData?.show,
},
},
],
},
{
name: 'backgroundColor',
type: 'select',
defaultValue: 'white',
label: 'Hintergrund',
options: [
{ label: 'Weiß', value: 'white' },
{ label: 'Hell (Grau)', value: 'light' },
{ label: 'Dunkel', value: 'dark' },
],
},
],
}