| 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).
|
|---|
| 16 | var _isAdmin = typeof bodyClass === 'string' && bodyClass.indexOf('on-admin') >= 0;
|
|---|
| 17 | var _isAuth = typeof bodyClass === 'string' && bodyClass.indexOf('on-auth') >= 0;
|
|---|
| 18 | var _isChat = typeof bodyClass === 'string' && bodyClass.indexOf('on-chat') >= 0;
|
|---|
| 19 | var 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").
|
|---|
| 23 | // NB: on-shows (agenda) hoort hier NIET bij — daar willen we de volledige chrome
|
|---|
| 24 | // (profielkop + de Tijdlijn/Grid-pill met Agenda actief) juist BEHOUDEN.
|
|---|
| 25 | var _featurePage = typeof bodyClass === 'string' &&
|
|---|
| 26 | ['on-epk', 'on-download', 'on-linkbio', 'on-newsletter'].some(function (c) { return bodyClass.indexOf(c) >= 0; });
|
|---|
| 27 | var _headerless = hubLanding || _isChat || _featurePage;
|
|---|
| 28 | %>
|
|---|
| 29 | <div id="pcms-chrome"<% if (typeof oob !== 'undefined' && oob) { %> hx-swap-oob="true"<% } %>>
|
|---|
| 30 | <% if (!_isAuth) { %>
|
|---|
| 31 | <%- include('topnav') %>
|
|---|
| 32 | <% if (!_headerless) { %>
|
|---|
| 33 | <%- include('profile-header') %>
|
|---|
| 34 | <% if (!_isAdmin) { %><%- include('view-switcher') %><% } %>
|
|---|
| 35 | <% } %>
|
|---|
| 36 | <% } %>
|
|---|
| 37 | </div>
|
|---|