@php /** * Reusable horizontal card rail — the single source for "Trending this week" and the * cuisine / restaurant spotlight sliders. Same .qm-carousel / .qm-rail markup as before * (prev/next handled by the shared [data-carousel] handler in app.js), so any change to * the rail or its cards applies to every page that uses it. Pass any card partial + items. * * @var array $items rows to render * @var string $card card partial name (default 'cards/restaurant') * @var string $cardKey the variable key the card partial expects (default 'r') * @var string $title heading * @var string $eyebrow small eyebrow label * @var string $eyebrowIcon FontAwesome class for the eyebrow icon (optional) * @var string $sub sub-line under the heading (optional) * @var string $viewAllUrl "View all" link (optional) * @var string $viewAllLabel link label (defaults to the translated "View all") * @var bool $autoplay add data-trending so home.js gently auto-scrolls it (default false) * @var bool $compact drop the top padding when this rail stacks under another block * @var bool $bare render only the .qm-carousel (no section/container) so it can be * embedded inside a column (e.g. a spotlight block) * @var array $cardExtraVars extra static vars merged into every card call alongside the * per-item $cardKey var (e.g. suppressing a card's own restaurant * tag when the whole rail is already scoped to one restaurant) */ $items = collect($items ?? [])->all(); // accepts an array or a collection if (empty($items)) { return; } $bare = !empty($bare); $card = $card ?? 'cards/restaurant'; $cardKey = $cardKey ?? 'r'; $cardExtraVars = $cardExtraVars ?? []; $title = $title ?? t_raw('home.trending.title'); $eyebrow = $eyebrow ?? ''; $eyebrowIcon = $eyebrowIcon ?? ''; $sub = $sub ?? ''; $viewAllUrl = $viewAllUrl ?? ''; $viewAllLabel = $viewAllLabel ?? t('common.view_all'); $secClass = 'qm-section' . (!empty($compact) ? ' pt-0' : ''); $ap = !empty($autoplay) ? ' data-trending' : ''; $apTrack = !empty($autoplay) ? ' data-trending-track' : ''; $railClass = (string) ($railClass ?? ''); // extra class on the carousel (e.g. 'qm-rail-dense') @endphp @if (!$bare)
@endif
@if ($eyebrow !== '')@if ($eyebrowIcon !== '') @endif{!! $eyebrow !!}@endif

{!! $title !!}

@if ($sub !== '')

{!! $sub !!}

@endif
@if ($viewAllUrl !== ''){!! $viewAllLabel !!}@endif @partial('sections/carousel-nav')
@if (!$bare)
@endif