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

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

fix: all site-scoped links use siteUrlBase in hub mode

Follow-up on the feed fix (612b102). The same class of bug was still present in:

  • post.ejs: tag, edit, delete links + comment forms + comment delete + login-next -> now with siteUrlBase prefix
  • bottom-tab.ejs: "Write" FAB (/posts/new)
  • home.ejs: empty-state "Write your first post"
  • profile-sheet.ejs: "New post"
  • search.ejs: search form action

Without the prefix these fell back to the primary site in hub (404 /
wrong site). In solo siteUrlBase is empty -> behavior unchanged.

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

  • Property mode set to 100644
File size: 24.9 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) { %>
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) { %>
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) { %>
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 { %>
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 <% } %>
179 </section>
180
181 <!-- Reply form toggle -->
182 <script>
183 (function() {
184 document.querySelectorAll('.comment-reply-btn').forEach(function(btn) {
185 btn.addEventListener('click', function() {
186 var id = btn.dataset.replyTo;
187 var form = document.querySelector('[data-reply-form-for="' + id + '"]');
188 if (form) {
189 form.hidden = !form.hidden;
190 if (!form.hidden) form.querySelector('textarea').focus();
191 }
192 });
193 });
194 document.querySelectorAll('.comment-cancel-reply').forEach(function(btn) {
195 btn.addEventListener('click', function() {
196 btn.closest('.comment-reply-form').hidden = true;
197 });
198 });
199 })();
200 </script>
201
202 <%# ── Related posts (3-card grid) ─────────────────────────────
203 Always shown if at least one related post exists. Selection logic
204 lives server-side: same-tag posts ranked by overlap, falling back
205 to most-recent if there's no tag overlap. %>
206 <% if (relatedPosts && relatedPosts.length > 0) { %>
207 <section class="post-related" aria-labelledby="related-heading">
208 <h2 class="post-related-heading" id="related-heading">Gerelateerde posts</h2>
209 <ul class="post-related-grid">
210 <% relatedPosts.forEach(function(rp) { %>
211 <li class="post-related-card">
212 <a href="/<%= rp.slug %>"
213 hx-get="/<%= rp.slug %>?partial=1" hx-target="#pcms-main"
214 hx-push-url="/<%= rp.slug %>" hx-indicator="#pcms-loading">
215 <% if (rp.cover_image_url) { %>
216 <span class="post-related-cover"
217 style="background-image: url('<%= rp.cover_image_url %>')"
218 aria-hidden="true"></span>
219 <% } else { %>
220 <span class="post-related-cover post-related-cover--empty" aria-hidden="true"></span>
221 <% } %>
222 <span class="post-related-meta">
223 <span class="post-related-date"><%= formatDate(rp.published_at) %></span>
224 <span class="post-related-title"><%= rp.title %></span>
225 </span>
226 </a>
227 </li>
228 <% }); %>
229 </ul>
230 </section>
231 <% } %>
232
233 <%# ── Pinned navigation (only when current post is pinned) ───
234 Two card-style links: "Vorige vastgepinde" / "Volgende vastgepinde".
235 Edge-of-stack states show "← BOVENAAN — Nieuwste post" or the equivalent
236 for the bottom. Layout mirrors v9 exactly. %>
237 <% if (post.pinned) { %>
238 <nav class="post-pinned-nav" aria-label="Pinned navigation">
239 <%# LEFT card: post one step UP the pinned stack (towards #1).
240 Uses prevPinnedPost which now means "smaller rank". %>
241 <% if (prevPinnedPost) { %>
242 <a class="post-pinned-card post-pinned-card--prev" href="/<%= prevPinnedPost.slug %>"
243 hx-get="/<%= prevPinnedPost.slug %>?partial=1" hx-target="#pcms-main"
244 hx-push-url="/<%= prevPinnedPost.slug %>" hx-indicator="#pcms-loading">
245 <span class="post-pinned-arrow" aria-hidden="true">←</span>
246 <span class="post-pinned-body">
247 <span class="post-pinned-label">📌 Vorige vastgepinde</span>
248 <span class="post-pinned-title"><%= prevPinnedPost.title %></span>
249 <span class="post-pinned-cta">Lees deze post →</span>
250 </span>
251 </a>
252 <% } else if (pinnedTopOfStack) { %>
253 <span class="post-pinned-card post-pinned-card--edge">
254 <span class="post-pinned-edge-label">— BOVENAAN —</span>
255 <span class="post-pinned-edge-title">Nieuwste post</span>
256 </span>
257 <% } %>
258
259 <%# RIGHT card: post one step DOWN the pinned stack (away from #1).
260 Uses nextPinnedPost which now means "larger rank". %>
261 <% if (nextPinnedPost) { %>
262 <a class="post-pinned-card post-pinned-card--next" href="/<%= nextPinnedPost.slug %>"
263 hx-get="/<%= nextPinnedPost.slug %>?partial=1" hx-target="#pcms-main"
264 hx-push-url="/<%= nextPinnedPost.slug %>" hx-indicator="#pcms-loading">
265 <span class="post-pinned-arrow" aria-hidden="true">→</span>
266 <span class="post-pinned-body">
267 <span class="post-pinned-label">📌 Volgende vastgepinde</span>
268 <span class="post-pinned-title"><%= nextPinnedPost.title %></span>
269 <span class="post-pinned-cta">← Lees deze post</span>
270 </span>
271 </a>
272 <% } else if (pinnedBottomOfStack) { %>
273 <span class="post-pinned-card post-pinned-card--edge">
274 <span class="post-pinned-edge-label">— ONDERAAN —</span>
275 <span class="post-pinned-edge-title">Oudste post</span>
276 </span>
277 <% } %>
278 </nav>
279 <% } %>
280
281 <%# ── Chronological prev/next (kept for non-pinned posts) ──────
282 For pinned posts the pinned-nav above replaces this. Non-pinned
283 regular posts still get the simple older/newer pair. %>
284 <% if (!post.pinned && (prevPost || nextPost)) { %>
285 <nav class="post-nav">
286 <% if (prevPost) { %>
287 <a class="post-nav-prev" href="/<%= prevPost.slug %>"
288 hx-get="/<%= prevPost.slug %>?partial=1" hx-target="#pcms-main"
289 hx-push-url="/<%= prevPost.slug %>" hx-indicator="#pcms-loading">
290 <span class="post-nav-label">← Older</span>
291 <span class="post-nav-title"><%= prevPost.title %></span>
292 </a>
293 <% } else { %><span></span><% } %>
294 <% if (nextPost) { %>
295 <a class="post-nav-next" href="/<%= nextPost.slug %>"
296 hx-get="/<%= nextPost.slug %>?partial=1" hx-target="#pcms-main"
297 hx-push-url="/<%= nextPost.slug %>" hx-indicator="#pcms-loading">
298 <span class="post-nav-label">Newer →</span>
299 <span class="post-nav-title"><%= nextPost.title %></span>
300 </a>
301 <% } %>
302 </nav>
303 <% } %>
304</article>
305<style>
306.post-page { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
307.post-cover { margin: 0 0 2rem; border-radius: 8px; overflow: hidden; }
308.post-cover img { width: 100%; height: auto; display: block; }
309.post-header { margin-bottom: 2rem; }
310.post-title { font-family: var(--font-display, serif); font-size: 2.5rem; line-height: 1.1; margin: 0 0 1rem; }
311@media (max-width: 600px) { .post-title { font-size: 1.85rem; } }
312.post-meta { font-size: 0.9rem; color: var(--ink-muted); }
313.author { font-weight: 500; color: var(--ink-soft); text-decoration: none; }
314.author:hover { color: var(--accent); }
315.post-content { font-family: var(--font-body, serif); font-size: 1.1rem; line-height: 1.7; color: var(--ink); }
316.post-content p { margin: 1.2em 0; }
317.post-content h2 { font-family: var(--font-display, serif); font-size: 1.6rem; margin: 2rem 0 1rem; }
318.post-content h3 { font-family: var(--font-display, serif); font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }
319.post-content a { color: var(--accent); }
320.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; }
321.post-content pre { background: var(--paper-2); padding: 1rem; border-radius: 6px; overflow-x: auto; }
322.post-content blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; margin: 1.5rem 0; color: var(--ink-soft); font-style: italic; }
323.post-content img { max-width: 100%; height: auto; border-radius: 6px; }
324.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 2rem 0; }
325.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; }
326.tag:hover { background: var(--accent); color: white; }
327.post-actions { display: flex; gap: 0.5rem; margin: 2rem 0; padding: 1rem; background: var(--paper-2); border-radius: 6px; flex-wrap: wrap; }
328.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
329.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); }
330.post-nav-next { text-align: right; align-items: flex-end; }
331.post-nav-label { font-size: 0.8rem; color: var(--ink-muted); margin-bottom: 0.25rem; }
332.post-nav-title { font-weight: 500; }
333@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } }
334
335/* ============================================================
336 Comments
337 ============================================================ */
338.post-comments {
339 margin-top: 3rem;
340 padding-top: 2rem;
341 border-top: 1px solid var(--rule);
342}
343.comments-heading {
344 font-family: var(--font-display, serif);
345 font-size: 1.5rem;
346 margin: 0 0 1.5rem;
347}
348.comments-empty { color: var(--ink-muted, var(--ink-soft)); margin: 0 0 1.5rem; }
349.comments-pending-flash {
350 background: rgba(40, 160, 90, 0.15);
351 color: #2a9d5e;
352 border: 1px solid rgba(40, 160, 90, 0.3);
353 padding: 0.75rem 1rem;
354 border-radius: 6px;
355 margin-bottom: 1rem;
356 font-size: 0.9rem;
357}
358.comments-empty a { color: var(--accent); }
359
360.comments-list, .comment-replies {
361 list-style: none;
362 padding: 0;
363 margin: 0 0 2rem;
364}
365
366.comment {
367 display: flex;
368 gap: 0.85rem;
369 padding: 1rem 0;
370 border-top: 1px solid var(--rule);
371}
372.comments-list > .comment:first-child { border-top: 0; padding-top: 0; }
373
374.comment-avatar {
375 flex-shrink: 0;
376 width: 40px;
377 height: 40px;
378 border-radius: 50%;
379 background: var(--paper-2);
380 border: 1px solid var(--rule);
381 overflow: hidden;
382 display: inline-flex;
383 align-items: center;
384 justify-content: center;
385}
386.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
387.comment-avatar span {
388 font-family: var(--font-display, serif);
389 font-weight: 700;
390 color: var(--accent);
391}
392
393.comment-body { flex: 1; min-width: 0; }
394.comment-meta {
395 display: flex;
396 gap: 0.5rem;
397 align-items: baseline;
398 font-size: 0.85rem;
399 margin-bottom: 0.3rem;
400}
401.comment-author { color: var(--ink); font-weight: 600; text-decoration: none; }
402.comment-author:hover { color: var(--accent); }
403.comment-time { color: var(--ink-muted, var(--ink-soft)); }
404.comment-content {
405 white-space: pre-wrap;
406 word-wrap: break-word;
407 color: var(--ink);
408 line-height: 1.5;
409 font-size: 0.95rem;
410}
411
412.comment-actions {
413 display: flex;
414 gap: 0.5rem;
415 margin-top: 0.4rem;
416}
417.comment-reply-btn, .comment-delete-btn {
418 background: none;
419 border: 0;
420 color: var(--ink-muted, var(--ink-soft));
421 font-size: 0.8rem;
422 cursor: pointer;
423 padding: 0.2rem 0;
424 font-family: inherit;
425 text-transform: uppercase;
426 letter-spacing: 0.04em;
427}
428.comment-reply-btn:hover { color: var(--accent); }
429.comment-delete-btn:hover { color: #c33; }
430
431.comment-replies {
432 margin-top: 1rem;
433 margin-left: 0;
434 border-left: 2px solid var(--rule);
435 padding-left: 1rem;
436}
437.comment-reply { padding: 0.75rem 0; }
438.comment-replies > .comment-reply:first-child { border-top: 0; padding-top: 0; }
439.comment-reply .comment-avatar { width: 32px; height: 32px; }
440.comment-reply .comment-avatar span { font-size: 0.85rem; }
441
442.comment-form, .comment-reply-form {
443 display: flex;
444 flex-direction: column;
445 gap: 0.6rem;
446 background: var(--paper-2);
447 border: 1px solid var(--rule);
448 border-radius: 8px;
449 padding: 1rem;
450 margin-top: 1rem;
451}
452.comment-form-label { display: flex; flex-direction: column; gap: 0.4rem; }
453.comment-form-label > span { font-size: 0.85rem; color: var(--ink-muted, var(--ink-soft)); }
454.comment-form textarea, .comment-reply-form textarea {
455 width: 100%;
456 resize: vertical;
457 min-height: 70px;
458 padding: 0.65rem 0.85rem;
459 border: 1px solid var(--rule);
460 border-radius: 5px;
461 background: var(--paper);
462 color: var(--ink);
463 font-family: inherit;
464 font-size: 0.95rem;
465 line-height: 1.4;
466 box-sizing: border-box;
467}
468.comment-form button { align-self: flex-start; }
469.comment-reply-form-actions { display: flex; gap: 0.5rem; }
470
471.comments-login-cta { margin-top: 1.5rem; text-align: center; }
472
473/* ─── Related posts (3-card grid above pinned-nav) ─────────────── */
474.post-related {
475 margin: 3rem auto 1.5rem;
476 /* Break out of the 720px article column so the cards have room to breathe.
477 Cap at 1100 to match other wide content. */
478 max-width: 1100px;
479 padding: 0 1rem;
480}
481.post-related-heading {
482 font-family: var(--font-ui, system-ui), sans-serif;
483 font-size: 0.75rem;
484 font-weight: 600;
485 text-transform: uppercase;
486 letter-spacing: 0.15em;
487 color: var(--ink-muted, var(--ink-soft));
488 margin: 0 0 1rem;
489}
490.post-related-grid {
491 list-style: none;
492 padding: 0; margin: 0;
493 display: grid;
494 grid-template-columns: repeat(3, minmax(0, 1fr));
495 gap: 1rem;
496}
497@media (max-width: 880px) { .post-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
498@media (max-width: 540px) { .post-related-grid { grid-template-columns: 1fr; } }
499
500.post-related-card {
501 background: var(--paper);
502 border: 1px solid var(--rule);
503 border-radius: 10px;
504 overflow: hidden;
505 transition: border-color 150ms, transform 150ms;
506}
507.post-related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
508.post-related-card a {
509 display: block;
510 color: inherit;
511 text-decoration: none;
512}
513.post-related-cover {
514 display: block;
515 aspect-ratio: 16 / 10;
516 background: var(--paper-2) center/cover no-repeat;
517}
518.post-related-cover--empty {
519 background-image: linear-gradient(135deg,
520 color-mix(in srgb, var(--accent) 12%, var(--paper-2)),
521 var(--paper-2));
522}
523.post-related-meta {
524 display: flex; flex-direction: column; gap: 0.4rem;
525 padding: 0.85rem 1rem 1.1rem;
526}
527.post-related-date {
528 font-size: 0.78rem;
529 color: var(--ink-muted, var(--ink-soft));
530 font-variant-numeric: tabular-nums;
531}
532.post-related-title {
533 font-family: var(--font-display, serif);
534 font-size: 1.1rem;
535 font-weight: 600;
536 color: var(--ink);
537 line-height: 1.25;
538}
539
540/* ─── Pinned navigation cards (v9 style) ───────────────────────── */
541.post-pinned-nav {
542 display: grid;
543 grid-template-columns: 1fr 1fr;
544 gap: 1rem;
545 margin: 1.5rem auto 2rem;
546 max-width: 1100px;
547 padding: 0 1rem;
548}
549@media (max-width: 600px) {
550 .post-pinned-nav { grid-template-columns: 1fr; }
551}
552
553.post-pinned-card {
554 display: flex; align-items: center; gap: 1rem;
555 padding: 1rem 1.25rem;
556 border: 1.5px solid color-mix(in srgb, var(--accent) 50%, transparent);
557 background: color-mix(in srgb, var(--accent) 6%, var(--paper));
558 border-radius: 10px;
559 text-decoration: none;
560 color: var(--ink);
561 transition: border-color 150ms, background 150ms, transform 150ms;
562 min-height: 88px;
563}
564.post-pinned-card:hover {
565 border-color: var(--accent);
566 background: color-mix(in srgb, var(--accent) 11%, var(--paper));
567 transform: translateY(-2px);
568}
569.post-pinned-arrow {
570 font-size: 1.6rem;
571 color: var(--accent);
572 flex-shrink: 0;
573 line-height: 1;
574}
575.post-pinned-card--next {
576 /* "Volgende" card aligns text to the right with the arrow on the right
577 side, mirroring v9 — the arrow is on the OPPOSITE end from the body. */
578 flex-direction: row-reverse;
579 text-align: right;
580}
581.post-pinned-body {
582 display: flex; flex-direction: column; gap: 0.25rem;
583 flex: 1; min-width: 0;
584}
585.post-pinned-label {
586 font-family: var(--font-ui, system-ui), sans-serif;
587 font-size: 0.7rem; font-weight: 600;
588 text-transform: uppercase;
589 letter-spacing: 0.1em;
590 color: var(--accent);
591}
592.post-pinned-title {
593 font-family: var(--font-display, serif);
594 font-size: 1.05rem; font-weight: 600;
595 color: var(--ink);
596 line-height: 1.25;
597 overflow: hidden;
598 text-overflow: ellipsis;
599 display: -webkit-box;
600 -webkit-line-clamp: 2;
601 -webkit-box-orient: vertical;
602}
603.post-pinned-cta {
604 font-size: 0.78rem;
605 color: var(--accent);
606 font-weight: 500;
607}
608
609/* Edge-of-stack indicator: dashed border, muted styling. */
610.post-pinned-card--edge {
611 flex-direction: column;
612 align-items: flex-start;
613 justify-content: center;
614 gap: 0.35rem;
615 border-style: dashed;
616 background: transparent;
617 color: var(--ink-muted, var(--ink-soft));
618 cursor: default;
619}
620.post-pinned-card--edge:hover {
621 /* Edge cards aren't clickable — undo the lift effect. */
622 transform: none;
623 border-color: color-mix(in srgb, var(--accent) 50%, transparent);
624 background: transparent;
625}
626.post-pinned-edge-label {
627 font-family: var(--font-ui, system-ui), sans-serif;
628 font-size: 0.72rem;
629 font-weight: 600;
630 text-transform: uppercase;
631 letter-spacing: 0.15em;
632 color: var(--accent);
633}
634.post-pinned-edge-title {
635 font-family: var(--font-display, serif);
636 font-size: 1.05rem;
637 font-weight: 600;
638 color: var(--ink);
639}
640</style>
Note: See TracBrowser for help on using the repository browser.