{{-- Layout Preview Partial - Content Only (CSS loaded in iframe) --}} {{-- This content will be injected into an iframe for complete style isolation --}} @php $hideHeader = in_array($layout->card_type, ['informational', 'info', 'info-r', 'info-rl', 'info-m', 'informational_right', 'informational_mixed', 'informational right', 'informational mixed', 'dwnldsatu', 'dwnlddua', 'dwnldlogo']); @endphp {{-- Preview without wrapper - clean layout for iframe --}}
@if (!$hideHeader)

{{ $layout->header }}

@if ($layout->description)

{!! $layout->description !!}

@endif @endif {{-- KONTEN --}} @if ($contents->count() > 0) @php $cardsPerRow = $layout->number_of_card_per_row; $gridClass = 'one-column-grid'; // Untuk card type guideline, selalu gunakan 4 kolom if ($layout->card_type === 'guideline') { $gridClass = 'four-column-grid'; } elseif ($layout->card_type === 'dwnldlogo') { // Download logo always uses 3 columns $gridClass = 'download-logo-grid'; } else { if ($cardsPerRow == 2) { $gridClass = 'two-column-grid'; } if ($cardsPerRow == 3) { $gridClass = 'three-column-grid'; } if ($cardsPerRow == 4) { $gridClass = 'four-column-grid'; } } @endphp {{-- Special handling for download logo card type --}} @if ($layout->card_type === 'dwnldlogo')

{{ $layout->header }}

@if ($layout->description)

{!! $layout->description !!}

@endif
@foreach ($contents as $content)
{{ $content->header }}

{{ $content->header }}

@if ($content->description)
{!! $content->description !!}
@endif @php $downloadLinks = $content->links; $totalLinks = $downloadLinks->count(); @endphp
@endforeach
@elseif ($layout->card_type === 'dwnldsatu') {{-- Special handling for dwnldsatu: left section (header/desc) + right section (content cards in 1 column) --}} @foreach ($contents as $content)
@if ($loop->first)

{{ $layout->header }}

{!! $layout->description !!}

@endif
{{ $content->header }}

{{ $content->header }}

@if ($content->description)
{!! $content->description !!}
@endif
@php $downloadLinks = $content->links; $totalLinks = $downloadLinks->count(); @endphp
@endforeach @elseif ($layout->card_type === 'dwnlddua') {{-- Special handling for dwnlddua: left section (header/desc) + right section (content cards in 2 column grid) --}}

{{ $layout->header }}

{!! $layout->description !!}

@foreach ($contents as $content)
{{ $content->header }}

{{ $content->header }}

@if ($content->description)
{!! $content->description !!}
@endif
@php $downloadLinks = $content->links; $totalLinks = $downloadLinks->count(); @endphp
@endforeach
@elseif ($layout->card_type === 'slider') {{-- Slider - Each card shows thumbnail + link images as slides --}} @else @endif @else

No content available for this layout.

@endif
{{-- End preview container --}}