@php $cards = $data['cards'] ?? []; $count = count($cards); $sectionBg = $data['background_color'] ?? '#f8f9fa'; // Calcula a largura da coluna baseada no número de cards $colClass = 'col-md-12'; if ($count == 2) { $colClass = 'col-md-6'; } elseif ($count >= 3) { $colClass = 'col-md-4'; } $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
@foreach($cards as $card) @php $titleColor = $card['title_color'] ?? '#333333'; $subtitleColor = $card['subtitle_color'] ?? '#888888'; $textColor = $card['text_color'] ?? '#666666'; $cardBg = $card['background_color'] ?? '#ffffff'; @endphp
@if(!empty($card['subtitle'])) {{ $card['subtitle'] }} @endif

{{ $card['title'] }}

{!! $renderText($card['content'] ?? '') !!}
@endforeach