Changeset 4dcefa1 in Klonkt


Ignore:
Timestamp:
06/20/2026 08:11:45 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
1c6d61c
Parents:
6eeb459
Message:

fix(agenda): robust grey-on-calendar (htmx-proof) via source rule + element classes

The body.class-override CSS didn't take effect after htmx nav. Now:

  • Timeline/Grid: style.css active rule excluded on .on-shows/.on-downloads (same rule that does react to htmx) → grey there, normal on the feed.
  • Solo/Circle + grid-cols: not rendered as 'active' on non-feed pages in the template (server-rendered in the OOB chrome → htmx-proof).
  • Calendar active via element class .vs-agenda.is-active (not body class).

style.css?v=19.

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

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/style.css

    r6eeb459 r4dcefa1  
    21332133   Niet op de Archive-pagina: daar is geen "huidige" timeline/grid-keuze, dus beide
    21342134   knoppen blijven neutraal (grijs). */
    2135 body[data-feed-view="timeline"]:not(.on-archive) .view-switch-btn[data-view="timeline"],
    2136 body[data-feed-view="grid"]:not(.on-archive) .view-switch-btn[data-view="grid"] {
     2135body[data-feed-view="timeline"]:not(.on-archive):not(.on-shows):not(.on-downloads) .view-switch-btn[data-view="timeline"],
     2136body[data-feed-view="grid"]:not(.on-archive):not(.on-shows):not(.on-downloads) .view-switch-btn[data-view="grid"] {
    21372137    background: var(--ink);
    21382138    color: var(--paper);
  • src/views/partials/shared-styles.ejs

    r6eeb459 r4dcefa1  
    5050}
    5151.vs-agenda:hover { color: var(--ink); }
    52 /* Op de agendapagina = helder/wit (geen pilletje, past bij de losse-link-look). */
    53 body.on-shows .vs-agenda { color: var(--ink); font-weight: 600; }
     52/* Actief (op de agendapagina) = helder/wit. Element-class (in de OOB-gerenderde
     53   chrome) i.p.v. body-class-CSS → werkt betrouwbaar ook na htmx-navigatie. */
     54.vs-agenda.is-active { color: var(--ink); font-weight: 600; }
    5455
    5556.grid-cols-picker {
     
    9798}
    9899
    99 /* Op de agenda- én downloads-pagina is ALLES behalve de Agenda-pill neutraal/grijs
    100    (je bent daar niet in een feed-weergave). !important + body.on-X (betrouwbaar
    101    gezet/gestript via PAGE_CLASSES) → overrult de feed-active-regel ZONDER naar de
    102    feed te lekken (de selector matcht alleen op die pagina's). */
    103 body.on-shows .view-switch-btn,
    104 body.on-downloads .view-switch-btn {
    105   background: transparent !important;
    106   color: var(--ink-muted, var(--ink-soft)) !important;
    107   border-color: var(--rule) !important;
    108 }
    109 body.on-shows .feed-scope-btn.is-active,
    110 body.on-downloads .feed-scope-btn.is-active {
    111   background: transparent !important;
    112   color: var(--ink-muted, var(--ink-soft)) !important;
    113 }
    114 body.on-shows .grid-cols-btn.is-active,
    115 body.on-downloads .grid-cols-btn.is-active {
    116   background: var(--paper-2) !important;
    117   color: var(--ink-muted, var(--ink-soft)) !important;
    118   border-color: var(--rule) !important;
    119 }
    120100
    121101/* Spacing between switcher-bar and the page content below.
  • src/views/partials/view-switcher.ejs

    r6eeb459 r4dcefa1  
    33    handlers are wired in shell.ejs via event-delegation on document so
    44    HTMX-swapped content keeps working without rebinding. %>
     5<%
     6  var _bc = (typeof bodyClass === 'string') ? bodyClass : '';
     7  var _onShows = _bc.indexOf('on-shows') >= 0;
     8  // Pagina's zonder actieve feed-weergave → niets in de pill is 'actief' (Solo/Cirkel
     9  // + Tijdlijn/Grid grijs). Alleen Agenda krijgt z'n eigen is-active op de agenda.
     10  var _neutral = ['on-shows','on-downloads','on-post','on-epk','on-linkbio','on-newsletter','on-archive']
     11                   .some(function(c){ return _bc.indexOf(c) >= 0; });
     12%>
    513<div class="view-switcher-wrap">
    614  <div class="container">
     
    917    %>
    1018    <div class="agenda-pill">
    11       <a class="vs-agenda" href="<%= _sbA %>/shows" aria-label="Agenda — evenementen">
     19      <a class="vs-agenda<%= _onShows ? ' is-active' : '' %>" href="<%= _sbA %>/shows" aria-label="Agenda — evenementen">
    1220        <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>
    1321        <span>Agenda</span>
     
    2028    %>
    2129    <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>
     30      <a class="feed-scope-btn<%= (!_neutral && !_onCirkel) ? ' is-active' : '' %>" href="<%= _sb %>/"
     31         role="tab" aria-selected="<%= (!_neutral && !_onCirkel) ? 'true' : 'false' %>">Solo</a>
     32      <a class="feed-scope-btn<%= (!_neutral && _onCirkel) ? ' is-active' : '' %>" href="<%= _sb %>/cirkel"
     33         role="tab" aria-selected="<%= (!_neutral && _onCirkel) ? 'true' : 'false' %>">Cirkel</a>
    2634    </div>
    2735    <% } %>
     
    3846      </button>
    3947    </div>
     48    <% if (!_neutral) { %>
    4049    <div class="grid-cols-picker" aria-label="Aantal kolommen">
    4150      <button type="button" class="grid-cols-btn" data-cols="2" title="2 kolommen">2</button>
     
    4352      <button type="button" class="grid-cols-btn" data-cols="4" title="4 kolommen">4</button>
    4453    </div>
     54    <% } %>
    4555  </div>
    4656</div>
  • src/views/shell.ejs

    r6eeb459 r4dcefa1  
    163163
    164164<!-- v9 stylesheet (full palette system) -->
    165 <link rel="stylesheet" href="/assets/css/style.css?v=18">
     165<link rel="stylesheet" href="/assets/css/style.css?v=19">
    166166
    167167<!-- Audio player styles: loaded on every page so the mini-player works
Note: See TracChangeset for help on using the changeset viewer.