Changeset 72ec6a4 in Klonkt for src/views/partials
- Timestamp:
- 07/31/2026 06:55:59 PM (6 weeks ago)
- Branches:
- main
- Children:
- 17546af
- Parents:
- bfa6fa1
- Location:
- src/views/partials
- Files:
-
- 3 edited
-
bottom-tab.ejs (modified) (2 diffs)
-
chrome.ejs (modified) (1 diff)
-
topnav.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/views/partials/bottom-tab.ejs
rbfa6fa1 r72ec6a4 13 13 && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site)); 14 14 const _ownProfile = user ? ('/users/' + user.username) : null; 15 const _isHub = (typeof tenancy !== 'undefined' && tenancy === 'hub'); 16 // Home in hub mode ALWAYS goes to the hub root (/), not to an artist's sub-home. 17 // In solo/circle _siteUrlBase is empty, so it stays '/'. 18 const _homeHref = (_isHub ? '' : _siteUrlBase) + '/'; 15 const _homeHref = _siteUrlBase + '/'; 19 16 20 17 // Strip site prefix for cleaner matching … … 26 23 27 24 let _active = null; 28 // In hub, Home is only active on the real hub root, not on an artist sub-home. 29 if (_isHub ? (_path === '/') : (_p === '/' || _p === '')) _active = 'home'; 25 if (_p === '/' || _p === '') _active = 'home'; 30 26 else if (_p.indexOf('/search') === 0 || _p.indexOf('/tag/') === 0 || _p.indexOf('/type/') === 0) _active = 'search'; 31 27 else if (_p === '/posts/new' || /^\/posts\/[^/]+\/edit$/.test(_p)) _active = 'create'; -
src/views/partials/chrome.ejs
rbfa6fa1 r72ec6a4 17 17 var _isAuth = typeof bodyClass === 'string' && bodyClass.indexOf('on-auth') >= 0; 18 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); 19 var hubLanding = (typeof bodyClass === 'string' && bodyClass.indexOf('on-hub') >= 0); 21 20 // Zelfstandige premium-feature-pagina's hebben hun eigen kop → geen profielkop/ 22 21 // switcher, wél de topnav (Robin 2026-06-18: "bovenste weg, behoud de nav"). -
src/views/partials/topnav.ejs
rbfa6fa1 r72ec6a4 28 28 <% if (_isAdmin || _isSpecial) { %> 29 29 <a href="<%= _siteUrlBase %>/" class="nav-link nav-link-admin"><%= t('nav.back_to_site') %></a> 30 <% } else if (typeof tenancy !== 'undefined' && tenancy === 'hub') { %>31 <%# Hub: the brand navigates to the hub home via HTMX. The chrome is always32 rendered in hub mode and hidden on the landing via body.on-hub (CSS), so htmx33 can switch without a full reload → the audio player stays alive. %>34 <a class="nav-hub-home" href="/" aria-label="Home" title="Home"35 hx-get="/?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/" hx-indicator="#pcms-loading">36 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>37 </a>38 <% } else if (site) { %>39 <a class="site-title" href="<%= _siteUrlBase %>/"40 hx-get="<%= _siteUrlBase %>/?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"41 hx-push-url="<%= _siteUrlBase %>/" hx-indicator="#pcms-loading"><%= site.title %></a>42 30 <% } else { %> 43 31 <a class="site-title" href="/">Klonkt</a>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)