Changeset 03bfdce in Klonkt for src/views/pages


Ignore:
Timestamp:
06/16/2026 11:35:13 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
108fd5f
Parents:
09ac0a5
Message:

Hub: always render chrome + CSS toggle (body.on-hub) → hub nav via htmx (no audio jumping)

In hub mode, topnav/view-switcher are now always in the DOM; CSS hides them
on the hub landing (body.on-hub, also toggled in the htmx body-class swap).
Roster, main card, feed, and brand links are now htmx → navigating between
hub-home and an artist happens in-place, so the persistent audio player
stays alive (no jumping). Solo/circle completely unchanged
(renderChrome = !bareChrome there).

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/hub-home.ejs

    r09ac0a5 r03bfdce  
    3434    <% if (mainSite) { %>
    3535    <section class="hub-sec hub-sec-main">
    36       <a class="hub-main-card" href="/user/<%= mainSite.slug %>">
     36      <a class="hub-main-card" href="/user/<%= mainSite.slug %>"
     37         hx-get="/user/<%= mainSite.slug %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
     38         hx-push-url="/user/<%= mainSite.slug %>" hx-indicator="#pcms-loading">
    3739        <% var _mAva = mainSite.profile_photo || mainSite.owner_avatar; %>
    3840        <span class="hub-main-avatar"<% if (_mAva) { %> style="background-image:url('<%= _mAva %>')"<% } else { %> style="background:<%= mainSite.accent || 'var(--accent)' %>;color:#fff"<% } %>>
     
    6062      <div class="roster">
    6163        <% artists.forEach(function(a){ %>
    62           <a class="roster-card" href="/user/<%= a.slug %>">
     64          <a class="roster-card" href="/user/<%= a.slug %>"
     65             hx-get="/user/<%= a.slug %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
     66             hx-push-url="/user/<%= a.slug %>" hx-indicator="#pcms-loading">
    6367            <% var _ava = a.profile_photo || a.owner_avatar; %>
    6468            <span class="roster-avatar"<% if (_ava) { %> style="background-image:url('<%= _ava %>')"<% } else { %> style="background:<%= a.accent || 'var(--accent)' %>;color:#fff"<% } %>>
     
    8589      <div class="hub-feed">
    8690        <% posts.forEach(function(p){ %>
    87           <a class="feed-item" href="/user/<%= p.site_slug %>/<%= p.slug %>">
     91          <a class="feed-item" href="/user/<%= p.site_slug %>/<%= p.slug %>"
     92             hx-get="/user/<%= p.site_slug %>/<%= p.slug %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
     93             hx-push-url="/user/<%= p.site_slug %>/<%= p.slug %>" hx-indicator="#pcms-loading">
    8894            <% if (p.cover_image_url) { %>
    8995              <span class="feed-cover" style="background-image:url('<%= p.cover_image_url %>')"></span>
Note: See TracChangeset for help on using the changeset viewer.