source: Klonkt/src/views/partials/chrome.ejs@ 0fcc09c

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

feat(agenda): full chrome + pill kept on the calendar page

Removed on-shows from _featurePage → the calendar page now shows the profile
header + the Timeline/Grid pill (with Agenda active), as requested ("keep this
on the calendar page"). The other feature pages (epk/downloads/linkbio/newsletter)
remain headerless.

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

  • Property mode set to 100644
File size: 2.1 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").
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.
25var _featurePage = typeof bodyClass === 'string' &&
26 ['on-epk', 'on-download', 'on-linkbio', 'on-newsletter'].some(function (c) { return bodyClass.indexOf(c) >= 0; });
27var _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>
Note: See TracBrowser for help on using the repository browser.