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

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

feat(nav): Agenda IN the Timeline/Grid pill (Agenda · Timeline · Grid)

Agenda link moved to the first item inside the view-switcher pill, with
exactly the same sizing as the Timeline/Grid buttons. Own class (.vs-agenda),
so the view-toggle handler doesn't touch it — navigation via the global
link-boost.

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

  • Property mode set to 100644
File size: 3.3 KB
RevLine 
[7bc636b]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">
[9f81a09]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 <% } %>
[7bc636b]18 <div class="view-switcher" role="tablist" aria-label="Weergave">
[d7b5a6c]19 <% if (typeof premiumUnlocked !== 'undefined' && premiumUnlocked) {
20 var _sbA = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
21 %>
22 <a class="vs-agenda" href="<%= _sbA %>/shows" aria-label="Agenda — evenementen">
23 <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>
24 <span>Agenda</span>
25 </a>
26 <% } %>
[7bc636b]27 <button type="button" class="view-switch-btn" data-view="timeline" role="tab"
28 aria-selected="<%= (typeof site !== 'undefined' && site && site.feed_view_default === 'grid') ? 'false' : 'true' %>">
29 <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>
30 <span>Tijdlijn</span>
31 </button>
32 <button type="button" class="view-switch-btn" data-view="grid" role="tab"
33 aria-selected="<%= (typeof site !== 'undefined' && site && site.feed_view_default === 'grid') ? 'true' : 'false' %>">
34 <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>
35 <span>Grid</span>
36 </button>
37 </div>
38 <div class="grid-cols-picker" aria-label="Aantal kolommen">
39 <button type="button" class="grid-cols-btn" data-cols="2" title="2 kolommen">2</button>
40 <button type="button" class="grid-cols-btn" data-cols="3" title="3 kolommen">3</button>
41 <button type="button" class="grid-cols-btn" data-cols="4" title="4 kolommen">4</button>
42 </div>
43 </div>
44</div>
Note: See TracBrowser for help on using the repository browser.