@extends('frontend.layouts.template-base') @section('meta_tags') @include('frontend.layouts.meta-tags', ['title' => 'Chotekisan', 'page' => 'Deals']) @endsection @section('styles') @endsection @section('content') @php $dealsSections = collect($dealsSections ?? []); $dealsBannersByPosition = collect($dealsBannersByPosition ?? []); $dealsCategoryUrl = route('frontend.category', array_filter(['category_id' => $dealsCategory?->id ?? null])); // Admin-managed hero (System Settings → Deals Page). WebsiteDealsService // fills every key from the launch design when it hasn't been customised. $hero = $dealsHero ?? []; $heroCtaUrl = ($hero['button_url'] ?? '') ?: $dealsCategoryUrl; @endphp {{-- Deals Section Banner start --}} {{-- The two leaf files are a mirrored pair: hero-leaf2 is anchored at its top-left with the fronds fanning right, hero-leaf1 the reverse. Placed on the matching corner each one needs no CSS flip. --}} @if (!empty($hero['leaf_left'])) @endif @if (!empty($hero['leaf_right'])) @endif @if (!empty($hero['image_left'])) @endif @if (!empty($hero['image_right'])) @endif @if (!empty($hero['pill_text'])) {{ $hero['pill_text'] }} @endif @if (!empty($hero['title']) || !empty($hero['highlight'])) {{ $hero['title'] ?? '' }} @if (!empty($hero['highlight'])) {{ $hero['highlight'] }} @endif @endif @if (!empty($hero['description'])) @foreach ($hero['description'] as $heroLine) {{ $heroLine }}@if (!$loop->last)@endif @endforeach @endif @if (!empty($hero['button_text'])) {{ $hero['button_text'] }} @endif {{-- Deals Section Banner end --}} @if (!$dealsLoadError && ($dealsSections->isNotEmpty() || $dealsBannersByPosition->isNotEmpty())) @foreach ($dealsSections as $dealsSectionIndex => $dealsSection) @foreach ($dealsBannersByPosition->get($dealsSectionIndex, collect()) as $dealsBanner) @include('frontend.components.home-sections.poster', ['section' => (object) ['banners' => collect([$dealsBanner]), 'background_image' => null]]) @endforeach @if ($dealsSection->hasRenderableContent()) @endif @endforeach @foreach ($dealsBannersByPosition->get($dealsSections->count(), collect()) as $dealsBanner) @include('frontend.components.home-sections.poster', ['section' => (object) ['banners' => collect([$dealsBanner]), 'background_image' => null]]) @endforeach @endif @endsection @section('scripts') @endsection
@foreach ($hero['description'] as $heroLine) {{ $heroLine }}@if (!$loop->last)@endif @endforeach