@extends($site->themeView('layout'))
{{--
Page. Default layout: title header, body, then blocks. Full-width layout
(and a page used as home page): blocks first (a leading hero carries the
H1), then the body.
--}}
@section('content')
@if ($preview ?? false)
{{ __('cms.preview_banner') }}
@endif
@php
$landing = ($asHome ?? false) || $page->layout === 'landing';
$bodyHtml = $html !== '' ? ''.$html.'
' : '';
@endphp
@unless ($landing)
@if ($bodyHtml){!! $bodyHtml !!}@endif
@endunless
@if (! empty($blocks))
@include($site->themeView('blocks.render'), ['blocks' => $blocks, 'needsH1' => $landing, 'pageTitle' => $page->title])
@elseif ($landing)
{{ $page->title }}
@endif
@if ($landing && $bodyHtml)
{!! $bodyHtml !!}
@endif
@endsection