{{-- Card Grid Layout Expects $section and $content. Content fields: - title (section title, optional) - title_tag (optional, defaults to 'h2') - subtitle (section subtitle, optional) - items (required array of card data) Each item in 'items' can have: - item_image_url (optional) - item_image_alt (optional) - item_icon_class (optional, e.g., 'fas fa-check text-green-500') - item_title (required) - item_description (optional) - item_link (optional) - item_link_text (optional, defaults to 'Learn More') - grid_cols_sm (optional, defaults to 'grid-cols-1') - grid_cols_md (optional, defaults to 'md:grid-cols-2') - grid_cols_lg (optional, defaults to 'lg:grid-cols-3') - card_bg_color (optional, defaults to 'bg-white dark:bg-gray-800') - card_text_color (optional, defaults to 'text-gray-700 dark:text-gray-200') - card_shadow (optional, defaults to 'shadow-lg hover:shadow-xl') --}} @php $titleTag = $content['title_tag'] ?? 'h2'; $gridColsSm = $content['grid_cols_sm'] ?? 'grid-cols-1'; $gridColsMd = $content['grid_cols_md'] ?? 'md:grid-cols-2'; $gridColsLg = $content['grid_cols_lg'] ?? 'lg:grid-cols-3'; $cardBgColor = $content['card_bg_color'] ?? 'bg-white dark:bg-slate-800'; // Adjusted for consistency $cardTextColor = $content['card_text_color'] ?? 'text-slate-700 dark:text-slate-200'; $cardShadow = $content['card_shadow'] ?? 'shadow-lg hover:shadow-xl'; @endphp
@if(!empty($content['title'])) <{{ $titleTag }} class="text-3xl md:text-4xl font-bold {{ $content['title_align'] ?? 'text-center' }} mb-4">{{ $content['title'] }} @endif @if(!empty($content['subtitle']))

{{ $content['subtitle'] }}

@endif @if(!empty($content['items']) && is_array($content['items']))
@foreach($content['items'] as $item)
@if(!empty($item['item_image_url'])) {{ $item['item_image_alt'] ?? $item['item_title'] ?? '' }} @elseif(!empty($item['item_icon_class']))
@endif

{{ $item['item_title'] ?? 'Card Title' }}

@if(!empty($item['item_description']))

{{ $item['item_description'] }}

@endif @if(!empty($item['item_link'])) @endif
@endforeach
@endif