@php $locale = $locale ?? app()->getLocale(); // Field-name compatibility (Classic → Golden fallbacks). $eyebrow = $data['eyebrow'][$locale] ?? $data['subheading'][$locale] ?? ''; $heading = $data['heading'][$locale] ?? ''; $description = $data['description'][$locale] ?? ''; $phoneGreeting = $data['phone_greeting'][$locale] ?? __('Good evening'); $phoneName = $data['phone_name'] ?? 'Mr. Whitlock'; $phoneBalance = $data['phone_balance'] ?? '$ 248,310.06'; $phoneItems = $data['phone_portfolio'] ?? [ ['label' => 'Yield · Sovereign', 'sub' => '+ 12.50% APY', 'value' => '$94,200'], ['label' => 'Gold Allocation', 'sub' => '+ 2.1% MTD', 'value' => '$54,180'], ['label' => 'Cash · USD', 'sub' => 'Liquid', 'value' => '$28,400'], ]; $renderedHeading = preg_replace_callback('/__(.+?)__/u', function ($m) { return ''.e($m[1]).''; }, e($heading)); $leftItems = $repeatedContents->slice(0, 3); $rightItems = $repeatedContents->slice(3, 3); // Resolve a triptych blurb's icon, title and text from either Golden or // Classic field names. Classic stores `feature_icon` as an image path; if // only that is present we emit it as , otherwise we emit the FA class. $gdkResolveBlurb = function (array $rc, string $locale): array { $title = $rc['spfeat_title'][$locale] ?? $rc['feature_title'][$locale] ?? ''; $text = $rc['spfeat_text'][$locale] ?? $rc['feature_text'][$locale] ?? ''; $icon = $rc['spfeat_icon_class'] ?? null; $image = null; if (! $icon && ! empty($rc['feature_icon'])) { $candidate = $rc['feature_icon']; if (is_string($candidate) && str_contains($candidate, '/')) { $image = $candidate; } else { $icon = $candidate; } } return [ 'title' => $title, 'text' => $text, 'icon' => $icon ?? 'fa-solid fa-fingerprint', 'image' => $image, ]; }; @endphp
@if($eyebrow)
{{ $eyebrow }}
@endif @if($heading)

{!! $renderedHeading !!}

@endif @if($description)

{!! nl2br(e($description)) !!}

@endif
{{-- Left column --}}
@foreach($leftItems as $repeatedContent) @php $b = $gdkResolveBlurb($repeatedContent->content_data ?? [], $locale); @endphp @if($b['title'] || $b['text'])
@if($b['image']) @else @endif

{{ $b['title'] }}

{!! nl2br(e($b['text'])) !!}

@endif @endforeach
{{-- Centre: phone mockup --}} {{-- Right column --}}
@foreach($rightItems as $repeatedContent) @php $b = $gdkResolveBlurb($repeatedContent->content_data ?? [], $locale); @endphp @if($b['title'] || $b['text'])
@if($b['image']) @else @endif

{{ $b['title'] }}

{!! nl2br(e($b['text'])) !!}

@endif @endforeach