Changeset 1eff06a in Klonkt


Ignore:
Timestamp:
06/20/2026 07:57:56 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
6eeb459
Parents:
da4387b
Message:

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@…>

Location:
src/views/partials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/shared-styles.ejs

    rda4387b r1eff06a  
    3838.view-switch-btn[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
    3939
    40 /* Agenda-link (evenementen) als eerste item IN de Tijdlijn/Grid-pill —
    41    exact dezelfde maatvoering als .view-switch-btn, maar het is een nav-link. */
     40/* Agenda = een EIGEN pill (los van Tijdlijn/Grid, zodat de feed-toggle nooit
     41   verstoord raakt). Zelfde look als de view-switcher-pill. Zichtbaar in alle modi. */
     42.agenda-pill { display: inline-flex; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 999px; padding: 0.15rem; }
    4243.vs-agenda {
    4344  display: inline-flex; align-items: center; gap: 0.35rem;
     
    5051}
    5152.vs-agenda:hover { color: var(--ink); }
    52 /* Agenda actief op de agendapagina = wit pilletje (zelfde look als de andere
    53    actieve pill-knoppen: lichte achtergrond, donkere tekst). */
    54 .vs-agenda.is-active { background: var(--ink); color: var(--paper); }
     53/* Op de agendapagina = wit pilletje (zelfde actieve look als Tijdlijn/Grid). */
     54body.on-shows .vs-agenda { background: var(--ink); color: var(--paper); }
    5555
    5656.grid-cols-picker {
     
    9292body.on-post[data-grid-cols="2"] .grid-cols-btn[data-cols="2"],
    9393body.on-post[data-grid-cols="3"] .grid-cols-btn[data-cols="3"],
    94 body.on-post[data-grid-cols="4"] .grid-cols-btn[data-cols="4"],
    95 /* Op de agenda- én downloads-pagina is er geen actieve feed-weergave → Tijdlijn/
    96    Grid (+cols) grijs. (Agenda blijft via .vs-agenda.is-active wél gemarkeerd.) */
    97 body.on-shows[data-feed-view="timeline"] .view-switch-btn[data-view="timeline"],
    98 body.on-shows[data-feed-view="grid"] .view-switch-btn[data-view="grid"],
    99 body.on-shows[data-grid-cols="2"] .grid-cols-btn[data-cols="2"],
    100 body.on-shows[data-grid-cols="3"] .grid-cols-btn[data-cols="3"],
    101 body.on-shows[data-grid-cols="4"] .grid-cols-btn[data-cols="4"],
    102 body.on-downloads[data-feed-view="timeline"] .view-switch-btn[data-view="timeline"],
    103 body.on-downloads[data-feed-view="grid"] .view-switch-btn[data-view="grid"],
    104 body.on-downloads[data-grid-cols="2"] .grid-cols-btn[data-cols="2"],
    105 body.on-downloads[data-grid-cols="3"] .grid-cols-btn[data-cols="3"],
    106 body.on-downloads[data-grid-cols="4"] .grid-cols-btn[data-cols="4"] {
     94body.on-post[data-grid-cols="4"] .grid-cols-btn[data-cols="4"] {
    10795  background: transparent;
    10896  color: var(--ink-muted, var(--ink-soft));
    10997  border-color: var(--rule);
    110 }
    111 /* Solo/Cirkel ook neutraal op agenda/downloads (base-regel gebruikt !important). */
    112 body.on-shows .view-switcher-wrap .feed-scope-btn.is-active,
    113 body.on-downloads .view-switcher-wrap .feed-scope-btn.is-active {
    114   background: transparent !important;
    115   color: var(--ink-muted, var(--ink-soft)) !important;
    11698}
    11799
  • src/views/partials/view-switcher.ejs

    rda4387b r1eff06a  
    55<div class="view-switcher-wrap">
    66  <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    <% } %>
    717    <% if (typeof tenancy !== 'undefined' && tenancy === 'circle') {
    818         var _onCirkel = (typeof bodyClass === 'string' && bodyClass.indexOf('on-cirkel') >= 0);
     
    1727    <% } %>
    1828    <div class="view-switcher" role="tablist" aria-label="Weergave">
    19       <% if (typeof premiumUnlocked !== 'undefined' && premiumUnlocked && typeof agendaEnabled !== 'undefined' && agendaEnabled) {
    20            var _sbA = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
    21            var _agActive = (typeof bodyClass === 'string' && bodyClass.indexOf('on-shows') >= 0);
    22       %>
    23       <a class="vs-agenda<%= _agActive ? ' is-active' : '' %>" href="<%= _sbA %>/shows" aria-label="Agenda — evenementen">
    24         <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>
    25         <span>Agenda</span>
    26       </a>
    27       <% } %>
    2829      <button type="button" class="view-switch-btn" data-view="timeline" role="tab"
    2930              aria-selected="<%= (typeof site !== 'undefined' && site && site.feed_view_default === 'grid') ? 'false' : 'true' %>">
Note: See TracChangeset for help on using the changeset viewer.