source: Klonkt/src/views/pages/archive.ejs@ d8c6a83

main
Last change on this file since d8c6a83 was c974223, checked in by roboburr <roboburr@…>, 3 months ago

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

  • Property mode set to 100644
File size: 2.6 KB
Line 
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. %>
4
5<!-- ========== TIJDLIJN (jaar/maand gegroepeerd) ========== -->
6<div class="container archive-page feed-timeline">
7 <% var _archBase = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; %>
8 <p class="archive-back-row">
9 <a href="<%= _archBase %>/" class="btn archive-back"
10 hx-get="<%= _archBase %>/?partial=1" hx-target="#pcms-main"
11 hx-push-url="<%= _archBase %>/" hx-indicator="#pcms-loading">&larr; Terug</a>
12 </p>
13 <h1>Archief</h1>
14 <p class="archive-meta"><%= totalPosts %> bericht<%= totalPosts !== 1 ? 'en' : '' %></p>
15
16 <% if (totalPosts === 0) { %>
17 <p class="empty-state">Nog geen berichten.</p>
18 <% } %>
19
20 <% Object.keys(grouped).sort((a,b) => b - a).forEach(year => { %>
21 <section class="archive-year">
22 <h2><%= year %></h2>
23 <% Object.keys(grouped[year]).forEach(month => { %>
24 <div class="archive-month">
25 <h3><%= month %></h3>
26 <ul>
27 <% grouped[year][month].forEach(post => { %>
28 <li>
29 <a href="/<%= post.slug %>"
30 hx-get="/<%= post.slug %>?partial=1" hx-target="#pcms-main"
31 hx-push-url="/<%= post.slug %>" hx-indicator="#pcms-loading">
32 <%= post.title %>
33 </a>
34 <span class="archive-author">— <%= post.author_username %></span>
35 </li>
36 <% }); %>
37 </ul>
38 </div>
39 <% }); %>
40 </section>
41 <% }); %>
42</div>
43
44<style>
45.archive-page { max-width: 700px; margin: 2rem auto; padding: 0 1rem; }
46.archive-back-row { margin: 0 0 1rem; }
47.archive-page h1 { font-family: var(--font-display, serif); margin: 0 0 0.25rem; }
48.archive-meta { color: var(--ink-muted); margin-bottom: 2rem; }
49.archive-year { margin-bottom: 2.5rem; }
50.archive-year h2 { font-family: var(--font-display, serif); font-size: 1.8rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--accent); margin: 0 0 1rem; }
51.archive-month { margin: 1.5rem 0 1.5rem 1rem; }
52.archive-month h3 { font-size: 1.05rem; color: var(--ink-muted); text-transform: capitalize; margin: 0 0 0.5rem; font-weight: 500; }
53.archive-page ul { list-style: none; padding: 0 0 0 1rem; margin: 0; }
54.archive-page li { padding: 0.4rem 0; }
55.archive-page a { color: var(--ink); text-decoration: none; font-weight: 500; }
56.archive-page a:hover { color: var(--accent); }
57.archive-author { color: var(--ink-muted); font-size: 0.85rem; margin-left: 0.5rem; }
58</style>
Note: See TracBrowser for help on using the repository browser.