source: Klonkt/src/views/pages/post.ejs@ 65a0697

main
Last change on this file since 65a0697 was 65a0697, checked in by roboburr <roboburr@…>, 2 months ago

fix(video-cover): size the swapped <video> like the cover <img> (post + list)

The iOS swap replaces the cover <img> with a <video>, but the post-page and list-cover CSS target
.post-cover img / .post-list-cover img (the element), so the <video> inherited no sizing and
rendered at its intrinsic height — too tall for the width. Add video to those selectors. Grid +
related covers already work (the img's class travels to the video, and those rules are class-based).

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

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