<% // Post editor — split into card sections for visual hierarchy: // - Identity : title, slug, excerpt // - Cover : thumbnail + URL + custom upload button // - Content : markdown textarea with attached toolbar // - Meta : status, type, pin, noindex, tags // // All behavior (IDs, names, upload endpoints) is preserved — only layout // and styling changed. const _hasCover = !!post.cover_image_url; // In hub-modus moeten save/create/cancel de /user//-prefix dragen, anders // valt de request terug op de primaire site (siteUrlBase leeg) en rendert de // post na opslaan headerless (bareChrome). In solo is _base leeg. const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; %>

<%= isNew ? 'Nieuwe post' : 'Post bewerken' %>

<%# ── IDENTITY ─────────────────────────────────────────────── %>
<%# ── COVER ────────────────────────────────────────────────── %>
Cover
> > <% if (!_hasCover) { %>🖼<% } %>
<%# ── CONTENT ──────────────────────────────────────────────── %>
Content Sleep een afbeelding om in te voegen · selecteer tekst om op te maken
<%# Hidden field is what actually submits to the server. The visible contenteditable's serialized HTML is copied here on submit. %> <%# Initial content is injected as a JSON string in a script tag so we can set innerHTML safely from JS. EJS-escaping HTML directly into the editor would render entity-escaped tags as text. %>
0 tekens
<%# ── META ─────────────────────────────────────────────────── %>
Publicatie
<%# ── ACTIONS (sticky at bottom) ──────────────────────────── %>
Annuleren
<% if (!isNew && post.status !== 'published') { %> <% } %>
<%# ── Track picker modal (P59). Mobile-first: full-screen sheet on small viewports, centered modal on ≥640px. Populated lazily on first open. %> <% if (typeof user !== 'undefined' && user) { %> <% } %> <%# Playlist editor modal — included so its global window.openPlaylistEditor is available when the toolbar button fires. Only renders if user can post. %> <% if (typeof user !== 'undefined' && user) { %> <%- include('../partials/playlist-editor', { csrfToken: (typeof csrfToken !== 'undefined' ? csrfToken : '') }) %> <% } %>