@php $splitBody = function (string $body): array { $parts = preg_split('/(?<=[.۔])\s+/u', $body, 2) ?: [$body]; return [ 'lead' => count($parts) > 1 ? $parts[0] : null, 'rest' => $parts[1] ?? $body, ]; }; $welcome = $splitBody(__('home.about.body')); $profile = $splitBody(__('home.profile.body')); $plant = $splitBody(__('home.plant_note')); $panels = [ [ 'label' => filled(__('home.about.label')) ? __('home.about.label') : __('home.about.heading'), 'heading' => __('home.about.heading'), 'lead' => $welcome['lead'], 'rest' => $welcome['rest'], 'image' => 'images/about/about-1.jpg', 'width' => 1600, 'height' => 792, ], [ 'label' => filled(__('home.profile.label')) ? __('home.profile.label') : __('home.profile.heading'), 'heading' => __('home.profile.heading'), 'lead' => $profile['lead'], 'rest' => $profile['rest'], 'image' => 'images/about/about-2.jpg', 'width' => 850, 'height' => 567, ], [ 'label' => __('common.plant_marker'), 'heading' => __('common.plant_marker'), 'lead' => $plant['lead'], 'rest' => $plant['rest'], 'image' => 'images/about/about-3.jpg', 'width' => 850, 'height' => 567, ], ]; @endphp
{{-- Tabs sit in the top-start notch of the photo. --}}
@foreach ($panels as $index => $panel) @endforeach
{{-- One continuous photo, clipped to the notched outline by about-shape.js. --}}
@foreach ($panels as $index => $panel)
@endforeach
{{-- Copy sits in the top-end notch (white area), never on the photo. --}}
@foreach ($panels as $index => $panel)
@if ($index === 0 && filled(__('home.about.label')))

{{ __('home.about.label') }}

@endif @if ($index === 0)

{{ $panel['heading'] }}

@else

{{ $panel['heading'] }}

@endif

@if ($panel['lead']){{ $panel['lead'] }} @endif{{ $panel['rest'] }}

@endforeach
{{-- Aisha Steel's own mark in the bottom-start notch (decorative). --}} {{-- Marks sit in the bottom-end notch. --}}
{{ __('home.products.items.cold-rolled-coils') }} {{ __('home.products.items.galvanized-coils') }}