Changeset 43dbf9c in Klonkt for src/views/pages/circle-feed.ejs
- Timestamp:
- 06/16/2026 01:52:09 AM (3 months ago)
- Branches:
- main
- Children:
- 9f81a09
- Parents:
- aa7f548
- File:
-
- 1 edited
-
src/views/pages/circle-feed.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/circle-feed.ejs
raa7f548 r43dbf9c 1 <div class="container circle-page"> 2 <header class="circle-head"> 3 <h1>Cirkel</h1> 4 <p class="circle-sub">Wat er speelt bij de andere sites in deze cirkel.</p> 5 </header> 1 <div class="container cirkel-head"> 2 <h1>Cirkel</h1> 3 <p class="cirkel-sub">Wat er speelt bij de andere sites in deze cirkel.</p> 4 </div> 6 5 7 <% if (!posts.length) { %> 8 <p class="circle-empty">Nog niets in je cirkel. Voeg sites toe via 6 <% if (!posts.length) { %> 7 <div class="container"> 8 <p class="cirkel-empty">Nog niets in je cirkel. Voeg sites toe via 9 9 <a href="/admin/circle">Beheer › Cirkel</a> en ververs ze.</p> 10 <% } else { %> 11 <div class="circle-grid"> 12 <% posts.forEach(function(p){ %> 13 <article class="circle-card"> 14 <% if (p.image) { %> 15 <a class="cc-cover" <% if (p.url) { %>href="<%= p.url %>" target="_blank" rel="noopener"<% } %>> 16 <img loading="lazy" src="<%= p.image %>" alt=""> 17 </a> 18 <% } %> 19 <div class="cc-body"> 20 <div class="cc-src"> 21 <% if (p.actorAvatar) { %><img class="cc-avatar" src="<%= p.actorAvatar %>" alt=""><% } %> 22 <% if (p.actorUrl) { %> 23 <a href="<%= p.actorUrl %>" target="_blank" rel="noopener"><%= p.actorName %></a> 24 <% } else { %><span><%= p.actorName %></span><% } %> 25 </div> 26 <h2 class="cc-title"> 27 <% if (p.url) { %><a href="<%= p.url %>" target="_blank" rel="noopener"><%= p.title %></a> 28 <% } else { %><%= p.title %><% } %> 29 </h2> 30 <% if (p.summary) { %><p class="cc-summary"><%= p.summary %></p><% } %> 31 <div class="cc-foot"> 32 <% if (p.published) { %><span class="cc-date"><%= p.published.slice(0,10) %></span><% } %> 33 <% if (p.url) { %><a class="cc-link" href="<%= p.url %>" target="_blank" rel="noopener">Lees bij de bron →</a><% } %> 34 </div> 35 </div> 36 </article> 10 </div> 11 <% } else { %> 12 13 <%# Dezelfde view als de hoofdpagina: timeline (post-card) + grid (post-tile), 14 gewisseld door de view-switcher via body[data-feed-view]. De remote-posts 15 zijn in circle.js naar het lokale post-shape gevormd (met external_url, 16 zodat de kaarten naar de bron-site linken). %> 17 18 <!-- ===== TIMELINE (standaard) ===== --> 19 <div class="container feed-timeline"> 20 <ul class="post-list feed-timeline-list"> 21 <% posts.forEach(function(post){ %> 22 <%- include('../partials/post-card', { post: post }) %> 23 <% }); %> 24 </ul> 25 </div> 26 27 <!-- ===== GRID (body[data-feed-view="grid"]) ===== --> 28 <section class="feed-grid container" aria-label="Grid-weergave"> 29 <div class="grid-tiles"> 30 <% posts.forEach(function(post){ %> 31 <%- include('../partials/post-tile', { post: post }) %> 37 32 <% }); %> 38 33 </div> 39 <% } %> 40 </div> 34 </section> 35 36 <% } %> 41 37 42 38 <style> 43 .circle-page { max-width: 1000px; margin: 2.5rem auto; padding: 0 1rem; } 44 .circle-head h1 { font-family: var(--font-display, serif); font-size: 2rem; margin: 0 0 .25rem; } 45 .circle-sub { color: var(--ink-muted); margin: 0 0 2rem; } 46 .circle-empty { color: var(--ink-muted); } 47 .circle-empty a { color: var(--accent); } 48 .circle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; } 49 .circle-card { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--paper-2); } 50 .cc-cover { display: block; aspect-ratio: 16/9; overflow: hidden; } 51 .cc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; } 52 .cc-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; } 53 .cc-src { display: flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--ink-muted); } 54 .cc-src a { color: var(--ink-muted); text-decoration: none; } 55 .cc-src a:hover { color: var(--accent); } 56 .cc-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; } 57 .cc-title { font-family: var(--font-display, serif); font-size: 1.15rem; margin: 0; line-height: 1.25; } 58 .cc-title a { color: var(--ink); text-decoration: none; } 59 .cc-title a:hover { color: var(--accent); } 60 .cc-summary { margin: 0; font-size: .9rem; color: var(--ink-soft, var(--ink-muted)); line-height: 1.5; 61 display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } 62 .cc-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: auto; padding-top: .35rem; font-size: .78rem; } 63 .cc-date { color: var(--ink-muted); } 64 .cc-link { color: var(--accent); text-decoration: none; white-space: nowrap; } 39 .cirkel-head { margin-top: 2rem; } 40 .cirkel-head h1 { font-family: var(--font-display, serif); font-size: 2rem; margin: 0 0 .25rem; } 41 .cirkel-sub { color: var(--ink-muted); margin: 0 0 1.5rem; } 42 .cirkel-empty { color: var(--ink-muted); } 43 .cirkel-empty a { color: var(--accent); } 65 44 </style>
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)