Changeset 03bfdce in Klonkt
- Timestamp:
- 06/16/2026 11:35:13 PM (3 months ago)
- Branches:
- main
- Children:
- 108fd5f
- Parents:
- 09ac0a5
- Location:
- src
- Files:
-
- 4 edited
-
assets/css/style.css (modified) (1 diff)
-
views/pages/hub-home.ejs (modified) (3 diffs)
-
views/partials/topnav.ejs (modified) (1 diff)
-
views/shell.ejs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/css/style.css
r09ac0a5 r03bfdce 2028 2028 margin-bottom: 1.5rem; 2029 2029 } 2030 /* Hub-landing (body.on-hub): verberg de site-chrome. In hub-modus staan masthead 2031 + view-switcher altijd in de DOM (zodat htmx tussen hub-home en artiest-sites 2032 kan schakelen zonder full-reload); hier toggelen we hun zichtbaarheid. De 2033 hub-home heeft z'n eigen kop/nav in de content. */ 2034 body.on-hub .masthead, 2035 body.on-hub .view-switcher-wrap { display: none !important; } 2030 2036 .view-switcher { 2031 2037 display: flex; -
src/views/pages/hub-home.ejs
r09ac0a5 r03bfdce 34 34 <% if (mainSite) { %> 35 35 <section class="hub-sec hub-sec-main"> 36 <a class="hub-main-card" href="/user/<%= mainSite.slug %>"> 36 <a class="hub-main-card" href="/user/<%= mainSite.slug %>" 37 hx-get="/user/<%= mainSite.slug %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" 38 hx-push-url="/user/<%= mainSite.slug %>" hx-indicator="#pcms-loading"> 37 39 <% var _mAva = mainSite.profile_photo || mainSite.owner_avatar; %> 38 40 <span class="hub-main-avatar"<% if (_mAva) { %> style="background-image:url('<%= _mAva %>')"<% } else { %> style="background:<%= mainSite.accent || 'var(--accent)' %>;color:#fff"<% } %>> … … 60 62 <div class="roster"> 61 63 <% artists.forEach(function(a){ %> 62 <a class="roster-card" href="/user/<%= a.slug %>"> 64 <a class="roster-card" href="/user/<%= a.slug %>" 65 hx-get="/user/<%= a.slug %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" 66 hx-push-url="/user/<%= a.slug %>" hx-indicator="#pcms-loading"> 63 67 <% var _ava = a.profile_photo || a.owner_avatar; %> 64 68 <span class="roster-avatar"<% if (_ava) { %> style="background-image:url('<%= _ava %>')"<% } else { %> style="background:<%= a.accent || 'var(--accent)' %>;color:#fff"<% } %>> … … 85 89 <div class="hub-feed"> 86 90 <% posts.forEach(function(p){ %> 87 <a class="feed-item" href="/user/<%= p.site_slug %>/<%= p.slug %>"> 91 <a class="feed-item" href="/user/<%= p.site_slug %>/<%= p.slug %>" 92 hx-get="/user/<%= p.site_slug %>/<%= p.slug %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" 93 hx-push-url="/user/<%= p.site_slug %>/<%= p.slug %>" hx-indicator="#pcms-loading"> 88 94 <% if (p.cover_image_url) { %> 89 95 <span class="feed-cover" style="background-image:url('<%= p.cover_image_url %>')"></span> -
src/views/partials/topnav.ejs
r09ac0a5 r03bfdce 28 28 <a href="<%= _siteUrlBase %>/" class="nav-link nav-link-admin">← Terug naar site</a> 29 29 <% } else if (typeof tenancy !== 'undefined' && tenancy === 'hub') { %> 30 <%# Hub: de brand is de hub-naam en gaat naar de hub-home (volledige nav, geen 31 HTMX, zodat de headerloze overview correct rendert). Eigen class want 32 .site-title is overal display:none. %> 33 <a class="nav-hub-home" href="/" aria-label="Home" title="Home"> 30 <%# Hub: de brand gaat naar de hub-home via HTMX. De chrome wordt in hub-modus 31 altijd gerenderd en via body.on-hub (CSS) verborgen op de landing, dus htmx 32 kan schakelen zonder full-reload → de audioplayer blijft leven. %> 33 <a class="nav-hub-home" href="/" aria-label="Home" title="Home" 34 hx-get="/?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/" hx-indicator="#pcms-loading"> 34 35 <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> 35 36 </a> -
src/views/shell.ejs
r09ac0a5 r03bfdce 267 267 - auth-pagina's (on-auth): focus-schermen voor in-/uitloggen. 268 268 Die chrome hoort bij een Klonkt-site en verschijnt dus op /user/-pagina's. %> 269 <% var _isHub = (typeof tenancy !== 'undefined' && tenancy === 'hub'); %> 270 <% var _onAuth = (typeof bodyClass === 'string' && bodyClass.indexOf('on-auth') >= 0); %> 269 271 <% var bareChrome = (typeof bodyClass === 'string' && (bodyClass.indexOf('on-hub') >= 0 || bodyClass.indexOf('on-auth') >= 0)) 270 || ((typeof tenancy !== 'undefined' && tenancy === 'hub') && !siteUrlBase && !isAdminPage); %> 271 272 <% if (!bareChrome) { %> 272 || (_isHub && !siteUrlBase && !isAdminPage); %> 273 <%# In HUB-modus de chrome ALTIJD renderen (CSS verbergt 'm op de hub-landing via 274 body.on-hub) zodat htmx tussen hub-home en artiest-sites kan schakelen zónder 275 full-reload → de audioplayer blijft leven, geen verspringen. profile-header 276 self-hidet als er geen site is. Solo/circle: ongewijzigd (!bareChrome). %> 277 <% var renderChrome = _isHub ? !_onAuth : !bareChrome; %> 278 279 <% if (renderChrome) { %> 273 280 <%- include('partials/topnav') %> 274 281 <%- include('partials/profile-header') %> … … 279 286 on non-feed pages (post, account, search, auth) it navigates to / 280 287 in the chosen view. Click logic is in shell.ejs at the bottom. %> 281 <% if (!isAdminPage && !bareChrome) { %>288 <% if (!isAdminPage && renderChrome) { %> 282 289 <%- include('partials/view-switcher') %> 283 290 <% } %> … … 353 360 PAGE_CLASSES.forEach(function(c) { document.body.classList.remove(c); }); 354 361 document.body.classList.add(firstClass); 362 // 'on-hub' is een modifier náást de page-class: apart toggelen zodat de 363 // hub-chrome (topnav/view-switcher) via CSS mee-schakelt bij htmx-navigatie 364 // tussen hub-home (on-hub) en artiest-sites (geen on-hub). 365 document.body.classList.toggle('on-hub', /(^|\s)on-hub(\s|$)/.test(String(next))); 355 366 }); 356 367 })();
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)