Changeset c974223 in Klonkt


Ignore:
Timestamp:
06/16/2026 07:28:52 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
1578f5d
Parents:
ec2e358
Message:

Archive: always timeline list, ignores grid choice (fix: grid→archive was broken)

The archive adopted the grid view when grid was active (CSS hid the
year/month list and showed tiles) → confusing/broken. Archive now ignores
data-feed-view entirely: always the chronological list. on-archive grid CSS
+ dead grid section removed. Switcher stays grey on archive (previous
commit) and jumps back to the feed on click.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

Location:
src
Files:
2 edited

Legend:

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

    rec2e358 rc974223  
    20672067
    20682068/* -------- FEED TOGGLE VIA BODY --------
    2069    Grid-modus werkt op elke feed-pagina (home, archive). Op een post-pagina
    2070    is de feed-timeline article juist het hoofdonderwerp — daar moet 'ie
    2071    altijd zichtbaar zijn, dus de grid-toggle slaat alleen aan op
    2072    feed-pagina's (.on-home, .on-archive). Andere body-classes negeren de
     2069   Grid-modus werkt op de feed (home, cirkel). Het ARCHIEF negeert de grid-keuze
     2070   bewust: dat is altijd de chronologische jaar/maand-lijst (de switcher is daar
     2071   grijs en springt bij klik terug naar de feed). Post-pagina's tonen de
     2072   feed-timeline article sowieso altijd. Alle andere body-classes negeren
    20732073   data-feed-view en houden timeline visible. */
    20742074body.on-home[data-feed-view="grid"]    .feed-timeline,
     
    20762076body.on-home[data-feed-view="grid"]    .related-posts,
    20772077body.on-home[data-feed-view="grid"]    .article-footer,
    2078 body.on-archive[data-feed-view="grid"] .feed-timeline,
    2079 body.on-archive[data-feed-view="grid"] .pagination,
    20802078body.on-cirkel[data-feed-view="grid"]  .feed-timeline {
    20812079    display: none !important;
    20822080}
    2083 /* Grid-sectie alleen zichtbaar op feed-pagina's in grid-mode */
     2081/* Grid-sectie alleen zichtbaar op de feed in grid-mode (NIET op archief) */
    20842082.feed-grid { display: none; }
    20852083body.on-home[data-feed-view="grid"]    .feed-grid,
    2086 body.on-archive[data-feed-view="grid"] .feed-grid,
    20872084body.on-cirkel[data-feed-view="grid"]  .feed-grid { display: block; }
    20882085
  • src/views/pages/archive.ejs

    rec2e358 rc974223  
    1 <%
    2 // Archive — chronological feed of all posts.
    3 //
    4 // Renders both a timeline view (year/month grouped link list) AND a grid
    5 // view (flat tiles) — same toggle pattern as home.ejs. The view-switcher
    6 // at the top lets the user pick. Body class is `on-archive`; the inline
    7 // <style> below adds an `.on-archive` clause to the existing home-only
    8 // feed toggle in style.css (cleaner than editing the global CSS).
    9 //
    10 // Flatten posts for grid mode: skip the year/month grouping (it doesn't
    11 // translate well to a tile grid). Newest-first order is preserved by the
    12 // route's SQL ORDER BY.
    13 const _flatPosts = [];
    14 Object.keys(grouped).sort((a, b) => b - a).forEach(function(y) {
    15   Object.keys(grouped[y]).forEach(function(m) {
    16     grouped[y][m].forEach(function(p) { _flatPosts.push(p); });
    17   });
    18 });
    19 %>
     1<%# Archief — altijd de chronologische jaar/maand-lijst. Het archief negeert
     2    bewust de timeline/grid-keuze (geen grid-weergave): de view-switcher is hier
     3    grijs en springt bij klik terug naar de feed. Zie de CSS in style.css. %>
    204
    21 <%# View switcher used to be rendered here; now lives in shell.ejs above
    22     #pcms-main, visible on every non-admin page. %>
    23 
    24 <!-- ========== TIMELINE (year/month grouped) ========== -->
     5<!-- ========== TIJDLIJN (jaar/maand gegroepeerd) ========== -->
    256<div class="container archive-page feed-timeline">
    267  <% var _archBase = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; %>
     
    6142</div>
    6243
    63 <!-- ========== GRID (only visible when body[data-feed-view="grid"]) ========== -->
    64 <% if (_flatPosts.length > 0) { %>
    65 <section class="feed-grid container" aria-label="Grid-weergave">
    66   <div class="grid-tiles">
    67     <% _flatPosts.forEach(function(post) { %>
    68       <%- include('../partials/post-tile', { post: post }) %>
    69     <% }); %>
    70   </div>
    71 </section>
    72 <% } %>
    73 
    7444<style>
    7545.archive-page { max-width: 700px; margin: 2rem auto; padding: 0 1rem; }
Note: See TracChangeset for help on using the changeset viewer.