source: Klonkt/src/views/partials/chrome.ejs@ 86793f9

main
Last change on this file since 86793f9 was 79bba6e, checked in by roboburr <roboburr@…>, 3 months ago

Audio never jumps + hub topnav + Prutter chat mobile-first

  • Global link boost in shell.ejs: all internal navigation links go through htmx into #pcms-main (session/auth/downloads/assets excluded), so the audio player keeps playing everywhere — including clicks within Admin. Back/forward re-fetches (historyCacheSize=0) so the OOB header comes along.
  • Hub-home: the mini topnav bar now shows on the hub landing (no large profile header — the hero is the header); duplicate .hub-nav removed.
  • Prutter conversation: full-height mobile-first chat (bodyClass on-chat → no artist profile header). Page pinned fixed between topnav and the bottom bars; only the thread scrolls. Compact header + clean composer.

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

  • Property mode set to 100644
File size: 1.6 KB
Line 
1<%
2// Site-chrome (topnav + profielkop + view-switcher) in één vaste slot #pcms-chrome.
3//
4// Waarom een slot: bij htmx-navigatie verversen we deze hele chrome out-of-band
5// (oob=true), zodat de kop ALTIJD bij de nieuwe pagina/artiest hoort — terwijl de
6// audioplayer (los in document.body, buiten dit slot) blijft leven → geen
7// verspringen. Op de hub-landing (bareChrome) is het slot leeg: hero = de header.
8//
9// Wordt zowel door shell.ejs (oob niet gezet) als door render.js bij partials
10// (oob=true) gerenderd. De logica staat hier zodat beide identiek zijn.
11//
12// _isAuth → focus-scherm (in/uitloggen): helemaal geen chrome.
13// _headerless → hub-homepagina én de Prutter-chat: WÉL de mini topnav-balk,
14// GEEN profielkop (hub: hero = header; chat: full-height view).
15// anders → topnav + profielkop (+ view-switcher buiten admin).
16var _isAdmin = typeof bodyClass === 'string' && bodyClass.indexOf('on-admin') >= 0;
17var _isAuth = typeof bodyClass === 'string' && bodyClass.indexOf('on-auth') >= 0;
18var _isChat = typeof bodyClass === 'string' && bodyClass.indexOf('on-chat') >= 0;
19var hubLanding = (typeof bodyClass === 'string' && bodyClass.indexOf('on-hub') >= 0)
20 || ((typeof tenancy !== 'undefined' && tenancy === 'hub') && !siteUrlBase && !_isAdmin);
21var _headerless = hubLanding || _isChat;
22%>
23<div id="pcms-chrome"<% if (typeof oob !== 'undefined' && oob) { %> hx-swap-oob="true"<% } %>>
24<% if (!_isAuth) { %>
25 <%- include('topnav') %>
26 <% if (!_headerless) { %>
27 <%- include('profile-header') %>
28 <% if (!_isAdmin) { %><%- include('view-switcher') %><% } %>
29 <% } %>
30<% } %>
31</div>
Note: See TracBrowser for help on using the repository browser.