source: Klonkt/src/views/partials/chrome.ejs@ ca507ef

main
Last change on this file since ca507ef was 84325b8, checked in by roboburr <roboburr@…>, 3 months ago

chrome: feature pages headerless (own header) — topnav stays, profile bar + switcher gone

EPK/downloads/link-in-bio/shows/newsletter have their own header → the site
profile bar + view switcher are redundant there. _headerless extended with those
bodyClasses (on-epk/on-download[s]/on-linkbio/on-shows/on-newsletter); topnav
stays.
Robin 2026-06-18 (EPK page): "the top part can go, keep the nav".

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

  • Property mode set to 100644
File size: 2.0 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);
21// Zelfstandige premium-feature-pagina's hebben hun eigen kop → geen profielkop/
22// switcher, wél de topnav (Robin 2026-06-18: "bovenste weg, behoud de nav").
23var _featurePage = typeof bodyClass === 'string' &&
24 ['on-epk', 'on-download', 'on-linkbio', 'on-shows', 'on-newsletter'].some(function (c) { return bodyClass.indexOf(c) >= 0; });
25var _headerless = hubLanding || _isChat || _featurePage;
26%>
27<div id="pcms-chrome"<% if (typeof oob !== 'undefined' && oob) { %> hx-swap-oob="true"<% } %>>
28<% if (!_isAuth) { %>
29 <%- include('topnav') %>
30 <% if (!_headerless) { %>
31 <%- include('profile-header') %>
32 <% if (!_isAdmin) { %><%- include('view-switcher') %><% } %>
33 <% } %>
34<% } %>
35</div>
Note: See TracBrowser for help on using the repository browser.