@extends('frontend.layouts.app') @section('title', (($about->seo_title ?: $about->banner_title) ?: 'About Us').' | Attrarre Livings') @section('meta-description', $about->seo_description ?? '') @section('content') @php $img = fn (?string $path) => $path ? asset_image($path) : ''; $paras = function (?string $text) { $parts = preg_split("/\n\s*\n/", (string) $text) ?: []; return array_values(array_filter(array_map('trim', $parts))); }; $richHtml = function (?string $text) use ($paras) { $text = trim((string) $text); if ($text === '') { return ''; } if (str_contains($text, '<')) { return $text; } return collect($paras($text))->map(fn ($para) => '

'.e($para).'

')->implode(''); }; $works = collect([1, 2, 3])->map(fn ($i) => (object) [ 'icon' => $about->{"work_{$i}_icon"} ?? null, 'title' => $about->{"work_{$i}_title"} ?? null, 'description' => $about->{"work_{$i}_description"} ?? null, ])->filter(fn ($w) => filled($w->title) || filled($w->description) || filled($w->icon)); $stats = collect([1, 2, 3, 4])->map(fn ($i) => (object) [ 'value' => $about->{"stat_{$i}_value"} ?? null, 'label' => $about->{"stat_{$i}_label"} ?? null, ])->filter(fn ($s) => filled($s->value) || filled($s->label)); @endphp
@if(filled($about->house_title) || filled($about->house_description))
@if(filled($about->house_title))

{{ $about->house_title }}

@endif @if(filled($about->house_description)) {!! $richHtml($about->house_description) !!} @endif
@endif @if(filled($about->different_title) || filled($about->different_description) || filled($about->different_image))
@if(filled($about->different_title))

{{ $about->different_title }}

@endif @if(filled($about->different_description)) {!! $richHtml($about->different_description) !!} @endif
@if($img($about->different_image))
{{ $about->different_title }}
@endif
@endif @if(isset($features) && $features->isNotEmpty())
@foreach($features as $feature)
@if($img($feature->image))
{{ $feature->title }}
@endif @if(filled($feature->title))
{{ $feature->title }}
@endif
@if(filled($feature->description))

{{ $feature->description }}

@endif
@endforeach
@endif
@if(filled($about->vision_title) || filled($about->vision_description) || filled($about->mission_title) || filled($about->mission_description))
vision_bg_image)) style="background-image:url('{{ $img($about->vision_bg_image) }}');" @endif>
@if(filled($about->vision_title) || filled($about->vision_description) || filled($about->vision_icon))
@if($img($about->vision_icon))
{{ $about->vision_title }}
@endif @if(filled($about->vision_title))

{{ $about->vision_title }}

@endif
@if(filled($about->vision_description))

{{ $about->vision_description }}

@endif
@endif @if(filled($about->mission_title) || filled($about->mission_description) || filled($about->mission_icon))
@if($img($about->mission_icon))
{{ $about->mission_title }}
@endif @if(filled($about->mission_title))

{{ $about->mission_title }}

@endif
@if(filled($about->mission_description))

{{ $about->mission_description }}

@endif
@endif
@endif
@if(filled($about->work_title) || filled($about->work_description) || $works->isNotEmpty())
@if(filled($about->work_title) || filled($about->work_description))
@if(filled($about->work_title))

{{ $about->work_title }}

@endif @if(filled($about->work_description))

{{ $about->work_description }}

@endif
@endif @if($works->isNotEmpty())
@foreach($works as $work)
@if($img($work->icon))
{{ $work->title }}
@endif @if(filled($work->title))
{{ $work->title }}
@endif @if(filled($work->description))

{{ $work->description }}

@endif
@endforeach
@endif
@endif @if(filled($about->piece_title) || filled($about->piece_description) || filled($about->piece_image) || $stats->isNotEmpty())
@if($img($about->piece_image))
{{ $about->piece_title }}
@endif
@if(filled($about->piece_title))

{{ $about->piece_title }}

@endif @if(filled($about->piece_description)) {!! $richHtml($about->piece_description) !!} @endif @if($stats->isNotEmpty())
@foreach($stats as $stat)
@if(filled($stat->value))
{{ $stat->value }}
@endif @if(filled($stat->label))

{{ $stat->label }}

@endif
@endforeach
@endif
@endif
@if(filled($findTitle) || filled($findDescription))
@if(filled($findTitle))

{{ $findTitle }}

@endif @if(filled($findDescription))

{{ $findDescription }}

@endif
@csrf @include('frontend.partials.honeypot')
@endif
@if(!empty($brochureDesktop) || !empty($brochureMobile))
@if(!empty($brochureDesktop))brochure@endif
@if(!empty($brochureMobile) || !empty($brochureDesktop))brochure@endif
@endif
@if(filled($brochureTitle))

{{ $brochureTitle }}

@endif @if($brochureUrl) {{ $brochureButton }} @endif
@endsection