@php /** * The delivery band - a slowly panning aerial city photo tinted only on the left (behind the copy), * drifting clouds, two small craft sweeping the background at different speeds, and the hero craft * up front. All three craft instances reuse the band's own picture. * * It advertises delivery, so an install that only takes collection must not show it. 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 - the same reasoning as sections/features.php. */ // Two separate questions, so two gates: whether this install delivers at all, and whether the // operator wants the band. if (!\App\Services\Capability::has(\App\Services\Capability::DELIVERY) || !section_on('drone-delivery')) { return; } // Heading, subheading and both pictures are written on Settings -> Business model. What is stored // is what shows: clearing a field removes that part of the band, and clearing all four removes the // band, rather than quietly restoring the wording the product shipped with. $title = trim(t_raw('home.drone.title')); $sub = trim(t_raw('home.drone.sub')); $art = trim(t_raw('home.drone.image')); $bg = trim(t_raw('home.drone.bg')); if ($title === '' && $sub === '' && $art === '' && $bg === '') { return; } $cloudSrc = media('assets/client/banner/drone-cloud.png'); $craftSrc = $art !== '' ? media($art) : ''; // The backdrop is a still by default and a clip if the operator picked one — the same "picture or // footage" field the Partner page's service rows use, told apart by the file itself rather than by // a second switch the operator would have to keep in step with it. $bgIsFilm = $bg !== '' && preg_match('/\.(mp4|webm|ogv)(\?|$)/i', $bg) === 1; @endphp
@if ($bgIsFilm) @php /* Same muted-autoplay treatment the service rows and the hero slider use; playsinline stops iOS hijacking it into a fullscreen player. */ @endphp @elseif ($bg !== '') @endif
@if ($craftSrc !== '') @endif @php // The eyebrow belongs to the heading, so it goes when there are no words to head. @endphp @if ($title !== '' || $sub !== '')
{{ t_raw('home.drone.eyebrow') }} @if ($title !== '')

{{ $title }}

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

{{ $sub }}

@endif
@endif @if ($craftSrc !== '')
{{ t_raw('home.drone.craft_alt') }}
@endif