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

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

ui(post): consistent Newer/Older navigation on every post

When a newer or older post is missing, the nav now shows a greyed-out
placeholder ("Newest post" / "Oldest post") instead of an empty spot —
so every post has the same two-card structure (like a middle post).

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

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