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

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

fix(comments): reply form closed until REPLY click + DELETE pixel-perfectly aligned

(1) .comment-reply-form{display:flex} overrode the [hidden] attribute -> the
form was always open. Now .comment-reply-form[hidden]{display:none} so it only
opens after clicking REPLY (the toggle JS already set .hidden).
(2) DELETE was in a <form style=display:inline> -> slightly different alignment
from REPLY. Now .comment-actions form{display:contents} (+ inline style removed)
-> both are identical flex siblings with equal gap/baseline.

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

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