Changeset 8f2f97c in Klonkt for src/views/partials
- Timestamp:
- 06/23/2026 02:24:46 PM (3 months ago)
- Branches:
- main
- Children:
- cb01666
- Parents:
- 24cdcc6
- Location:
- src/views/partials
- Files:
-
- 2 edited
-
bottom-tab.ejs (modified) (3 diffs)
-
topnav.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/partials/bottom-tab.ejs
r24cdcc6 r8f2f97c 13 13 const _canPost = !!(user && (typeof canMutate === 'undefined' || canMutate) 14 14 && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site)); 15 const _hasPrutter = !!(user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub') && (typeof premiumUnlocked === 'undefined' || premiumUnlocked));16 15 const _ownProfile = user ? ('/users/' + user.username) : null; 17 16 const _isHub = (typeof tenancy !== 'undefined' && tenancy === 'hub'); … … 32 31 else if (_p.indexOf('/search') === 0 || _p.indexOf('/tag/') === 0 || _p.indexOf('/type/') === 0) _active = 'search'; 33 32 else if (_p === '/posts/new' || /^\/posts\/[^/]+\/edit$/.test(_p)) _active = 'create'; 34 else if (_p.indexOf('/prutter') === 0) _active = 'prutter';35 33 else if (_p.indexOf('/account') === 0 || (_ownProfile && _p.indexOf(_ownProfile) === 0)) _active = 'profile'; 36 34 else if (_p.indexOf('/auth/login') === 0) _active = 'login'; … … 80 78 <% } %> 81 79 82 <!-- Prutter (DMs) -->83 <% if (_hasPrutter) { %>84 <a class="bottom-tab-item<%= _active === 'prutter' ? ' is-active' : '' %>"85 href="<%= _siteUrlBase %>/prutter"86 aria-label="Prutter berichten" <%= _active === 'prutter' ? 'aria-current="page"' : '' %>>87 <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">88 <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>89 </svg>90 <span class="bottom-tab-label">Prutter</span>91 <% if (typeof unreadDmCount !== 'undefined' && unreadDmCount > 0) { %>92 <span class="bottom-tab-badge" aria-label="<%= unreadDmCount %> ongelezen"><%= unreadDmCount > 99 ? '99+' : unreadDmCount %></span>93 <% } %>94 </a>95 <% } %>96 80 97 81 <!-- Profiel / Inloggen --> -
src/views/partials/topnav.ejs
r24cdcc6 r8f2f97c 15 15 const _isAdmin = typeof bodyClass !== 'undefined' && bodyClass.indexOf('on-admin') >= 0; 16 16 const _hasSearch = !site || site.show_search === undefined || site.show_search; 17 const _hasPrutter = user && site && site.enable_prutter && (typeof tenancy !== 'undefined' && tenancy === 'hub') && (typeof premiumUnlocked === 'undefined' || premiumUnlocked);18 17 const _canPost = user && (typeof canMutate === 'undefined' || canMutate) 19 18 && permissions && permissions.canCreatePost && permissions.canCreatePost(user, site); … … 98 97 </div> 99 98 </details> 100 <% } %>101 102 <% if (_hasPrutter) { %>103 <a class="nav-btn" href="<%= _siteUrlBase %>/prutter" aria-label="Prutter (DMs)" title="Prutter">104 <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>105 </a>106 99 <% } %> 107 100
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)