Changeset c974223 in Klonkt for src/views/pages/archive.ejs


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.