Changeset 441f5d6 in Klonkt for src/views/partials


Ignore:
Timestamp:
06/17/2026 04:02:46 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
c50f22e
Parents:
125e0e1
Message:

Login navigation via htmx (audio no longer jumps when opening login)

Navigating TO the login page now goes via htmx instead of a full load → the
audio player stays alive (no jump). The login itself (form submit) deliberately
remains a full load (choice: only the navigate-to-login is smooth).

For this to work, on-auth also needed to work via htmx:

  • pcmsNav now applies ALL page-classes sent along (not just the first one), and on-auth is in PAGE_CLASSES → the login focus screen gets its styling via htmx.
  • body.on-auth .bottom-tab { display:none } → hide the tab from the previous page (which stays alive under htmx nav), just as clean as a full-load login.
  • Login links (bottom-tab + topnav) get hx-get.

CSS cache-buster v9.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

Location:
src/views/partials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/bottom-tab.ejs

    r125e0e1 r441f5d6  
    111111    <a class="bottom-tab-item<%= _active === 'login' ? ' is-active' : '' %>"
    112112       href="/auth/login"
     113       hx-get="/auth/login?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
     114       hx-push-url="/auth/login" hx-indicator="#pcms-loading"
    113115       aria-label="Inloggen">
    114116      <svg class="bottom-tab-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
  • src/views/partials/topnav.ejs

    r125e0e1 r441f5d6  
    147147        </details>
    148148      <% } else { %>
    149         <a class="nav-link" href="/auth/login">
     149        <a class="nav-link" href="/auth/login"
     150           hx-get="/auth/login?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
     151           hx-push-url="/auth/login" hx-indicator="#pcms-loading">
    150152          <span class="nav-label">Inloggen</span>
    151153        </a>
Note: See TracChangeset for help on using the changeset viewer.