mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-18 00:24:10 +00:00
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>
145 lines
3.4 KiB
TypeScript
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' },
|
|
],
|
|
},
|
|
],
|
|
}
|