source: Klonkt/src/views/pages/post.ejs@ 837fc9c

main
Last change on this file since 837fc9c was 837fc9c, checked in by Robin Genis <roboburr@…>, 2 months ago

feat(posts): NSFW / sensitive content

Mark a post NSFW (checkbox in the editor, available to all). On-site the cover blurs in
feed/grid and the whole post blurs behind a 'Gevoelige inhoud' banner until clicked. In the
fediverse the Note gets sensitive:true + a content-warning summary (Mastodon CW). i18n NL/EN/DE.

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