source: Klonkt/src/views/pages/post.ejs@ 8d054ca

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

fix(ui): reply textareas no longer open huge (auto-resize skips hidden + caps height)

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