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

main
Last change on this file since ddecd9a was 7bc636b, checked in by Robin <robin@…>, 4 months ago

Initial commit — PrutFolio v1 source (pulled from Hetzner /srv/prutfolio)

  • Property mode set to 100644
File size: 2.0 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 <div class="view-switcher" role="tablist" aria-label="Weergave">
8 <button type="button" class="view-switch-btn" data-view="timeline" role="tab"
9 aria-selected="<%= (typeof site !== 'undefined' && site && site.feed_view_default === 'grid') ? 'false' : 'true' %>">
10 <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>
11 <span>Tijdlijn</span>
12 </button>
13 <button type="button" class="view-switch-btn" data-view="grid" role="tab"
14 aria-selected="<%= (typeof site !== 'undefined' && site && site.feed_view_default === 'grid') ? 'true' : 'false' %>">
15 <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>
16 <span>Grid</span>
17 </button>
18 </div>
19 <div class="grid-cols-picker" aria-label="Aantal kolommen">
20 <button type="button" class="grid-cols-btn" data-cols="2" title="2 kolommen">2</button>
21 <button type="button" class="grid-cols-btn" data-cols="3" title="3 kolommen">3</button>
22 <button type="button" class="grid-cols-btn" data-cols="4" title="4 kolommen">4</button>
23 </div>
24 </div>
25</div>
Note: See TracBrowser for help on using the repository browser.