@extends('layouts.public') @section('content') @php // Which landing page this is: its bands read this page's own switches. \App\Services\HomeSection::rendering('cuisine'); /** * Cuisine-oriented homepage. Cuisine hero slider → boxed/overlap "Browse by food type" → a spotlight * block per top cuisine (flag tile + a rail of that cuisine's shops) → the main-home sections → * the maintained sections. Reuses the same partials as the marketplace home; only the data and a * couple of column counts differ, and those live in HomeSection with the rest of the declaration. * * The bands draw in whatever order the operator arranged in Admin → Pages. Featured, Popular * restaurants and Popular dishes used to be DEFERRED closures dropped in between the cuisine blocks, * one after each; they are ordinary bands now. Interleaving them made those three sections * unarrangeable — their position was a function of how many cuisines had shops that day, so the * editor could not honestly show where they were, and dragging them did nothing. * * The cuisine spotlight stays here: it repeats per cuisine with its own card partials, so it is this * page's own work rather than a shared band drawn a little differently. * * @var array $cuisineBlocks @var array $featured @var array $collections @var array $popular * @var array $stats @var array $deals @var array $posts @var array $testimonials */ $cuisineBlocks = $cuisineBlocks ?? []; // The first block is drawn full size and the rest compact, which is what the interleaved run did. $spotlight = static function () use ($cuisineBlocks, $__env): string { $out = ''; foreach ($cuisineBlocks as $i => $b) { $cz = $b['cuisine']; $out .= partial('sections/spotlight-block', [ 'compact' => $i > 0, 'cardPartial' => 'cards/cuisine-flag-card', 'cardVars' => ['cuisine' => $cz, 'dishes' => $b['dishes']], 'items' => $b['shops'], 'railCard' => 'cards/restaurant', 'railCardKey' => 'r', 'title' => t_raw('home.cuisine.spotlight_title', [':name' => (string) ($cz['name'] ?? '')]), 'eyebrow' => t_raw('home.cuisine.now_serving'), 'eyebrowIcon' => 'fa-utensils', 'sub' => t_raw('home.cuisine.spotlight_sub', [':name' => (string) ($cz['name'] ?? '')]), 'viewAllUrl' => url('/restaurants?cuisine=' . e((string) ($cz['slug'] ?? ''))), ]); } return $out; }; echo \App\Services\HomeSection::draw('cuisine', get_defined_vars(), ['spotlight-block' => $spotlight]); @endphp @endsection