source: Klonkt/src/views/pages/circle-post.ejs@ 8453812

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

Circles: local read page /cirkel/:id (stay on your site) + source in new tab

Feed cards now link locally (htmx) to /cirkel/<id> instead of externally. The
read page shows title, 'via <source>', date, cached text (plain, white-space:pre-wrap)
+ cover, with 'Read more at <source>' -> target=_blank.

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

  • Property mode set to 100644
File size: 2.3 KB
Line 
1<article class="container cirkel-post">
2 <p class="cirkel-post-back">
3 <a href="/cirkel" hx-get="/cirkel?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
4 hx-push-url="/cirkel" hx-indicator="#pcms-loading">&larr; Cirkel</a>
5 </p>
6
7 <header class="cirkel-post-head">
8 <div class="cirkel-post-src">
9 <% if (post.sourceAvatar) { %><img class="cirkel-post-avatar" src="<%= post.sourceAvatar %>" alt=""><% } %>
10 <span>via
11 <% if (post.sourceUrl) { %><a href="<%= post.sourceUrl %>" target="_blank" rel="noopener"><%= post.sourceName %></a>
12 <% } else { %><%= post.sourceName %><% } %>
13 </span>
14 <% if (post.published) { %><span class="cirkel-post-date">&middot; <%= post.published.slice(0, 10) %></span><% } %>
15 </div>
16 <h1 class="cirkel-post-title"><%= post.title %></h1>
17 </header>
18
19 <% if (post.image) { %>
20 <img class="cirkel-post-cover" src="<%= post.image %>" alt="" loading="lazy">
21 <% } %>
22
23 <div class="cirkel-post-body"><%= post.body %></div>
24
25 <% if (post.originalUrl) { %>
26 <p class="cirkel-post-readmore">
27 <a href="<%= post.originalUrl %>" target="_blank" rel="noopener">Lees verder bij <%= post.sourceName %> &rarr;</a>
28 </p>
29 <% } %>
30</article>
31
32<style>
33.cirkel-post { max-width: 720px; margin: 2rem auto; }
34.cirkel-post-back a { color: var(--ink-muted); text-decoration: none; font-size: .85rem; }
35.cirkel-post-back a:hover { color: var(--accent); }
36.cirkel-post-head { margin: 1rem 0 1.25rem; }
37.cirkel-post-src { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--ink-muted); margin-bottom: .5rem; }
38.cirkel-post-src a { color: var(--ink-muted); }
39.cirkel-post-src a:hover { color: var(--accent); }
40.cirkel-post-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
41.cirkel-post-title { font-family: var(--font-display, serif); font-size: 1.9rem; line-height: 1.15; margin: 0; }
42.cirkel-post-cover { width: 100%; border-radius: var(--radius); margin: 0 0 1.5rem; display: block; }
43.cirkel-post-body { font-size: 1.05rem; line-height: 1.7; white-space: pre-wrap; color: var(--ink); }
44.cirkel-post-readmore { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
45.cirkel-post-readmore a { color: var(--accent); text-decoration: none; font-weight: 600; }
46</style>
Note: See TracBrowser for help on using the repository browser.