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

main
Last change on this file since 7eb35ae was 221a209, checked in by roboburr <roboburr@…>, 3 months ago

Circle: carry over + display tags from the original post

Publisher puts tags as AS Hashtag array in the outbox (href pointing to the
source tag page). Consumer parses + caches them (remote_posts.tags). Feed
cards display them (post-card), and the reader shows tag chips that link to
the /tag page of the source.

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

  • Property mode set to 100644
File size: 3.0 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.tags && post.tags.length) { %>
26 <div class="cirkel-post-tags">
27 <% post.tags.forEach(function(t){ %>
28 <% if (post.sourceTagBase) { %>
29 <a class="cirkel-tag" href="<%= post.sourceTagBase %>/tag/<%= encodeURIComponent(t) %>" target="_blank" rel="noopener">#<%= t %></a>
30 <% } else { %>
31 <span class="cirkel-tag">#<%= t %></span>
32 <% } %>
33 <% }); %>
34 </div>
35 <% } %>
36
37 <% if (post.originalUrl) { %>
38 <p class="cirkel-post-readmore">
39 <a href="<%= post.originalUrl %>" target="_blank" rel="noopener">Lees verder bij <%= post.sourceName %> &rarr;</a>
40 </p>
41 <% } %>
42</article>
43
44<style>
45.cirkel-post { max-width: 720px; margin: 2rem auto; }
46.cirkel-post-back a { color: var(--ink-muted); text-decoration: none; font-size: .85rem; }
47.cirkel-post-back a:hover { color: var(--accent); }
48.cirkel-post-head { margin: 1rem 0 1.25rem; }
49.cirkel-post-src { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--ink-muted); margin-bottom: .5rem; }
50.cirkel-post-src a { color: var(--ink-muted); }
51.cirkel-post-src a:hover { color: var(--accent); }
52.cirkel-post-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
53.cirkel-post-title { font-family: var(--font-display, serif); font-size: 1.9rem; line-height: 1.15; margin: 0; }
54.cirkel-post-cover { width: 100%; border-radius: var(--radius); margin: 0 0 1.5rem; display: block; }
55.cirkel-post-body { font-size: 1.05rem; line-height: 1.7; white-space: pre-wrap; color: var(--ink); }
56.cirkel-post-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; }
57.cirkel-tag { font-size: .8rem; color: var(--ink-muted); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 999px; padding: .15rem .6rem; text-decoration: none; }
58.cirkel-tag:hover { border-color: var(--accent); color: var(--accent); }
59.cirkel-post-readmore { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
60.cirkel-post-readmore a { color: var(--accent); text-decoration: none; font-weight: 600; }
61</style>
Note: See TracBrowser for help on using the repository browser.