@php /** * The "why us" value-prop trio that sits directly above the delivery band. * * All three cards sell delivery - fast delivery, tracking the driver to your doorstep, and paying * cash on delivery - so on an install that does not deliver this band advertises a service the site * cannot perform. Gated here rather than at the five homepage layouts that include it, so a sixth * layout cannot reintroduce it by being copied from an older one. */ // Two separate questions, so two gates: whether this install delivers at all, and whether the // operator wants the band. A platform that delivers may still not want to advertise it here. if (!\App\Services\Capability::has(\App\Services\Capability::DELIVERY) || !section_on('features')) { return; } // Heading, subheading and all three cards are written on Settings -> Business model. What is stored // is what shows: a card whose icon, heading and text are all blank is a card the operator has taken // off the band, and a band with nothing left in it does not render at all. $eyebrow = trim(t_raw('home.features.eyebrow', [':site' => setting('site_name', 'QuickMunch')])); $heading = trim(t_raw('home.features.title')); $sub = trim(t_raw('home.features.sub')); $features = []; for ($fN = 1; $fN <= 3; $fN++) { $card = [ trim(t_raw('home.features.f' . $fN . '_icon')), trim(t_raw('home.features.f' . $fN . '_title')), trim(t_raw('home.features.f' . $fN . '_text')), ]; if ($card[0] !== '' || $card[1] !== '' || $card[2] !== '') { $features[] = $card; } } if (!$features && $heading === '' && $sub === '' && $eyebrow === '') { return; } @endphp
@if ($eyebrow !== '' || $heading !== '' || $sub !== '')
@if ($eyebrow !== ''){{ $eyebrow }}@endif @if ($heading !== '')

{{ $heading }}

@endif @if ($sub !== '')

{{ $sub }}

@endif
@endif
@foreach ($features as [$icon, $title, $text])
@if ($icon !== ''){!! icon_html($icon, '') !!}@endif @if ($title !== '')

{{ $title }}

@endif @if ($text !== '')

{{ $text }}

@endif
@endforeach