source: Klonkt/src/views/pages/post.ejs@ 33886fb

main
Last change on this file since 33886fb was 1f01b99, checked in by roboburr <roboburr@…>, 3 months ago

style: post navigation — Newer on the left, Older on the right

Swapped on request: newest-first convention (going right = older). Left
column now shows the newer post (<- Newer), right column the older (Older ->).
Applies in both hub and solo mode.

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 25.6 KB
Line 
1<%
2// In hub-mode is de site bereikbaar onder /user/<slug>; alle site-scoped links
3// (tag, edit, delete, comments) moeten met die prefix anders vallen ze terug op
4// de primaire site → 404 / verkeerde site. In solo is _base = ''.
5const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
6%>
7<article class="container post-page">
8 <% if (post.cover_image_url) { %>
9 <figure class="post-cover">
10 <img src="<%= post.cover_image_url %>" alt="">
11 </figure>
12 <% } %>
13
14 <header class="post-header">
15 <h1 class="post-title"><%= post.title %></h1>
16 <div class="post-meta">
17 <a class="author" href="/users/<%= encodeURIComponent(post.author_username) %>"
18 hx-get="/users/<%= encodeURIComponent(post.author_username) %>?partial=1"
19 hx-target="#pcms-main" hx-swap="innerHTML"
20 hx-push-url="/users/<%= encodeURIComponent(post.author_username) %>"
21 hx-indicator="#pcms-loading"><%= post.author_username %></a>
22 <span class="meta-sep">·</span>
23 <time datetime="<%= post.published_at || post.created_at %>"><%= formatDate(post.published_at || post.created_at) %></time>
24 <% if (post.status !== 'published') { %>
25 <span class="meta-sep">·</span>
26 <span class="status-badge status-<%= post.status %>"><%= post.status %></span>
27 <% } %>
28 </div>
29 </header>
30
31 <div class="post-content">
32 <%- post.content_html %>
33 </div>
34
35 <% if (post.tags && post.tags.length > 0) { %>
36 <div class="post-tags">
37 <% post.tags.forEach(t => { %>
38 <a class="tag" href="<%= _base %>/tag/<%= encodeURIComponent(t) %>"
39 hx-get="<%= _base %>/tag/<%= encodeURIComponent(t) %>?partial=1"
40 hx-target="#pcms-main" hx-swap="innerHTML"
41 hx-push-url="<%= _base %>/tag/<%= encodeURIComponent(t) %>"
42 hx-indicator="#pcms-loading">#<%= t %></a>
43 <% }); %>
44 </div>
45 <% } %>
46
47 <!-- Inline admin actions: only visible if user has permission -->
48 <% if (user && (permissions.canEditPost(user, post, site) || permissions.canDeletePost(user, post, site))) { %>
49 <aside class="post-actions">
50 <% if (permissions.canEditPost(user, post, site)) { %>
51 <a href="<%= _base %>/posts/<%= post.slug %>/edit" class="btn"
52 hx-get="<%= _base %>/posts/<%= post.slug %>/edit?partial=1" hx-target="#pcms-main"
53 hx-push-url="<%= _base %>/posts/<%= post.slug %>/edit" hx-indicator="#pcms-loading">
54 ✏️ Edit
55 </a>
56 <% } %>
57 <% if (permissions.canDeletePost(user, post, site)) { %>
58 <form method="post" action="<%= _base %>/posts/<%= post.slug %>/delete" style="display:inline" onsubmit="return confirm('Delete this post?')">
59 <button type="submit" class="btn btn-danger">🗑 Delete</button>
60 </form>
61 <% } %>
62 </aside>
63 <% } %>
64
65 <!-- Comments -->
66 <section class="post-comments" id="comments">
67 <h2 class="comments-heading">
68 <%= totalComments %> comment<%= totalComments === 1 ? '' : 's' %>
69 </h2>
70
71 <% if (typeof currentPath === 'string' && currentPath && currentPath.indexOf('/' + post.slug) === 0) { %>
72 <% /* If the URL has ?pending=1, the previous submit landed in the queue */ %>
73 <% } %>
74 <script>
75 (function() {
76 if (location.search.indexOf('pending=1') !== -1) {
77 var s = document.createElement('div');
78 s.className = 'comments-pending-flash';
79 s.textContent = 'Your comment is awaiting moderation. It will appear once an admin approves it.';
80 document.currentScript.parentNode.insertBefore(s, document.currentScript);
81 }
82 })();
83 </script>
84
85 <% if (!comments || !comments.length) { %>
86 <p class="comments-empty">No comments yet.<% if (!user) { %> <a href="/auth/login?next=<%= encodeURIComponent(_base + '/' + post.slug + '#comments') %>">Log in</a> to start the conversation.<% } %></p>
87 <% } else { %>
88 <ol class="comments-list">
89 <% comments.forEach(function(c) { %>
90 <li class="comment" id="comment-<%= c.id %>">
91 <div class="comment-avatar">
92 <% if (c.author_avatar) { %>
93 <img src="<%= c.author_avatar %>" alt="">
94 <% } else { %>
95 <span><%= c.author_username.charAt(0).toUpperCase() %></span>
96 <% } %>
97 </div>
98 <div class="comment-body">
99 <div class="comment-meta">
100 <a class="comment-author" href="/users/<%= encodeURIComponent(c.author_username) %>"><%= c.author_username %></a>
101 <span class="comment-time" title="<%= c.created_at %>"><%= formatDateTime(c.created_at) %></span>
102 </div>
103 <div class="comment-content"><%= c.content %></div>
104 <div class="comment-actions">
105 <% if (user && canMutate) { %>
106 <button type="button" class="comment-reply-btn" data-reply-to="<%= c.id %>">Reply</button>
107 <% } %>
108 <% if (user && permissions.canDeleteComment(user, c, site)) { %>
109 <form method="post" action="<%= _base %>/comments/<%= c.id %>/delete" style="display:inline" onsubmit="return confirm('Delete this comment?')">
110 <button type="submit" class="comment-delete-btn">Delete</button>
111 </form>
112 <% } %>
113 </div>
114
115 <!-- Inline reply form (hidden by default) -->
116 <% if (user && canMutate) { %>
117 <form method="post" action="<%= _base %>/comments" class="comment-reply-form" hidden data-reply-form-for="<%= c.id %>">
118 <input type="hidden" name="post_slug" value="<%= post.slug %>">
119 <input type="hidden" name="parent_comment_id" value="<%= c.id %>">
120 <textarea name="content" rows="3" maxlength="4000" placeholder="Reply to <%= c.author_username %>…" required></textarea>
121 <div class="comment-reply-form-actions">
122 <button type="submit" class="btn btn-primary">Reply</button>
123 <button type="button" class="btn comment-cancel-reply">Cancel</button>
124 </div>
125 </form>
126 <% } %>
127
128 <!-- Replies (1 level deep) -->
129 <% if (c.replies && c.replies.length) { %>
130 <ol class="comment-replies">
131 <% c.replies.forEach(function(r) { %>
132 <li class="comment comment-reply" id="comment-<%= r.id %>">
133 <div class="comment-avatar">
134 <% if (r.author_avatar) { %>
135 <img src="<%= r.author_avatar %>" alt="">
136 <% } else { %>
137 <span><%= r.author_username.charAt(0).toUpperCase() %></span>
138 <% } %>
139 </div>
140 <div class="comment-body">
141 <div class="comment-meta">
142 <a class="comment-author" href="/users/<%= encodeURIComponent(r.author_username) %>"><%= r.author_username %></a>
143 <span class="comment-time"><%= formatDateTime(r.created_at) %></span>
144 </div>
145 <div class="comment-content"><%= r.content %></div>
146 <div class="comment-actions">
147 <% if (user && permissions.canDeleteComment(user, r, site)) { %>
148 <form method="post" action="<%= _base %>/comments/<%= r.id %>/delete" style="display:inline" onsubmit="return confirm('Delete this comment?')">
149 <button type="submit" class="comment-delete-btn">Delete</button>
150 </form>
151 <% } %>
152 </div>
153 </div>
154 </li>
155 <% }); %>
156 </ol>
157 <% } %>
158 </div>
159 </li>
160 <% }); %>
161 </ol>
162 <% } %>
163
164 <!-- Top-level comment form (only for logged-in users for now) -->
165 <% if (user && canMutate) { %>
166 <form method="post" action="<%= _base %>/comments" class="comment-form">
167 <input type="hidden" name="post_slug" value="<%= post.slug %>">
168 <label class="comment-form-label">
169 <span>Add a comment as <strong><%= user.username %></strong></span>
170 <textarea name="content" rows="3" maxlength="4000" placeholder="Share your thoughts…" required></textarea>
171 </label>
172 <button type="submit" class="btn btn-primary">Post comment</button>
173 </form>
174 <% } else if (!user) { %>
175 <p class="comments-login-cta">
176 <a href="/auth/login?next=<%= encodeURIComponent(_base + '/' + post.slug + '#comments') %>" class="btn">Log in to comment</a>
177 </p>
178 <% } else { %>
179 <p class="comments-login-cta" style="color:var(--ink-muted)">👁️ Kijker-modus — reageren is uitgeschakeld.</p>
180 <% } %>
181 </section>
182
183 <!-- Reply form toggle -->
184 <script>
185 (function() {
186 document.querySelectorAll('.comment-reply-btn').forEach(function(btn) {
187 btn.addEventListener('click', function() {
188 var id = btn.dataset.replyTo;
189 var form = document.querySelector('[data-reply-form-for="' + id + '"]');
190 if (form) {
191 form.hidden = !form.hidden;
192 if (!form.hidden) form.querySelector('textarea').focus();
193 }
194 });
195 });
196 document.querySelectorAll('.comment-cancel-reply').forEach(function(btn) {
197 btn.addEventListener('click', function() {
198 btn.closest('.comment-reply-form').hidden = true;
199 });
200 });
201 })();
202 </script>
203
204 <%# ── Related posts (3-card grid) ─────────────────────────────
205 Always shown if at least one related post exists. Selection logic
206 lives server-side: same-tag posts ranked by overlap, falling back
207 to most-recent if there's no tag overlap. %>
208 <% if (relatedPosts && relatedPosts.length > 0) { %>
209 <section class="post-related" aria-labelledby="related-heading">
210 <h2 class="post-related-heading" id="related-heading">Gerelateerde posts</h2>
211 <ul class="post-related-grid">
212 <% relatedPosts.forEach(function(rp) { %>
213 <li class="post-related-card">
214 <a href="<%= rp._urlBase || '' %>/<%= rp.slug %>"<% if (!rp._urlBase) { %>
215 hx-get="/<%= rp.slug %>?partial=1" hx-target="#pcms-main"
216 hx-push-url="/<%= rp.slug %>" hx-indicator="#pcms-loading"<% } %>>
217 <% if (rp.cover_image_url) { %>
218 <span class="post-related-cover"
219 style="background-image: url('<%= rp.cover_image_url %>')"
220 aria-hidden="true"></span>
221 <% } else { %>
222 <span class="post-related-cover post-related-cover--empty" aria-hidden="true"></span>
223 <% } %>
224 <span class="post-related-meta">
225 <span class="post-related-date"><%= formatDate(rp.published_at) %></span>
226 <span class="post-related-title"><%= rp.title %></span>
227 </span>
228 </a>
229 </li>
230 <% }); %>
231 </ul>
232 </section>
233 <% } %>
234
235 <%# ── Pinned navigation (only when current post is pinned) ───
236 Two card-style links: "Vorige vastgepinde" / "Volgende vastgepinde".
237 Edge-of-stack states show "← BOVENAAN — Nieuwste post" or the equivalent
238 for the bottom. Layout mirrors v9 exactly. %>
239 <% if (post.pinned) { %>
240 <nav class="post-pinned-nav" aria-label="Pinned navigation">
241 <%# LEFT card: post one step UP the pinned stack (towards #1).
242 Uses prevPinnedPost which now means "smaller rank". %>
243 <% if (prevPinnedPost) { %>
244 <a class="post-pinned-card post-pinned-card--prev" href="<%= _base %>/<%= prevPinnedPost.slug %>"
245 hx-get="<%= _base %>/<%= prevPinnedPost.slug %>?partial=1" hx-target="#pcms-main"
246 hx-push-url="<%= _base %>/<%= prevPinnedPost.slug %>" hx-indicator="#pcms-loading">
247 <span class="post-pinned-arrow" aria-hidden="true">←</span>
248 <span class="post-pinned-body">
249 <span class="post-pinned-label">📌 Vorige vastgepinde</span>
250 <span class="post-pinned-title"><%= prevPinnedPost.title %></span>
251 <span class="post-pinned-cta">Lees deze post →</span>
252 </span>
253 </a>
254 <% } else if (pinnedTopOfStack) { %>
255 <span class="post-pinned-card post-pinned-card--edge">
256 <span class="post-pinned-edge-label">— BOVENAAN —</span>
257 <span class="post-pinned-edge-title">Nieuwste post</span>
258 </span>
259 <% } %>
260
261 <%# RIGHT card: post one step DOWN the pinned stack (away from #1).
262 Uses nextPinnedPost which now means "larger rank". %>
263 <% if (nextPinnedPost) { %>
264 <a class="post-pinned-card post-pinned-card--next" href="<%= _base %>/<%= nextPinnedPost.slug %>"
265 hx-get="<%= _base %>/<%= nextPinnedPost.slug %>?partial=1" hx-target="#pcms-main"
266 hx-push-url="<%= _base %>/<%= nextPinnedPost.slug %>" hx-indicator="#pcms-loading">
267 <span class="post-pinned-arrow" aria-hidden="true">→</span>
268 <span class="post-pinned-body">
269 <span class="post-pinned-label">📌 Volgende vastgepinde</span>
270 <span class="post-pinned-title"><%= nextPinnedPost.title %></span>
271 <span class="post-pinned-cta">← Lees deze post</span>
272 </span>
273 </a>
274 <% } else if (pinnedBottomOfStack) { %>
275 <span class="post-pinned-card post-pinned-card--edge">
276 <span class="post-pinned-edge-label">— ONDERAAN —</span>
277 <span class="post-pinned-edge-title">Oudste post</span>
278 </span>
279 <% } %>
280 </nav>
281 <% } %>
282
283 <%# ── Chronological prev/next (kept for non-pinned posts) ──────
284 For pinned posts the pinned-nav above replaces this. Non-pinned
285 regular posts still get the simple older/newer pair. %>
286 <% if (!post.pinned && (prevPost || nextPost)) { %>
287 <nav class="post-nav">
288 <%# Newer links, Older rechts (lijst nieuwste-eerst → naar rechts = ouder).
289 .post-nav-prev = linker kolom (links uitgelijnd), .post-nav-next =
290 rechter kolom (rechts uitgelijnd). %>
291 <% if (nextPost) { %>
292 <a class="post-nav-prev" href="<%= nextPost._urlBase || '' %>/<%= nextPost.slug %>"<% if (!nextPost._urlBase) { %>
293 hx-get="/<%= nextPost.slug %>?partial=1" hx-target="#pcms-main"
294 hx-push-url="/<%= nextPost.slug %>" hx-indicator="#pcms-loading"<% } %>>
295 <span class="post-nav-label">← Newer</span>
296 <span class="post-nav-title"><%= nextPost.title %></span>
297 </a>
298 <% } else { %><span></span><% } %>
299 <% if (prevPost) { %>
300 <a class="post-nav-next" href="<%= prevPost._urlBase || '' %>/<%= prevPost.slug %>"<% if (!prevPost._urlBase) { %>
301 hx-get="/<%= prevPost.slug %>?partial=1" hx-target="#pcms-main"
302 hx-push-url="/<%= prevPost.slug %>" hx-indicator="#pcms-loading"<% } %>>
303 <span class="post-nav-label">Older →</span>
304 <span class="post-nav-title"><%= prevPost.title %></span>
305 </a>
306 <% } %>
307 </nav>
308 <% } %>
309</article>
310<style>
311.post-page { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
312.post-cover { margin: 0 0 2rem; border-radius: 8px; overflow: hidden; }
313.post-cover img { width: 100%; height: auto; display: block; }
314.post-header { margin-bottom: 2rem; }
315.post-title { font-family: var(--font-display, serif); font-size: 2.5rem; line-height: 1.1; margin: 0 0 1rem; }
316@media (max-width: 600px) { .post-title { font-size: 1.85rem; } }
317.post-meta { font-size: 0.9rem; color: var(--ink-muted); }
318.author { font-weight: 500; color: var(--ink-soft); text-decoration: none; }
319.author:hover { color: var(--accent); }
320.post-content { font-family: var(--font-body, serif); font-size: 1.1rem; line-height: 1.7; color: var(--ink); }
321.post-content p { margin: 1.2em 0; }
322.post-content h2 { font-family: var(--font-display, serif); font-size: 1.6rem; margin: 2rem 0 1rem; }
323.post-content h3 { font-family: var(--font-display, serif); font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }
324.post-content a { color: var(--accent); }
325.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; }
326.post-content pre { background: var(--paper-2); padding: 1rem; border-radius: 6px; overflow-x: auto; }
327.post-content blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; margin: 1.5rem 0; color: var(--ink-soft); font-style: italic; }
328.post-content img { max-width: 100%; height: auto; border-radius: 6px; }
329.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 2rem 0; }
330.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; }
331.tag:hover { background: var(--accent); color: white; }
332.post-actions { display: flex; gap: 0.5rem; margin: 2rem 0; padding: 1rem; background: var(--paper-2); border-radius: 6px; flex-wrap: wrap; }
333.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
334.post-nav-prev, .post-nav-next { display: flex; flex-direction: column; padding: 1rem; background: var(--paper-2); border-radius: 6px; text-decoration: none; color: var(--ink); }
335.post-nav-next { text-align: right; align-items: flex-end; }
336.post-nav-label { font-size: 0.8rem; color: var(--ink-muted); margin-bottom: 0.25rem; }
337.post-nav-title { font-weight: 500; }
338@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } }
339
340/* ============================================================
341 Comments
342 ============================================================ */
343.post-comments {
344 margin-top: 3rem;
345 padding-top: 2rem;
346 border-top: 1px solid var(--rule);
347}
348.comments-heading {
349 font-family: var(--font-display, serif);
350 font-size: 1.5rem;
351 margin: 0 0 1.5rem;
352}
353.comments-empty { color: var(--ink-muted, var(--ink-soft)); margin: 0 0 1.5rem; }
354.comments-pending-flash {
355 background: rgba(40, 160, 90, 0.15);
356 color: #2a9d5e;
357 border: 1px solid rgba(40, 160, 90, 0.3);
358 padding: 0.75rem 1rem;
359 border-radius: 6px;
360 margin-bottom: 1rem;
361 font-size: 0.9rem;
362}
363.comments-empty a { color: var(--accent); }
364
365.comments-list, .comment-replies {
366 list-style: none;
367 padding: 0;
368 margin: 0 0 2rem;
369}
370
371.comment {
372 display: flex;
373 gap: 0.85rem;
374 padding: 1rem 0;
375 border-top: 1px solid var(--rule);
376}
377.comments-list > .comment:first-child { border-top: 0; padding-top: 0; }
378
379.comment-avatar {
380 flex-shrink: 0;
381 width: 40px;
382 height: 40px;
383 border-radius: 50%;
384 background: var(--paper-2);
385 border: 1px solid var(--rule);
386 overflow: hidden;
387 display: inline-flex;
388 align-items: center;
389 justify-content: center;
390}
391.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
392.comment-avatar span {
393 font-family: var(--font-display, serif);
394 font-weight: 700;
395 color: var(--accent);
396}
397
398.comment-body { flex: 1; min-width: 0; }
399.comment-meta {
400 display: flex;
401 gap: 0.5rem;
402 align-items: baseline;
403 font-size: 0.85rem;
404 margin-bottom: 0.3rem;
405}
406.comment-author { color: var(--ink); font-weight: 600; text-decoration: none; }
407.comment-author:hover { color: var(--accent); }
408.comment-time { color: var(--ink-muted, var(--ink-soft)); }
409.comment-content {
410 white-space: pre-wrap;
411 word-wrap: break-word;
412 color: var(--ink);
413 line-height: 1.5;
414 font-size: 0.95rem;
415}
416
417.comment-actions {
418 display: flex;
419 gap: 0.5rem;
420 margin-top: 0.4rem;
421}
422.comment-reply-btn, .comment-delete-btn {
423 background: none;
424 border: 0;
425 color: var(--ink-muted, var(--ink-soft));
426 font-size: 0.8rem;
427 cursor: pointer;
428 padding: 0.2rem 0;
429 font-family: inherit;
430 text-transform: uppercase;
431 letter-spacing: 0.04em;
432}
433.comment-reply-btn:hover { color: var(--accent); }
434.comment-delete-btn:hover { color: #c33; }
435
436.comment-replies {
437 margin-top: 1rem;
438 margin-left: 0;
439 border-left: 2px solid var(--rule);
440 padding-left: 1rem;
441}
442.comment-reply { padding: 0.75rem 0; }
443.comment-replies > .comment-reply:first-child { border-top: 0; padding-top: 0; }
444.comment-reply .comment-avatar { width: 32px; height: 32px; }
445.comment-reply .comment-avatar span { font-size: 0.85rem; }
446
447.comment-form, .comment-reply-form {
448 display: flex;
449 flex-direction: column;
450 gap: 0.6rem;
451 background: var(--paper-2);
452 border: 1px solid var(--rule);
453 border-radius: 8px;
454 padding: 1rem;
455 margin-top: 1rem;
456}
457.comment-form-label { display: flex; flex-direction: column; gap: 0.4rem; }
458.comment-form-label > span { font-size: 0.85rem; color: var(--ink-muted, var(--ink-soft)); }
459.comment-form textarea, .comment-reply-form textarea {
460 width: 100%;
461 resize: vertical;
462 min-height: 70px;
463 padding: 0.65rem 0.85rem;
464 border: 1px solid var(--rule);
465 border-radius: 5px;
466 background: var(--paper);
467 color: var(--ink);
468 font-family: inherit;
469 font-size: 0.95rem;
470 line-height: 1.4;
471 box-sizing: border-box;
472}
473.comment-form button { align-self: flex-start; }
474.comment-reply-form-actions { display: flex; gap: 0.5rem; }
475
476.comments-login-cta { margin-top: 1.5rem; text-align: center; }
477
478/* ─── Related posts (3-card grid above pinned-nav) ─────────────── */
479.post-related {
480 margin: 3rem auto 1.5rem;
481 /* Break out of the 720px article column so the cards have room to breathe.
482 Cap at 1100 to match other wide content. */
483 max-width: 1100px;
484 padding: 0 1rem;
485}
486.post-related-heading {
487 font-family: var(--font-ui, system-ui), sans-serif;
488 font-size: 0.75rem;
489 font-weight: 600;
490 text-transform: uppercase;
491 letter-spacing: 0.15em;
492 color: var(--ink-muted, var(--ink-soft));
493 margin: 0 0 1rem;
494}
495.post-related-grid {
496 list-style: none;
497 padding: 0; margin: 0;
498 display: grid;
499 grid-template-columns: repeat(3, minmax(0, 1fr));
500 gap: 1rem;
501}
502@media (max-width: 880px) { .post-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
503@media (max-width: 540px) { .post-related-grid { grid-template-columns: 1fr; } }
504
505.post-related-card {
506 background: var(--paper);
507 border: 1px solid var(--rule);
508 border-radius: 10px;
509 overflow: hidden;
510 transition: border-color 150ms, transform 150ms;
511}
512.post-related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
513.post-related-card a {
514 display: block;
515 color: inherit;
516 text-decoration: none;
517}
518.post-related-cover {
519 display: block;
520 aspect-ratio: 16 / 10;
521 background: var(--paper-2) center/cover no-repeat;
522}
523.post-related-cover--empty {
524 background-image: linear-gradient(135deg,
525 color-mix(in srgb, var(--accent) 12%, var(--paper-2)),
526 var(--paper-2));
527}
528.post-related-meta {
529 display: flex; flex-direction: column; gap: 0.4rem;
530 padding: 0.85rem 1rem 1.1rem;
531}
532.post-related-date {
533 font-size: 0.78rem;
534 color: var(--ink-muted, var(--ink-soft));
535 font-variant-numeric: tabular-nums;
536}
537.post-related-title {
538 font-family: var(--font-display, serif);
539 font-size: 1.1rem;
540 font-weight: 600;
541 color: var(--ink);
542 line-height: 1.25;
543}
544
545/* ─── Pinned navigation cards (v9 style) ───────────────────────── */
546.post-pinned-nav {
547 display: grid;
548 grid-template-columns: 1fr 1fr;
549 gap: 1rem;
550 margin: 1.5rem auto 2rem;
551 max-width: 1100px;
552 padding: 0 1rem;
553}
554@media (max-width: 600px) {
555 .post-pinned-nav { grid-template-columns: 1fr; }
556}
557
558.post-pinned-card {
559 display: flex; align-items: center; gap: 1rem;
560 padding: 1rem 1.25rem;
561 border: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent);
562 background: color-mix(in srgb, var(--accent) 6%, var(--paper));
563 border-radius: 10px;
564 text-decoration: none;
565 color: var(--ink);
566 transition: border-color 150ms, background 150ms, transform 150ms;
567 min-height: 88px;
568}
569.post-pinned-card:hover {
570 border-color: var(--accent);
571 background: color-mix(in srgb, var(--accent) 11%, var(--paper));
572 transform: translateY(-2px);
573}
574.post-pinned-arrow {
575 font-size: 1.6rem;
576 color: var(--accent);
577 flex-shrink: 0;
578 line-height: 1;
579}
580.post-pinned-card--next {
581 /* "Volgende" card aligns text to the right with the arrow on the right
582 side, mirroring v9 — the arrow is on the OPPOSITE end from the body. */
583 flex-direction: row-reverse;
584 text-align: right;
585}
586.post-pinned-body {
587 display: flex; flex-direction: column; gap: 0.25rem;
588 flex: 1; min-width: 0;
589}
590.post-pinned-label {
591 font-family: var(--font-ui, system-ui), sans-serif;
592 font-size: 0.7rem; font-weight: 600;
593 text-transform: uppercase;
594 letter-spacing: 0.1em;
595 color: var(--accent);
596}
597.post-pinned-title {
598 font-family: var(--font-display, serif);
599 font-size: 1.05rem; font-weight: 600;
600 color: var(--ink);
601 line-height: 1.25;
602 overflow: hidden;
603 text-overflow: ellipsis;
604 display: -webkit-box;
605 -webkit-line-clamp: 2;
606 -webkit-box-orient: vertical;
607}
608.post-pinned-cta {
609 font-size: 0.78rem;
610 color: var(--accent);
611 font-weight: 500;
612}
613
614/* Edge-of-stack indicator: dashed border, muted styling. */
615.post-pinned-card--edge {
616 flex-direction: column;
617 align-items: flex-start;
618 justify-content: center;
619 gap: 0.35rem;
620 border-style: dashed;
621 background: transparent;
622 color: var(--ink-muted, var(--ink-soft));
623 cursor: default;
624}
625.post-pinned-card--edge:hover {
626 /* Edge cards aren't clickable — undo the lift effect. */
627 transform: none;
628 border-color: color-mix(in srgb, var(--accent) 50%, transparent);
629 background: transparent;
630}
631.post-pinned-edge-label {
632 font-family: var(--font-ui, system-ui), sans-serif;
633 font-size: 0.72rem;
634 font-weight: 600;
635 text-transform: uppercase;
636 letter-spacing: 0.15em;
637 color: var(--accent);
638}
639.post-pinned-edge-title {
640 font-family: var(--font-display, serif);
641 font-size: 1.05rem;
642 font-weight: 600;
643 color: var(--ink);
644}
645</style>
Note: See TracBrowser for help on using the repository browser.