Changeset 851239c in Klonkt for src


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@…>

Location:
src/views
Files:
2 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') { %>
  • src/views/partials/topnav.ejs

    re6888ca r851239c  
    3131            HTMX, zodat de headerloze overview correct rendert). Eigen class want
    3232            .site-title is overal display:none. %>
    33         <a class="nav-hub-home" href="/" aria-label="Naar de hub-home"><%= (typeof hubTitle !== 'undefined' && hubTitle) ? hubTitle : 'Home' %></a>
     33        <a class="nav-hub-home" href="/" aria-label="Home" title="Home">
     34          <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
     35        </a>
    3436      <% } else if (site) { %>
    3537        <a class="site-title" href="<%= _siteUrlBase %>/"
     
    236238/* Hub-home brand is WÉL zichtbaar — de thuisknop op artiest-/hub-pagina's. */
    237239.masthead-brand .nav-hub-home {
    238   display: inline-block; vertical-align: middle;
     240  display: inline-flex; align-items: center; justify-content: center;
     241  width: 40px; height: 40px;
    239242  color: var(--ink); text-decoration: none;
    240   font-family: var(--font-display, serif); font-weight: 700; font-size: 1.05rem;
    241   transition: color 120ms;
    242 }
    243 .masthead-brand .nav-hub-home:hover { color: var(--accent); }
     243  border-radius: 8px;
     244  transition: color 120ms, background 120ms;
     245}
     246.masthead-brand .nav-hub-home:hover { color: var(--accent); background: var(--paper-2); }
     247.masthead-brand .nav-hub-home svg { width: 22px; height: 22px; }
    244248
    245249/* On mobile, hide the entire masthead except for admin pages. The brand
Note: See TracChangeset for help on using the changeset viewer.