@php $limit = max(1, (int) ($s['limit'] ?? 3)); $posts = \App\Models\Post::query()->published()->latest('published_at')->limit($limit)->get(); $style = $s['style'] ?? 'cream'; $sectionClass = match ($style) { 'sand' => 'section bg-sand', 'white' => 'section bg-white', 'dark' => 'section bg-ink', default => 'section', }; @endphp @if ($posts->isNotEmpty())
@include('pages.blocks.partials.head', [ 'eyebrow' => $block->text('eyebrow'), 'title' => $block->text('title'), 'linkLabel' => $block->text('link_label'), 'linkUrl' => route('blog'), ])
@foreach ($posts as $post) @include('partials.post-card', ['post' => $post]) @endforeach
@endif