@php // Switched off in Admin -> Pages: the band does not draw, on any layout that includes it. if (!section_on('spotlight-block')) { return; } /** * Spotlight row — a feature card on the left + a horizontal rail of related items on the * right. Drives the cuisine spotlights (flag card + that cuisine's shops) and the restaurant * spotlights (shop card + that shop's dishes). The rail reuses card-rail (bare mode), so the * slider stays single-sourced and any card change propagates everywhere. * * @var string $cardPartial left card partial (e.g. 'cards/cuisine-flag-card') * @var array $cardVars vars for the left card * @var array $items rail items (nothing renders if empty) * @var string $railCard rail card partial (default 'cards/restaurant') * @var string $railCardKey rail card var key (default 'r') * @var string $title,$eyebrow,$eyebrowIcon,$sub,$viewAllUrl rail head bits * @var string $cardCols left column classes (default 'col-lg-3 col-md-4') * @var string $railCols right column classes (default 'col-lg-9 col-md-8') * @var bool $compact drop the section top padding * @var array $railCardVars extra static vars passed to every rail card (e.g. suppressing a * dish card's own restaurant tag when the rail is one shop's menu) */ $items = collect($items ?? [])->all(); // accepts an array or a collection if (empty($items)) { return; } $cardCols = $cardCols ?? 'col-lg-3 col-md-4'; $railCols = $railCols ?? 'col-lg-9 col-md-8'; $secClass = 'qm-spotlight-sec qm-section' . (!empty($compact) ? ' pt-0' : ''); @endphp
@partial($cardPartial, $cardVars ?? [])
@partial('sections/card-rail', [ 'bare' => true, 'items' => $items, 'card' => $railCard ?? 'cards/restaurant', 'cardKey' => $railCardKey ?? 'r', 'title' => $title ?? '', 'eyebrow' => $eyebrow ?? '', 'eyebrowIcon' => $eyebrowIcon ?? '', 'sub' => $sub ?? '', 'viewAllUrl' => $viewAllUrl ?? '', 'viewAllLabel' => $viewAllLabel ?? null, 'railClass' => $railClass ?? '', 'cardExtraVars' => $railCardVars ?? [], ])