@extends('frontend.layout') @php // Admin can save EITHER a structured array (title / subtitle / story // / stats / mission) OR a raw HTML string (whole-page template). // Detect which one and render the right path below. $rawHtml = is_string($content) && trim($content) !== '' ? $content : null; $c = is_array($content) ? $content : []; $pageTitle = $c['title'] ?? __('About'); @endphp @section('title', $pageTitle . ' — ' . config('app.name')) @section('content')
@if($rawHtml) {{-- Admin pasted raw HTML — render in a styled prose wrapper. --}}
{!! $rawHtml !!}
@else

{{ $pageTitle }} Us

@if(!empty($c['subtitle']))

{{ $c['subtitle'] }}

@endif
@if(!empty($c['story']))

{{ $c['story'] }}

@endif @if(!empty($c['stats']) && is_array($c['stats']))
@foreach($c['stats'] as $stat) @if(!empty($stat['value']))
{{ $stat['value'] }}
{{ $stat['label'] ?? '' }}
@endif @endforeach
@endif @if(!empty($c['mission']))

{{ __("Our Mission") }}

{{ $c['mission'] }}

@endif @endif
@endsection