source: Klonkt/src/views/partials/view-switcher.ejs@ a0bff44

main
Last change on this file since a0bff44 was 9f81a09, checked in by roboburr <roboburr@…>, 3 months ago

Circles: Solo/Circle scope toggle in the switcher bar (left) + Circle nav link removed

  • view-switcher: Solo/Circle segmented toggle on the left (circle mode only), full navigation (body-class/grid-CSS guaranteed correct).
  • style.css: feed-scope buttons + on-cirkel added to grid-toggle rules (grid/timeline now also switches on /cirkel).
  • topnav + bottom-tab: the standalone Circle nav link removed (replaced by the toggle).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

  • Property mode set to 100644
File size: 2.7 KB
Line 
1<%# View switcher partial — Tijdlijn / Grid + grid-cols picker.
2 Mounted in shell.ejs once, visible on every non-admin page. Click
3 handlers are wired in shell.ejs via event-delegation on document so
4 HTMX-swapped content keeps working without rebinding. %>
5<div class="view-switcher-wrap">
6 <div class="container">
7 <% if (typeof tenancy !== 'undefined' && tenancy === 'circle') {
8 var _onCirkel = (typeof bodyClass === 'string' && bodyClass.indexOf('on-cirkel') >= 0);
9 var _sb = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
10 %>
11 <div class="feed-scope" role="tablist" aria-label="Solo of cirkel">
12 <a class="feed-scope-btn<%= _onCirkel ? '' : ' is-active' %>" href="<%= _sb %>/"
13 role="tab" aria-selected="<%= _onCirkel ? 'false' : 'true' %>">Solo</a>
14 <a class="feed-scope-btn<%= _onCirkel ? ' is-active' : '' %>" href="<%= _sb %>/cirkel"
15 role="tab" aria-selected="<%= _onCirkel ? 'true' : 'false' %>">Cirkel</a>
16 </div>
17 <% } %>
18 <div class="view-switcher" role="tablist" aria-label="Weergave">
19 <button type="button" class="view-switch-btn" data-view="timeline" role="tab"
20 aria-selected="<%= (typeof site !== 'undefined' && site && site.feed_view_default === 'grid') ? 'false' : 'true' %>">
21 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>
22 <span>Tijdlijn</span>
23 </button>
24 <button type="button" class="view-switch-btn" data-view="grid" role="tab"
25 aria-selected="<%= (typeof site !== 'undefined' && site && site.feed_view_default === 'grid') ? 'true' : 'false' %>">
26 <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>
27 <span>Grid</span>
28 </button>
29 </div>
30 <div class="grid-cols-picker" aria-label="Aantal kolommen">
31 <button type="button" class="grid-cols-btn" data-cols="2" title="2 kolommen">2</button>
32 <button type="button" class="grid-cols-btn" data-cols="3" title="3 kolommen">3</button>
33 <button type="button" class="grid-cols-btn" data-cols="4" title="4 kolommen">4</button>
34 </div>
35 </div>
36</div>
Note: See TracBrowser for help on using the repository browser.