@php // Per-page preview URLs (with the editor flag) for the JS tab switcher. $pageData = []; foreach ($pages as $slug => $def) { $pageData[$slug] = [ 'label' => $def['label'], 'url' => route($def['route']) . '?fc_edit=1', 'sections' => $def['sections'], ]; } $editorData = [ 'csrf' => csrf_token(), 'activePage' => $activePage, 'pages' => $pageData, 'sectionMeta' => $sections, 'hidden' => $hidden, 'order' => $order, 'endpoints' => [ 'draft' => route('admin.frontend.draft'), 'preset' => route('admin.frontend.preset'), 'section' => route('admin.frontend.section'), 'reorder' => route('admin.frontend.reorder'), 'publish' => route('admin.frontend.publish'), 'discard' => route('admin.frontend.discard'), 'reset' => route('admin.frontend.reset'), 'upload' => route('admin.frontend.upload'), ], ]; @endphp
{{ __('Admin') }} {{ __('Frontend editor') }}
{{-- ── Toolbar ── --}}
{{-- Page switcher --}}
@foreach ($pages as $slug => $def) @endforeach
{{-- Device preview switcher (centred) --}}
@php $devices = [ 'desktop' => [ 'Desktop', '', ], 'tablet' => [ 'Tablet', '', ], 'mobile' => [ 'Mobile', '', ], ]; @endphp @foreach ($devices as $dk => [$dlabel, $dicon]) @endforeach
{{-- Autosave status pill --}} {{ __('All changes saved') }} {{ $pendingCount }} {{ $pendingCount === 1 ? __('draft') : __('drafts') }}
{{-- ── Body: preview + panels ── --}}
{{-- Live preview iframe — wrapper centres + sizes for device modes --}}
{{-- Right panel --}}
{{-- Server → JS data bridge (data only; logic lives in frontend-editor.js). --}} @push('scripts') @endpush