<% // Top nav — RESPONSIVE. // // Mobile (<768px): // - Brand centered, small theme-toggle right. // - All other actions live in the bottom-tab nav. // - Sticky top, blur background, safe-area-top respected. // // Desktop (≥768px): // - Full v9 masthead: brand left, action row right // (Archief / Search / Install / Theme / User-menu). // - bottom-tab is hidden via CSS, so all nav must live here. const _siteUrlBase = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; const _isAdmin = typeof bodyClass !== 'undefined' && bodyClass.indexOf('on-admin') >= 0; // Fediverse pages (on-special) get the same top-nav "back to site" treatment as admin. const _isSpecial = typeof bodyClass !== 'undefined' && bodyClass.indexOf('on-special') >= 0; const _hasSearch = !site || site.show_search === undefined || site.show_search; const _canPost = user && (typeof canMutate === 'undefined' || canMutate) && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site); %>
<% if (_isAdmin || _isSpecial) { %> <%= t('nav.back_to_site') %> <% } else if (typeof tenancy !== 'undefined' && tenancy === 'hub') { %> <%# Hub: the brand navigates to the hub home via HTMX. The chrome is always rendered in hub mode and hidden on the landing via body.on-hub (CSS), so htmx can switch without a full reload → the audio player stays alive. %> <% } else if (site) { %> <%= site.title %> <% } else { %> Klonkt <% } %>
<% if (!user) { %>
<% } %>