<% // Bottom-tab navigation — mobile-only (hidden ≥768px via CSS). // // Tabs: // logged-out: Home · Zoek · Inloggen (3 tabs) // logged-in: Home · Zoek · [Plus] · Profiel // The Plus tab is a FAB-style center action (accent bg, slightly raised). // It only appears for users with create-post permission. const _siteUrlBase = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; const _path = (typeof currentPath !== 'undefined' && currentPath) ? currentPath : '/'; const _canPost = !!(user && (typeof canMutate === 'undefined' || canMutate) && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site)); const _ownProfile = user ? ('/users/' + user.username) : null; const _homeHref = _siteUrlBase + '/'; // Strip site prefix for cleaner matching function _normalize(p) { if (_siteUrlBase && p.indexOf(_siteUrlBase) === 0) return p.slice(_siteUrlBase.length) || '/'; return p; } const _p = _normalize(_path); let _active = null; if (_p === '/' || _p === '') _active = 'home'; else if (_p.indexOf('/search') === 0 || _p.indexOf('/tag/') === 0 || _p.indexOf('/type/') === 0) _active = 'search'; else if (_p === '/posts/new' || /^\/posts\/[^/]+\/edit$/.test(_p)) _active = 'create'; else if (_p.indexOf('/account') === 0 || (_ownProfile && _p.indexOf(_ownProfile) === 0)) _active = 'profile'; else if (_p.indexOf('/auth/login') === 0) _active = 'login'; %> <%# De zoekknop zit nu in de chrome-module (assets/js/mod/chrome.js). Inline script hier wordt door de CSP geweigerd zodra deze partial via htmx binnenkomt, en dat is bij elke navigatie -- zie shaer-0i6. %>