{{-- The public landing body — ONE partial that renders every section from the resolved content array ($c) for ALL skins. Structural choices come from the template flags ($flags); colour/tone come from the CSS variables the wrapper stamped. Adding a skin never touches this file — only config/landing_templates. Each section honours its $c['sections'][key] visibility toggle. LANDING STUDIO CONTRACT (all inert to visitors): • every editable text node carries data-lp="" matching the content model, so the Studio patches it live over postMessage; • every section carries the DOM id the Studio uses as its anchor, so a click in the preview selects that section; • the reorderable body sections (compare … cta) render from $c['order'], so the Studio can move them without touching code. Header, hero, stats, mockup and footer keep their fixed positions. --}} @php $heroLayout = $flags['hero_layout'] ?? 'center'; $showMockup = (bool) ($flags['show_mockup'] ?? true); $on = fn ($key) => (bool) data_get($c, "sections.$key", true); $studioPreview = $studioPreview ?? false; // Reorderable body sections between the hero/stats/mockup and the footer. // Sanitise the saved order: keep only known keys, then append any default // the saved list is missing — a stale or malformed order can never drop a // block or render an unknown partial. // Pricing is owner-only: resellers don't sell sub-panels, so it is always // excluded from their landing regardless of the saved order or visibility toggle. $bodyDefault = ['compare', 'features', 'networks', 'steps', 'pricing', 'testimonials', 'faq', 'cta']; if (! ($isOwnerPanel ?? true)) { $bodyDefault = array_values(array_diff($bodyDefault, ['pricing'])); } $saved = (array) data_get($c, 'order', []); $bodyOrder = array_values(array_filter($saved, fn ($k) => in_array($k, $bodyDefault, true))); foreach ($bodyDefault as $k) { if (! in_array($k, $bodyOrder, true)) { $bodyOrder[] = $k; } } @endphp {{-- ============================ HEADER ============================ --}} {{-- ============================ HERO ============================ --}} @php $heroClass = ($flags['hero_dark'] ?? true) ? 'lp-hero-dark' : 'lp-hero-light'; @endphp
{{-- Floating likes/hearts — pure CSS delight, decorative (aria-hidden). --}} @php $hearts = [ ['e' => '❤️', 'l' => 6, 'd' => 0.0, 't' => 9], ['e' => '👍', 'l' => 16, 'd' => 2.4, 't' => 11], ['e' => '⭐', 'l' => 27, 'd' => 5.1, 't' => 10], ['e' => '🔥', 'l' => 38, 'd' => 1.2, 't' => 12], ['e' => '💜', 'l' => 49, 'd' => 6.3, 't' => 9], ['e' => '❤️', 'l' => 60, 'd' => 3.0, 't' => 11], ['e' => '👍', 'l' => 71, 'd' => 7.5, 't' => 10], ['e' => '⭐', 'l' => 82, 'd' => 0.8, 't' => 12], ['e' => '🔥', 'l' => 91, 'd' => 4.2, 't' => 9], ['e' => '💜', 'l' => 12, 'd' => 8.0, 't' => 13], ['e' => '❤️', 'l' => 44, 'd' => 9.4, 't' => 11], ['e' => '👍', 'l' => 66, 'd' => 10.2, 't' => 10], ['e' => '⭐', 'l' => 86, 'd' => 6.8, 't' => 12], ['e' => '🔥', 'l' => 33, 'd' => 3.7, 't' => 13], ]; @endphp @if ($heroLayout === 'split')
@include('frontend.partials._hero-copy')
@if ($showMockup)
@include('frontend.partials.mockup')
@endif
@else
@include('frontend.partials._hero-copy') @if ($on('stats'))
@foreach ((array) data_get($c, 'stats', []) as $i => $s)
{{ $s['value'] ?? '' }}
{{ $s['label'] ?? '' }}
@endforeach
@endif
@endif
{{-- Mockup straddling the fold for the centred layouts --}} @if ($showMockup && $heroLayout !== 'split')
@include('frontend.partials.mockup')
@endif {{-- Stats strip for the split layout (centred layout puts them in the hero) --}} @if ($on('stats') && $heroLayout === 'split')
@foreach ((array) data_get($c, 'stats', []) as $i => $s)
{{ $s['value'] ?? '' }}
{{ $s['label'] ?? '' }}
@endforeach
@endif {{-- ==================== REORDERABLE BODY SECTIONS ==================== compare · features · networks · steps · pricing · testimonials · faq · cta, in the admin's chosen order, each honouring its own visibility toggle. --}} @foreach ($bodyOrder as $sk) @if ($on($sk)) @include('frontend.partials.sections.' . $sk) @endif @endforeach {{-- ========================== SUBSCRIBE ========================== --}} @if ($on('subscribe')) @include('frontend.partials.sections.subscribe') @endif {{-- ============================ FOOTER ============================ Extracted so the public content pages (layouts/public) close with the SAME footer as the landing — same brand, same social links, same legal pages. --}} @include('frontend.partials.footer', ['footerHome' => '#top']) {{-- ============================ VIDEO MODAL ============================ --}} @if (data_get($c, 'hero.video_url')) @php $videoUrl = (string) data_get($c, 'hero.video_url'); $isFile = (bool) preg_match('/\.(mp4|webm|ogg)(\?.*)?$/i', $videoUrl); @endphp @endif