@extends('layouts.dashboard') @section('content') @php /** * Full-page blog post editor (create + edit). Replaces the old modal so authors * get a roomy, distraction-free writing surface with the Quill rich-text editor. * * @var array|null $post existing post when editing, null when creating * @var array $categories selectable blog categories * @var array $tags selectable blog tags * @var array $postTagIds tag ids already assigned to this post (empty when creating) * @var array $seo search-result settings ['title','description','image','noindex'] */ $isEdit = $post !== null; $tags = $tags ?? []; $postTagIds = $postTagIds ?? []; $seo = $seo ?? ['title' => '', 'description' => '', 'image' => '', 'noindex' => false]; @endphp @php /* .qm-d2: the dashboard density standard (app.css ยง35) */ @endphp
{{ t_raw('admin.blog_form.back_link') }} @if ($isEdit && $post['status'] === 'published' && !empty($post['slug'])) {{ t_raw('admin.blog_form.view_live') }} @endif
@csrf
{{ t_raw('admin.blog_form.body_help') }}

{{ t_raw('admin.blog_form.publish_heading') }}

@php /* One control, one meaning: a moment here schedules the post and the status above becomes Draft until it arrives; an empty box means the status above applies now. The same [data-flatpickr] picker the rest of the product uses, so the format and the locale are already handled. */ @endphp

{{ t_raw('admin.blog_form.featured_image_heading') }}

@php // The shared media field: browse the library, upload or crop โ€” never the OS dialog. @endphp {!! media_field_html('featured_image', (string) ($post['featured_image'] ?? ''), ['accept' => 'image', 'allowClear' => true, 'id' => 'post-image']) !!}
@php // Search-result appearance. Publishing metadata, so it sits in the rail beside the // status rather than under the body: it is edited once and then rarely, while the // body is the whole job. Nothing here is required โ€” left empty, the post's own // title and excerpt are used. @endphp

{{ t_raw('admin.seo.post_section') }}

@php // Same media field as the featured image above โ€” a sharing image is an image, // so it is chosen the same way rather than typed as a path. @endphp {!! media_field_html('seo_image', $seo['image'], ['accept' => 'image', 'allowClear' => true, 'id' => 'post-seo-image']) !!}

{{ t_raw('admin.seo.hint_noindex') }}

{{ t_raw('common.cancel') }}
@php /* /.qm-d2 */ @endphp @endsection