Changeset 9915786 in Klonkt
- Timestamp:
- 06/16/2026 10:53:05 PM (3 months ago)
- Branches:
- main
- Children:
- 6224462
- Parents:
- e2a8e31
- File:
-
- 1 edited
-
src/views/partials/bottom-tab.ejs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/partials/bottom-tab.ejs
re2a8e31 r9915786 15 15 const _hasPrutter = !!(user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub') && (typeof premiumUnlocked === 'undefined' || premiumUnlocked)); 16 16 const _ownProfile = user ? ('/users/' + user.username) : null; 17 const _isHub = (typeof tenancy !== 'undefined' && tenancy === 'hub'); 18 // Home gaat in hub-modus ALTIJD naar de hub-root (/), niet naar de sub-home van 19 // een artiest. In solo/circle is _siteUrlBase leeg, dus dat blijft '/'. 20 const _homeHref = (_isHub ? '' : _siteUrlBase) + '/'; 17 21 18 22 // Strip site prefix for cleaner matching … … 24 28 25 29 let _active = null; 26 if (_p === '/' || _p === '') _active = 'home'; 30 // In hub is Home alleen actief op de échte hub-root, niet op een artiest-sub-home. 31 if (_isHub ? (_path === '/') : (_p === '/' || _p === '')) _active = 'home'; 27 32 else if (_p.indexOf('/search') === 0 || _p.indexOf('/tag/') === 0 || _p.indexOf('/type/') === 0) _active = 'search'; 28 33 else if (_p === '/posts/new' || /^\/posts\/[^/]+\/edit$/.test(_p)) _active = 'create'; … … 36 41 <!-- Home --> 37 42 <a class="bottom-tab-item<%= _active === 'home' ? ' is-active' : '' %>" 38 href="<%= _siteUrlBase %>/" 39 hx-get="<%= _siteUrlBase %>/?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" 40 hx-push-url="<%= _siteUrlBase %>/" hx-indicator="#pcms-loading" 43 href="<%= _homeHref %>" 44 <% if (!_isHub) { %>hx-get="<%= _homeHref %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="<%= _homeHref %>" hx-indicator="#pcms-loading"<% } %> 41 45 aria-label="Home" <%= _active === 'home' ? 'aria-current="page"' : '' %>> 42 46 <svg class="bottom-tab-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
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)