source: Klonkt/src/views/pages/post.ejs@ 5190152

main
Last change on this file since 5190152 was 476d6e7, checked in by Robin <roboburr@โ€ฆ>, 8 weeks ago

Spoor A step 3a: extract nsfw-veil partial (7 copies โ†’ 1)

The NSFW veil contents (๐Ÿ”ž label + reveal button) were copy-pasted in 7 spots
across post-card, post-tile, post.ejs (related) and news.ejs, each with its own
content_warning variable. Extract the identical inner block into
partials/nsfw-veil.ejs; each caller keeps its exact wrapper element, so the
rendered HTML is byte-identical (verified live: the homepage card emits the
same veil markup as before, both include paths resolve).

Co-Authored-By: Claude Opus 4.8 <noreply@โ€ฆ>

  • Property mode set to 100644
File size: 27.2 KB
Lineย 
1<%
2// In hub mode the site is accessible under /user/<slug>; all site-scoped links
3// (tag, edit, delete, comments) must carry that prefix otherwise they fall back
4// to the primary site โ†’ 404 / wrong site. In solo mode _base = ''.
5const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
6%>
7<article class="container post-page<%= post.nsfw ? ' nsfw-gate' : '' %>">
8
9 <%# Navigation across ALL posts โ€” ABOVE the post (shared partial). %>
10 <%- include('../partials/post-nav', { newerPost: newerPost, olderPost: olderPost }) %>
11
12 <% if (post.nsfw) { %>
13 <div class="nsfw-banner">
14 <span class="nsfw-banner-icon">๐Ÿ”ž</span>
15 <span class="nsfw-banner-text"><%= post.content_warning || t('post.nsfw_warning') %></span>
16 <button type="button" class="nsfw-banner-btn nsfw-reveal"><%= t('post.nsfw_show') %></button>
17 </div>
18 <% } %>
19
20 <% if (post.cover_image_url) { %>
21 <figure class="post-cover">
22 <img src="<%= post.cover_image_url %>" alt="<%= post.cover_alt || '' %>"<% if (post.cover_video_url) { %> data-ios-mp4="<%= post.cover_video_url %>"<% } %>>
23 </figure>
24 <% } else if (post.cover_video_url) { %>
25 <figure class="post-cover">
26 <video src="<%= post.cover_video_url %>" poster="<%= thumb(post.cover_video_url, 1280) %>" controls loop muted playsinline preload="metadata"></video>
27 </figure>
28 <% } %>
29
30 <header class="post-header">
31 <h1 class="post-title"><%= post.title %></h1>
32 <div class="post-meta">
33 <a class="author" href="/users/<%= encodeURIComponent(post.author_username) %>"
34 hx-get="/users/<%= encodeURIComponent(post.author_username) %>?partial=1"
35 hx-target="#pcms-main" hx-swap="innerHTML"
36 hx-push-url="/users/<%= encodeURIComponent(post.author_username) %>"
37 hx-indicator="#pcms-loading"><%= post.author_username %></a>
38 <span class="meta-sep">ยท</span>
39 <time datetime="<%= post.published_at || post.created_at %>"><%= formatDate(post.published_at || post.created_at) %></time>
40 <% if (post.status !== 'published') { %>
41 <span class="meta-sep">ยท</span>
42 <span class="status-badge status-<%= post.status %>"><%= post.status %></span>
43 <% } %>
44 </div>
45 </header>
46
47 <div class="post-content">
48 <%- post.content_html %>
49 </div>
50
51 <% if (typeof poll !== 'undefined' && poll) { %>
52 <section class="poll" aria-label="<%= t('poll.aria') %>">
53 <% poll.options.forEach(function(o){ var _lead = poll.total > 0 && o.count === Math.max.apply(null, poll.options.map(function(x){return x.count;})); %>
54 <div class="poll-opt<%= _lead ? ' is-lead' : '' %>">
55 <div class="poll-bar" style="width:<%= o.pct %>%"></div>
56 <span class="poll-name"><%= o.name %></span>
57 <span class="poll-pct"><%= o.pct %>%</span>
58 </div>
59 <% }); %>
60 <div class="poll-meta">
61 <span><%= poll.voters %> <%= poll.voters === 1 ? t('poll.voter_one') : t('poll.voter_many') %></span>
62 <span aria-hidden="true">ยท</span>
63 <% if (poll.closed) { %>
64 <span><%= t('poll.closed') %></span>
65 <% } else if (poll.endTime) { %>
66 <span><%= t('poll.closes') %> <%= new Date(poll.endTime).toLocaleString() %></span>
67 <% } %>
68 <% if (poll.multiple) { %><span aria-hidden="true">ยท</span><span><%= t('poll.multiple') %></span><% } %>
69 </div>
70 <p class="poll-note"><%= t('poll.fedi_only') %></p>
71 </section>
72 <% } %>
73
74 <% if (post.tags && post.tags.length > 0) { %>
75 <div class="post-tags">
76 <% post.tags.forEach(t => { %>
77 <a class="tag" href="<%= _base %>/tag/<%= encodeURIComponent(t) %>"
78 hx-get="<%= _base %>/tag/<%= encodeURIComponent(t) %>?partial=1"
79 hx-target="#pcms-main" hx-swap="innerHTML"
80 hx-push-url="<%= _base %>/tag/<%= encodeURIComponent(t) %>"
81 hx-indicator="#pcms-loading">#<%= t %></a>
82 <% }); %>
83 </div>
84 <% } %>
85
86 <div class="post-share" style="margin:1.25rem 0;display:flex;align-items:center;gap:.6rem;flex-wrap:wrap">
87 <button type="button" class="btn post-share-btn" data-share data-share-title="<%= post.title %>">๐Ÿ”— <%= t('post.share') %></button>
88 <span class="post-share-feedback" id="post-share-feedback" style="color:var(--accent);font-size:.85rem" hidden><%= t('post.share_copied') %></span>
89 </div>
90
91 <!-- Inline admin actions: only visible if user has permission -->
92 <% if (user && (permissions.canEditPost(user, post, site) || permissions.canDeletePost(user, post, site))) { %>
93 <aside class="post-actions">
94 <% if (permissions.canEditPost(user, post, site)) { %>
95 <a href="<%= _base %>/posts/<%= post.slug %>/edit" class="btn"
96 hx-get="<%= _base %>/posts/<%= post.slug %>/edit?partial=1" hx-target="#pcms-main"
97 hx-push-url="<%= _base %>/posts/<%= post.slug %>/edit" hx-indicator="#pcms-loading">
98 โœ๏ธ Edit
99 </a>
100 <% } %>
101 <% if (permissions.canDeletePost(user, post, site)) { %>
102 <form method="post" action="<%= _base %>/posts/<%= post.slug %>/delete" style="display:inline" data-confirm="Delete this post?">
103 <button type="submit" class="btn btn-danger">๐Ÿ—‘ Delete</button>
104 </form>
105 <% } %>
106 </aside>
107 <% } %>
108
109 <!-- Fediverse interactions โ€” single place: โญ like (clickable) + ๐Ÿ”/๐Ÿ’ฌ counts + reply -->
110 <% var _postAbsUrl = (typeof ogOrigin !== 'undefined' && ogOrigin ? ogOrigin : '') + (typeof _base !== 'undefined' && _base ? _base : '') + '/' + post.slug; %>
111 <% var _fedi = (typeof fediverse !== 'undefined' && fediverse) ? fediverse : { thread: [], likeCount: 0, announceCount: 0 }; %>
112 <% if (post.status === 'published' && (typeof apEnabled === 'undefined' || apEnabled)) { %>
113 <section class="post-fediverse post-comments" id="fediverse">
114 <h2 class="comments-heading"><%= t('fedi.heading') %></h2>
115 <div class="fedi-stats">
116 <span class="fedi-stat" title="<%= t('fedi.likes') %>">
117 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>
118 <span><%= _fedi.likeCount %></span>
119 </span>
120 <span class="fedi-stat" title="<%= t('fedi.boosts') %>">
121 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg>
122 <span><%= _fedi.announceCount %></span>
123 </span>
124 <span class="fedi-stat" title="<%= t('fedi.replies') %>">
125 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
126 <span><%= (_fedi.thread || []).length %></span>
127 </span>
128 </div>
129 <% if (_fedi.thread && _fedi.thread.length) { %>
130 <ol class="comments-list">
131 <% _fedi.thread.forEach(function(n){ %>
132 <li class="comment"><%- include('../partials/fedi-node', { n: n, t: t, canManageSite: (typeof canManageSite !== 'undefined' ? canManageSite : false), _base: _base, siteAvatar: (typeof siteAvatar !== 'undefined' ? siteAvatar : null), formatDateTime: formatDateTime, postSlug: post.slug }) %></li>
133 <% }); %>
134 </ol>
135 <% } %>
136 <%# "Interact via the fediverse" is for VISITORS (reply from their own server).
137 The owner/admin has their own controls + it's their post โ†’ hide it for them. %>
138 <% if (typeof canManageSite === 'undefined' || !canManageSite) { %>
139 <div class="post-fediverse-cta">
140 <button type="button" class="btn fedi-remote-reply-btn" data-fedi-uri="<%= _postAbsUrl %>" data-fedi-ph="<%= t('fedi.remote_ph') %>">
141 <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg>
142 <%= t('fedi.remote_interact') %>
143 </button>
144 </div>
145 <% } %>
146 </section>
147 <% } %>
148 <script>
149 (function(){
150 if (window.__fediRemoteWired) return; window.__fediRemoteWired = true;
151 var current = null, currentBtn = null;
152 function close(){ if (current) { current.remove(); current = null; currentBtn = null; } }
153 function go(raw, uri){
154 var d = (raw||'').trim().replace(/^@?[^@\s]*@/, '').replace(/^https?:\/\//i, '').replace(/\/.*$/, '').trim();
155 if (d) { try { localStorage.setItem('pcmsFediServer', d); } catch(e){} location.href = 'https://' + d + '/authorize_interaction?uri=' + encodeURIComponent(uri||''); }
156 }
157 function place(f, b){
158 var r = b.getBoundingClientRect();
159 f.style.top = (r.bottom + window.scrollY + 6) + 'px';
160 f.style.left = Math.max(8, Math.min(r.left + window.scrollX, window.scrollX + window.innerWidth - 340)) + 'px';
161 }
162 document.addEventListener('click', function(e){
163 if (e.target.closest && e.target.closest('.fedi-remote-cancel')) { close(); return; }
164 if (current && e.target.closest && e.target.closest('.fedi-remote-form')) return; // click inside โ†’ keep
165 var b = e.target.closest && e.target.closest('.fedi-remote-reply-btn');
166 if (b) {
167 e.preventDefault();
168 if (currentBtn === b) { close(); return; } // toggle off
169 close();
170 var f = document.createElement('form');
171 f.className = 'fedi-remote-form';
172 f.dataset.uri = b.getAttribute('data-fedi-uri') || '';
173 f.innerHTML = '<input type="text" autocomplete="off" spellcheck="false">'
174 + '<button type="submit" class="btn btn-primary fedi-remote-go" aria-label="ok">&rarr;</button>'
175 + '<button type="button" class="fedi-remote-cancel" aria-label="x">&times;</button>';
176 var _inp = f.querySelector('input');
177 _inp.placeholder = b.getAttribute('data-fedi-ph') || 'mastodon.social';
178 try { var _sv = localStorage.getItem('pcmsFediServer'); if (_sv) _inp.value = _sv; } catch(e){}
179 document.body.appendChild(f); // floating popover โ†’ no layout reflow
180 place(f, b); current = f; currentBtn = b;
181 _inp.focus(); _inp.select();
182 return;
183 }
184 if (current) close(); // click anywhere else closes it
185 });
186 document.addEventListener('submit', function(e){
187 var f = e.target.closest && e.target.closest('.fedi-remote-form');
188 if (!f) return; e.preventDefault();
189 go(f.querySelector('input').value, f.dataset.uri);
190 });
191 document.addEventListener('keydown', function(e){ if (e.key === 'Escape') close(); });
192 window.addEventListener('scroll', close, true);
193 })();
194 </script>
195
196
197 <%# โ”€โ”€ Related posts (3-card grid) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
198 Always shown if at least one related post exists. Selection logic
199 lives server-side: same-tag posts ranked by overlap, falling back
200 to most-recent if there's no tag overlap. %>
201 <% if (relatedPosts && relatedPosts.length > 0) { %>
202 <section class="post-related" aria-labelledby="related-heading">
203 <h2 class="post-related-heading" id="related-heading"><%= t('related.title') %></h2>
204 <ul class="post-related-grid">
205 <% relatedPosts.forEach(function(rp) { %>
206 <li class="post-related-card">
207 <a href="<%= rp._urlBase || '' %>/<%= rp.slug %>"<% if (!rp._urlBase) { %>
208 hx-get="/<%= rp.slug %>?partial=1" hx-target="#pcms-main"
209 hx-push-url="/<%= rp.slug %>" hx-indicator="#pcms-loading"<% } %>>
210 <% if (rp.cover_image_url) { %>
211 <span class="post-related-cover<%= rp.nsfw ? ' nsfw-media' : '' %>" aria-hidden="true"><img class="post-related-img" src="<%= rp.cover_image_url %>" alt="" loading="lazy" decoding="async"<% if (rp.cover_video_url) { %> data-ios-mp4="<%= rp.cover_video_url %>"<% } %>><% if (rp.nsfw) { %><span class="nsfw-veil"><%- include('../partials/nsfw-veil', { cw: rp.content_warning }) %></span><% } %></span>
212 <% } else { %>
213 <span class="post-related-cover post-related-cover--empty<%= rp.nsfw ? ' nsfw-media' : '' %>" aria-hidden="true"><% if (rp.nsfw) { %><span class="nsfw-veil"><%- include('../partials/nsfw-veil', { cw: rp.content_warning }) %></span><% } %></span>
214 <% } %>
215 <span class="post-related-meta">
216 <span class="post-related-date"><%= formatDate(rp.published_at) %></span>
217 <span class="post-related-title"><%= rp.title %></span>
218 </span>
219 </a>
220 </li>
221 <% }); %>
222 </ul>
223 </section>
224 <% } %>
225
226</article>
227<style>
228.post-page { max-width: 720px; margin: 0.5rem auto 2rem; padding: 0 1rem; }
229.post-cover { margin: 0 0 2rem; border-radius: 8px; overflow: hidden; }
230.post-cover img, .post-cover video { width: 100%; height: auto; display: block; }
231.post-header { margin-bottom: 2rem; }
232.post-title { font-family: var(--font-display, serif); font-size: 2.5rem; line-height: 1.1; margin: 0 0 1rem; }
233@media (max-width: 600px) { .post-title { font-size: 1.85rem; } }
234.post-meta { font-size: 0.9rem; color: var(--ink-muted); }
235.author { font-weight: 500; color: var(--ink-soft); text-decoration: none; }
236.author:hover { color: var(--accent); }
237.post-content { font-family: var(--font-body, serif); font-size: 1.1rem; line-height: 1.7; color: var(--ink); }
238.post-content p { margin: 1.2em 0; }
239/* Poll (a hosted AS2 Question) โ€” display-only; voting happens from the fediverse. */
240.poll { margin: 1.75rem 0; display: flex; flex-direction: column; gap: .5rem; }
241.poll-opt { position: relative; display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; border: 1px solid var(--line, rgba(128,128,128,.25)); border-radius: 8px; overflow: hidden; font-size: .98rem; }
242.poll-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 18%, transparent); z-index: 0; transition: width .3s ease; }
243.poll-opt.is-lead .poll-bar { background: color-mix(in srgb, var(--accent) 30%, transparent); }
244.poll-name { position: relative; z-index: 1; flex: 1; color: var(--ink); }
245.poll-opt.is-lead .poll-name { font-weight: 600; }
246.poll-pct { position: relative; z-index: 1; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
247.poll-meta { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--ink-muted); }
248.poll-note { font-size: .8rem; color: var(--ink-muted); margin: .1rem 0 0; }
249.like-btn {
250 display: inline-flex; align-items: center; gap: 0.45rem;
251 padding: 0.4rem 0.85rem; border: 1px solid var(--rule); border-radius: 999px;
252 background: var(--paper-2); color: var(--ink); font: inherit; font-size: 0.95rem;
253 cursor: pointer; text-decoration: none; transition: border-color 120ms, color 120ms, background 120ms;
254}
255.like-btn:hover { border-color: var(--accent); }
256.like-btn .like-heart { font-size: 1.1rem; line-height: 1; }
257.like-btn.is-liked { border-color: var(--accent); color: var(--accent); }
258.like-btn.is-liked .like-heart { color: var(--accent); }
259.like-btn .like-count { font-variant-numeric: tabular-nums; }
260.post-content h2 { font-family: var(--font-display, serif); font-size: 1.6rem; margin: 2rem 0 1rem; }
261.post-content h3 { font-family: var(--font-display, serif); font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }
262.post-content a { color: var(--accent); }
263.post-content code { background: var(--paper-2); padding: 0.1em 0.4em; border-radius: 3px; font-family: var(--font-mono, monospace); font-size: 0.9em; }
264.post-content pre { background: var(--paper-2); padding: 1rem; border-radius: 6px; overflow-x: auto; }
265.post-content blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; margin: 1.5rem 0; color: var(--ink-soft); font-style: italic; }
266.post-content img { max-width: 100%; height: auto; border-radius: 6px; }
267.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 2rem 0; }
268.tag { background: var(--paper-2); color: var(--ink-soft); padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.85rem; text-decoration: none; transition: background 120ms, color 120ms; }
269.tag:hover { background: var(--accent); color: white; }
270.post-actions { display: flex; gap: 0.5rem; margin: 2rem 0; padding: 1rem; background: var(--paper-2); border-radius: 6px; flex-wrap: wrap; }
271
272/* ============================================================
273 Comments
274 ============================================================ */
275.post-comments {
276 margin-top: 3rem;
277 padding-top: 2rem;
278 border-top: 1px solid var(--rule);
279}
280.comments-heading {
281 font-family: var(--font-display, serif);
282 font-size: 1.5rem;
283 margin: 0 0 1.5rem;
284}
285.comments-empty { color: var(--ink-muted, var(--ink-soft)); margin: 0 0 1.5rem; }
286.comments-pending-flash {
287 background: rgba(40, 160, 90, 0.15);
288 color: #2a9d5e;
289 border: 1px solid rgba(40, 160, 90, 0.3);
290 padding: 0.75rem 1rem;
291 border-radius: 6px;
292 margin-bottom: 1rem;
293 font-size: 0.9rem;
294}
295.comments-empty a { color: var(--accent); }
296
297.comments-list, .comment-replies {
298 list-style: none;
299 padding: 0;
300 margin: 0 0 2rem;
301}
302
303.comment {
304 display: flex;
305 gap: 0.85rem;
306 padding: 1rem 0;
307 border-top: 1px solid var(--rule);
308}
309.comments-list > .comment:first-child { border-top: 0; padding-top: 0; }
310
311.comment-avatar {
312 flex-shrink: 0;
313 width: 40px;
314 height: 40px;
315 border-radius: 50%;
316 background: var(--paper-2);
317 border: 1px solid var(--rule);
318 overflow: hidden;
319 display: inline-flex;
320 align-items: center;
321 justify-content: center;
322}
323.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
324.comment-avatar span {
325 font-family: var(--font-display, serif);
326 font-weight: 700;
327 color: var(--accent);
328}
329
330.comment-body { flex: 1; min-width: 0; }
331.comment-meta {
332 display: flex;
333 gap: 0.5rem;
334 align-items: baseline;
335 flex-wrap: wrap;
336 row-gap: 0.1rem;
337 font-size: 0.85rem;
338 margin-bottom: 0.3rem;
339}
340.comment-author { color: var(--ink); font-weight: 600; text-decoration: none; }
341.comment-author:hover { color: var(--accent); }
342.comment-time { color: var(--ink-muted, var(--ink-soft)); }
343.comment-meta .fedi-handle { overflow-wrap: anywhere; }
344@media (max-width: 560px) {
345 .comment-meta .comment-time { flex-basis: 100%; font-size: 0.78rem; color: var(--ink-faint, var(--ink-muted)); }
346}
347.comment-content {
348 white-space: pre-wrap;
349 word-wrap: break-word;
350 color: var(--ink);
351 line-height: 1.5;
352 font-size: 0.95rem;
353}
354
355.comment-actions {
356 display: flex;
357 gap: 0.5rem;
358 margin-top: 0.4rem;
359 flex-wrap: wrap;
360 align-items: center;
361}
362.fedi-owner-react { display: inline; }
363.fedi-owner-reply { display: inline-block; }
364.fedi-owner-reply[open] { flex-basis: 100%; }
365.comment-reply-btn, .comment-delete-btn {
366 background: none;
367 border: 0;
368 color: var(--ink-muted, var(--ink-soft));
369 font-size: 0.8rem;
370 cursor: pointer;
371 padding: 0.2rem 0;
372 font-family: inherit;
373 text-transform: uppercase;
374 letter-spacing: 0.04em;
375}
376.comment-reply-btn:hover { color: var(--accent); }
377.comment-delete-btn:hover { color: #c33; }
378
379/* Owner comment-action icons โ€” same visual language as the News feed, compact (30px). */
380.fedi-cact { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; padding: 0; box-sizing: border-box;
381 display: inline-flex; align-items: center; justify-content: center; list-style: none;
382 border: 1px solid color-mix(in srgb, var(--ink, #000) 14%, transparent);
383 background: color-mix(in srgb, var(--ink, #000) 3%, transparent);
384 color: var(--ink-soft, #888); cursor: pointer; -webkit-tap-highlight-color: transparent;
385 transition: background .12s, border-color .12s, transform .1s; }
386.fedi-cact::-webkit-details-marker { display: none; }
387.fedi-cact svg { width: 15px; height: 15px; display: block; }
388.fedi-cact:active { transform: scale(.9); }
389.fedi-cact-like svg { color: #e8b04b; }
390.fedi-cact-like:hover { background: color-mix(in srgb, #e8b04b 15%, transparent); border-color: color-mix(in srgb, #e8b04b 50%, transparent); }
391.fedi-cact-like.is-on { background: color-mix(in srgb, #e8b04b 18%, transparent); border-color: color-mix(in srgb, #e8b04b 60%, transparent); }
392.fedi-cact-boost svg { color: #2fa85a; }
393.fedi-cact-boost:hover { background: color-mix(in srgb, #2fa85a 15%, transparent); border-color: color-mix(in srgb, #2fa85a 50%, transparent); }
394.fedi-cact-boost.is-on { background: color-mix(in srgb, #2fa85a 18%, transparent); border-color: color-mix(in srgb, #2fa85a 60%, transparent); }
395.fedi-cact-reply svg { color: var(--accent, #06c); }
396.fedi-cact-reply:hover { background: color-mix(in srgb, var(--accent, #888) 14%, transparent); border-color: color-mix(in srgb, var(--accent, #888) 50%, transparent); }
397
398.comment-replies {
399 margin-top: 1rem;
400 margin-left: 0;
401 border-left: 2px solid var(--rule);
402 padding-left: 1rem;
403}
404.comment-reply { padding: 0.75rem 0; }
405.comment-replies > .comment-reply:first-child { border-top: 0; padding-top: 0; }
406.comment-reply .comment-avatar { width: 32px; height: 32px; }
407.comment-reply .comment-avatar span { font-size: 0.85rem; }
408
409.comment-form, .comment-reply-form {
410 display: flex;
411 flex-direction: column;
412 gap: 0.6rem;
413 background: var(--paper-2);
414 border: 1px solid var(--rule);
415 border-radius: 8px;
416 padding: 1rem;
417 margin-top: 1rem;
418}
419.comment-form-label { display: flex; flex-direction: column; gap: 0.4rem; }
420.comment-form-label > span { font-size: 0.85rem; color: var(--ink-muted, var(--ink-soft)); }
421.comment-form textarea, .comment-reply-form textarea {
422 width: 100%;
423 resize: vertical;
424 min-height: 70px;
425 max-height: 200px;
426 padding: 0.65rem 0.85rem;
427 border: 1px solid var(--rule);
428 border-radius: 5px;
429 background: var(--paper);
430 color: var(--ink);
431 font-family: inherit;
432 font-size: 0.95rem;
433 line-height: 1.4;
434 box-sizing: border-box;
435}
436.comment-form button { align-self: flex-start; }
437.comment-reply-form-actions { display: flex; gap: 0.5rem; }
438/* Show the reply form only AFTER clicking REPLY. The display:flex above would
439 otherwise override the [hidden] attribute โ†’ form was always open. */
440.comment-reply-form[hidden] { display: none; }
441.fedi-owner-reply summary { list-style: none; cursor: pointer; }
442.fedi-owner-reply summary::-webkit-details-marker { display: none; }
443.fedi-owner-reply[open] summary { margin-bottom: .45rem; }
444/* DELETE button is inside a <form>; display:contents makes it a direct flex-sibling
445 of REPLY โ†’ pixel-perfect alignment + equal gap. */
446.comment-actions form { display: contents; }
447
448.comments-login-cta { margin-top: 1.5rem; text-align: center; }
449
450/* โ”€โ”€โ”€ Related posts (3-card grid above pinned-nav) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
451.post-related {
452 margin: 3rem auto 1.5rem;
453 /* Break out of the 720px article column so the cards have room to breathe.
454 Cap at 1100 to match other wide content. */
455 max-width: 1100px;
456 padding: 0 1rem;
457}
458.post-related-heading {
459 font-family: var(--font-ui, system-ui), sans-serif;
460 font-size: 0.75rem;
461 font-weight: 600;
462 text-transform: uppercase;
463 letter-spacing: 0.15em;
464 color: var(--ink-muted, var(--ink-soft));
465 margin: 0 0 1rem;
466}
467.post-related-grid {
468 list-style: none;
469 padding: 0; margin: 0;
470 display: grid;
471 grid-template-columns: repeat(3, minmax(0, 1fr));
472 gap: 1rem;
473}
474@media (max-width: 880px) { .post-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
475@media (max-width: 540px) { .post-related-grid { grid-template-columns: 1fr; } }
476
477.post-related-card {
478 background: var(--paper);
479 border: 1px solid var(--rule);
480 border-radius: 10px;
481 overflow: hidden;
482 transition: border-color 150ms, transform 150ms;
483}
484.post-related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
485.post-related-card a {
486 display: block;
487 color: inherit;
488 text-decoration: none;
489}
490.post-related-cover {
491 display: block;
492 position: relative;
493 overflow: hidden;
494 aspect-ratio: 16 / 10;
495 background: var(--paper-2) center/cover no-repeat;
496}
497.post-related-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
498.post-related-cover--empty {
499 background-image: linear-gradient(135deg,
500 color-mix(in srgb, var(--accent) 12%, var(--paper-2)),
501 var(--paper-2));
502}
503.post-related-meta {
504 display: flex; flex-direction: column; gap: 0.4rem;
505 padding: 0.85rem 1rem 1.1rem;
506}
507.post-related-date {
508 font-size: 0.78rem;
509 color: var(--ink-muted, var(--ink-soft));
510 font-variant-numeric: tabular-nums;
511}
512.post-related-title {
513 font-family: var(--font-display, serif);
514 font-size: 1.1rem;
515 font-weight: 600;
516 color: var(--ink);
517 line-height: 1.25;
518}
519
520/* โ”€โ”€โ”€ Pinned navigation cards (v9 style) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ */
521.post-pinned-nav {
522 display: grid;
523 grid-template-columns: 1fr 1fr;
524 gap: 1rem;
525 margin: 1.5rem auto 2rem;
526 max-width: 1100px;
527 padding: 0 1rem;
528}
529@media (max-width: 600px) {
530 .post-pinned-nav { grid-template-columns: 1fr; }
531}
532
533.post-pinned-card {
534 display: flex; align-items: center; gap: 1rem;
535 padding: 1rem 1.25rem;
536 border: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent);
537 background: color-mix(in srgb, var(--accent) 6%, var(--paper));
538 border-radius: 10px;
539 text-decoration: none;
540 color: var(--ink);
541 transition: border-color 150ms, background 150ms, transform 150ms;
542 min-height: 88px;
543}
544.post-pinned-card:hover {
545 border-color: var(--accent);
546 background: color-mix(in srgb, var(--accent) 11%, var(--paper));
547 transform: translateY(-2px);
548}
549.post-pinned-arrow {
550 font-size: 1.6rem;
551 color: var(--accent);
552 flex-shrink: 0;
553 line-height: 1;
554}
555.post-pinned-card--next {
556 /* "Volgende" card aligns text to the right with the arrow on the right
557 side, mirroring v9 โ€” the arrow is on the OPPOSITE end from the body. */
558 flex-direction: row-reverse;
559 text-align: right;
560}
561.post-pinned-body {
562 display: flex; flex-direction: column; gap: 0.25rem;
563 flex: 1; min-width: 0;
564}
565.post-pinned-label {
566 font-family: var(--font-ui, system-ui), sans-serif;
567 font-size: 0.7rem; font-weight: 600;
568 text-transform: uppercase;
569 letter-spacing: 0.1em;
570 color: var(--accent);
571}
572.post-pinned-title {
573 font-family: var(--font-display, serif);
574 font-size: 1.05rem; font-weight: 600;
575 color: var(--ink);
576 line-height: 1.25;
577 overflow: hidden;
578 text-overflow: ellipsis;
579 display: -webkit-box;
580 -webkit-line-clamp: 2;
581 -webkit-box-orient: vertical;
582}
583.post-pinned-cta {
584 font-size: 0.78rem;
585 color: var(--accent);
586 font-weight: 500;
587}
588
589/* Edge-of-stack indicator: dashed border, muted styling. */
590.post-pinned-card--edge {
591 flex-direction: column;
592 align-items: flex-start;
593 justify-content: center;
594 gap: 0.35rem;
595 border-style: dashed;
596 background: transparent;
597 color: var(--ink-muted, var(--ink-soft));
598 cursor: default;
599}
600.post-pinned-card--edge:hover {
601 /* Edge cards aren't clickable โ€” undo the lift effect. */
602 transform: none;
603 border-color: color-mix(in srgb, var(--accent) 50%, transparent);
604 background: transparent;
605}
606.post-pinned-edge-label {
607 font-family: var(--font-ui, system-ui), sans-serif;
608 font-size: 0.72rem;
609 font-weight: 600;
610 text-transform: uppercase;
611 letter-spacing: 0.15em;
612 color: var(--accent);
613}
614.post-pinned-edge-title {
615 font-family: var(--font-display, serif);
616 font-size: 1.05rem;
617 font-weight: 600;
618 color: var(--ink);
619}
620</style>
Note: See TracBrowser for help on using the repository browser.