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

main
Last change on this file since 6eeb459 was 1eff06a, checked in by roboburr <roboburr@…>, 3 months ago

refactor(nav): Agenda as its own pill (separate from Timeline/Grid)

Agenda was INSIDE the view-switcher pill → the grey/white neutralisation clashed
with the feed toggle (Timeline/Grid stayed grey after htmx nav). Now Agenda is
its own pill (same look), visible in all modes, white on the calendar page. My
neutralisation CSS removed so Timeline/Grid have 100% their normal behaviour.

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 3.4 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 premiumUnlocked !== 'undefined' && premiumUnlocked && typeof agendaEnabled !== 'undefined' && agendaEnabled) {
8 var _sbA = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
9 %>
10 <div class="agenda-pill">
11 <a class="vs-agenda" href="<%= _sbA %>/shows" aria-label="Agenda — evenementen">
12 <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="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
13 <span>Agenda</span>
14 </a>
15 </div>
16 <% } %>
17 <% if (typeof tenancy !== 'undefined' && tenancy === 'circle') {
18 var _onCirkel = (typeof bodyClass === 'string' && bodyClass.indexOf('on-cirkel') >= 0);
19 var _sb = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
20 %>
21 <div class="feed-scope" role="tablist" aria-label="Solo of cirkel">
22 <a class="feed-scope-btn<%= _onCirkel ? '' : ' is-active' %>" href="<%= _sb %>/"
23 role="tab" aria-selected="<%= _onCirkel ? 'false' : 'true' %>">Solo</a>
24 <a class="feed-scope-btn<%= _onCirkel ? ' is-active' : '' %>" href="<%= _sb %>/cirkel"
25 role="tab" aria-selected="<%= _onCirkel ? 'true' : 'false' %>">Cirkel</a>
26 </div>
27 <% } %>
28 <div class="view-switcher" role="tablist" aria-label="Weergave">
29 <button type="button" class="view-switch-btn" data-view="timeline" role="tab"
30 aria-selected="<%= (typeof site !== 'undefined' && site && site.feed_view_default === 'grid') ? 'false' : 'true' %>">
31 <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>
32 <span>Tijdlijn</span>
33 </button>
34 <button type="button" class="view-switch-btn" data-view="grid" role="tab"
35 aria-selected="<%= (typeof site !== 'undefined' && site && site.feed_view_default === 'grid') ? 'true' : 'false' %>">
36 <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>
37 <span>Grid</span>
38 </button>
39 </div>
40 <div class="grid-cols-picker" aria-label="Aantal kolommen">
41 <button type="button" class="grid-cols-btn" data-cols="2" title="2 kolommen">2</button>
42 <button type="button" class="grid-cols-btn" data-cols="3" title="3 kolommen">3</button>
43 <button type="button" class="grid-cols-btn" data-cols="4" title="4 kolommen">4</button>
44 </div>
45 </div>
46</div>
Note: See TracBrowser for help on using the repository browser.