Changeset c974223 in Klonkt
- Timestamp:
- 06/16/2026 07:28:52 AM (3 months ago)
- Branches:
- main
- Children:
- 1578f5d
- Parents:
- ec2e358
- Location:
- src
- Files:
-
- 2 edited
-
assets/css/style.css (modified) (2 diffs)
-
views/pages/archive.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/css/style.css
rec2e358 rc974223 2067 2067 2068 2068 /* -------- FEED TOGGLE VIA BODY -------- 2069 Grid-modus werkt op elke feed-pagina (home, archive). Op een post-pagina2070 is de feed-timeline article juist het hoofdonderwerp — daar moet 'ie2071 altijd zichtbaar zijn, dus de grid-toggle slaat alleen aan op2072 feed- pagina's (.on-home, .on-archive). Andere body-classes negeren de2069 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 2073 2073 data-feed-view en houden timeline visible. */ 2074 2074 body.on-home[data-feed-view="grid"] .feed-timeline, … … 2076 2076 body.on-home[data-feed-view="grid"] .related-posts, 2077 2077 body.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,2080 2078 body.on-cirkel[data-feed-view="grid"] .feed-timeline { 2081 2079 display: none !important; 2082 2080 } 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) */ 2084 2082 .feed-grid { display: none; } 2085 2083 body.on-home[data-feed-view="grid"] .feed-grid, 2086 body.on-archive[data-feed-view="grid"] .feed-grid,2087 2084 body.on-cirkel[data-feed-view="grid"] .feed-grid { display: block; } 2088 2085 -
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. %> 20 4 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) ========== --> 25 6 <div class="container archive-page feed-timeline"> 26 7 <% var _archBase = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; %> … … 61 42 </div> 62 43 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 74 44 <style> 75 45 .archive-page { max-width: 700px; margin: 2rem auto; padding: 0 1rem; }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)