Changeset 851239c in Klonkt for src/views/pages/post-edit.ejs


Ignore:
Timestamp:
06/15/2026 01:37:31 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
1907a18
Parents:
e6888ca
Message:

fix: topnav home button (home icon) + post-edit save/cancel with siteUrlBase prefix

  • Hub brand 'Studio Noord' in the topnav replaced by a home icon button (-> /).
  • post-edit form-action + Cancel were missing the /user/<slug>/ prefix: in hub the save went to a bare URL -> redirect without prefix -> post renders headerless (bareChrome). Now with _base prefix; header stays intact after saving.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/post-edit.ejs

    re6888ca r851239c  
    99// and styling changed.
    1010const _hasCover = !!post.cover_image_url;
     11// In hub-modus moeten save/create/cancel de /user/<slug>/-prefix dragen, anders
     12// valt de request terug op de primaire site (siteUrlBase leeg) en rendert de
     13// post na opslaan headerless (bareChrome). In solo is _base leeg.
     14const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
    1115%>
    1216<div class="container post-edit-page">
    1317  <h1><%= isNew ? 'Nieuwe post' : 'Post bewerken' %></h1>
    1418
    15   <form method="post" action="<%= isNew ? '/posts/create' : '/posts/' + post.slug + '/save' %>" class="post-edit-form">
     19  <form method="post" action="<%= _base %><%= isNew ? '/posts/create' : '/posts/' + post.slug + '/save' %>" class="post-edit-form">
    1620
    1721    <%# ── IDENTITY ─────────────────────────────────────────────── %>
     
    184188    <%# ── ACTIONS (sticky at bottom) ──────────────────────────── %>
    185189    <div class="pe-actions">
    186       <a href="<%= isNew ? '/' : '/' + post.slug %>" class="pe-btn">Annuleren</a>
     190      <a href="<%= _base %><%= isNew ? '/' : '/' + post.slug %>" class="pe-btn">Annuleren</a>
    187191      <div class="pe-actions-spacer"></div>
    188192      <% if (!isNew && post.status !== 'published') { %>
Note: See TracChangeset for help on using the changeset viewer.