{{-- Homepage banner slider (400 px on desktop). Slides come from Admin > Marketing > Banners (placement "home_hero"): each is a designed image (text position "No text") or an image with a caption on top. Until an admin banner exists, two built-in colour slides are shown instead. The app download slide (partials/app-slide) is always last. --}} @php $banners = \App\Modules\Marketing\Models\Banner::for('home_hero'); $slides = $banners->map(fn ($b) => [ 'banner' => true, 'title' => $b->title, 'image' => $b->desktopUrl(), 'mobile' => $b->image_mobile ? $b->mobileUrl() : null, 'link' => $b->link, 'caption' => $b->text_position !== 'none', 'position' => $b->text_position, 'theme' => $b->theme, 'eyebrow' => $b->eyebrow, 'subtitle' => $b->subtitle, 'button' => $b->button_text, ])->all(); if ($slides === []) { $slides = [ [ 'tone' => 'charcoal', 'title' => 'Cement, steel and sand for every site', 'box' => ['BULK', 'SAVINGS'], 'line' => 'Bigger orders, better prices', 'chip' => 'Pick your delivery date', 'link' => route('category.show', 'steel-tmt'), 'photos' => ['images/photos/rebar.webp', 'images/photos/sand.webp', 'images/photos/bricks.webp'], ], [ 'tone' => 'red', 'title' => 'Waterproof before the monsoon', 'box' => ['MONSOON', 'READY'], 'line' => 'Coatings, primers and putty', 'chip' => 'Roofs, bathrooms and tanks', 'link' => route('category.show', 'paints-waterproofing'), 'photos' => ['images/photos/waterproof.webp', 'images/photos/roller.webp', 'images/photos/paint-shelf.webp'], ], ]; } $slides[] = ['app' => true]; @endphp