@extends('layouts.public') @section('content') @php // Which landing page this is: its bands read this page's own switches. \App\Services\HomeSection::rendering('hungry'); /** * "Hungry" homepage — a dense mix of everything: craving chips → appetite-driven hero → "Browse by * food type" → trending rail → spotlights (cuisine blocks, then restaurant blocks) → browse-by- * cuisine → featured → popular dishes → popular restaurants → deals → the maintained sections. * Built from the shared bands declared in HomeSection; the density comes from tighter column counts, * which are declared there too. * * The bands draw in whatever order the operator arranged in Admin → Pages. The spotlight appears * ONCE: this page used to draw two separate runs — cuisine blocks above the browse-by-cuisine * carousel and restaurant blocks below it — and one instance per section per page cannot hold two * positions, so both runs are emitted together by a single band. It stays in this file because it is * this page's own arrangement of two card partials, not a shared band drawn differently. * * @var array $cuisineBlocks @var array $shopBlocks @var array $cuisines @var array $featured * @var array $trending @var array $collections @var array $popular @var array $cravingTags * @var array $stats @var array $deals @var array $posts @var array $testimonials */ $spotlight = static function () use ($cuisineBlocks, $shopBlocks, $__env): string { $out = ''; foreach (($cuisineBlocks ?? []) as $b) { $cz = $b['cuisine']; $out .= partial('sections/spotlight-block', [ 'compact' => true, 'cardPartial' => 'cards/cuisine-flag-card', 'cardVars' => ['cuisine' => $cz, 'dishes' => $b['dishes']], 'items' => $b['shops'], // The name goes in RAW. card-rail escapes the finished heading itself, so pre-escaping // it here escaped it twice and a cuisine or shop written with an apostrophe printed its // entity — "Joe's" — in the rail head. The other two layouts always passed it raw. 'title' => t_raw('home.cuisine.spotlight_title', [':name' => (string) ($cz['name'] ?? '')]), 'eyebrow' => t_raw('home.cuisine.now_serving'), 'eyebrowIcon' => 'fa-utensils', 'viewAllUrl' => url('/restaurants?cuisine=' . e((string) ($cz['slug'] ?? ''))), ]); } foreach (($shopBlocks ?? []) as $b) { $sh = $b['shop']; $out .= partial('sections/spotlight-block', [ 'compact' => true, '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.on_the_menu'), 'eyebrowIcon' => 'fa-fire', 'viewAllUrl' => url('/restaurant/' . e((string) ($sh['slug'] ?? ''))), 'viewAllLabel' => t_raw('home.restaurant.view_menu_cta'), ]); } return $out; }; echo \App\Services\HomeSection::draw('hungry', get_defined_vars(), ['spotlight-block' => $spotlight]); @endphp @endsection