@php $title = $section['parameters']['title'] ?? ''; $subtitle = $section['parameters']['subtitle'] ?? ''; $text = $section['parameters']['text'] ?? ''; $backgroundColor = $section['parameters']['background_color'] ?? '#ffffff'; $textColor = $section['parameters']['text_color'] ?? 'dark'; $backgroundImageUrl = $section['parameters']['background_image_url'] ?? null; $textClass = ($textColor == 'light') ? 'text-white' : 'text-dark'; $style = "background-color: $backgroundColor;"; if ($backgroundImageUrl) { $style .= "background-image: url('$backgroundImageUrl'); background-size: cover; background-position: center;"; } $renderText = function($text) { if (is_string($text) && (strpos($text, '{"type"') === 0 || strpos($text, '{"content"') === 0)) { return app(\V2\Services\ContentRichEditor\Services\ContentRichEditorRendererService::class)->toHtml($text); } return $text; }; @endphp
@if($title || $subtitle)
@if($subtitle)

{{ $subtitle }}

@endif @if($title)

{{ $title }}

@endif
@endif
{!! $renderText($text) !!}