@extends('layouts.public') @section('content') @php // Which landing page this is: its bands read this page's own switches. \App\Services\HomeSection::rendering('restaurant'); /** * Restaurant-oriented homepage. Restaurant hero slider → "Browse by food type" (overlapping the * hero) → a spotlight block per featured shop (a compact shop card on the left + a dense rail of * that shop's dishes on the right, ~5 visible) kept consecutive → Popular dishes → the maintained * sections. Same partials as the marketplace home; only the data differs (the rail carries dish * cards instead of restaurant cards). * * Every band is declared in HomeSection and drawn in whatever order the operator arranged, except * the spotlight: it repeats per featured restaurant with its own card partials, so the run stays * here and is passed in as this page's own work. The arrangement moves the whole run, which is what * "one instance per section" means for a band like this. * * @var array $shopBlocks @var array $popular @var array $stats @var array $deals * @var array $posts @var array $testimonials */ $spotlight = static function () use ($shopBlocks, $__env): string { $out = ''; foreach (($shopBlocks ?? []) as $i => $b) { $sh = $b['shop']; $out .= partial('sections/spotlight-block', [ 'compact' => $i > 0, 'cardPartial' => 'cards/shop-spotlight', 'cardVars' => ['r' => $sh], 'cardCols' => 'col-lg-3 col-md-4', 'railCols' => 'col-lg-9 col-md-8', 'railClass' => 'qm-rail-dense', 'items' => $b['items'], 'railCard' => 'cards/popular-dish', 'railCardKey' => 'item', 'railCardVars' => ['showRestaurant' => false], 'title' => t_raw('home.restaurant.popular_at', [':name' => (string) ($sh['name'] ?? '')]), 'eyebrow' => t_raw('home.restaurant.eyebrow'), 'eyebrowIcon' => 'fa-fire', 'sub' => t_raw('home.restaurant.sub', [':name' => (string) ($sh['name'] ?? '')]), 'viewAllUrl' => url('/restaurant/' . e((string) ($sh['slug'] ?? ''))), 'viewAllLabel' => t_raw('home.restaurant.view_menu'), ]); } return $out; }; echo \App\Services\HomeSection::draw('restaurant', get_defined_vars(), ['spotlight-block' => $spotlight]); @endphp @endsection