<% } %>
<%# ββ Related posts (3-card grid) βββββββββββββββββββββββββββββ
Always shown if at least one related post exists. Selection logic
lives server-side: same-tag posts ranked by overlap, falling back
to most-recent if there's no tag overlap. %>
<% if (relatedPosts && relatedPosts.length > 0) { %>
<% } %>
<%# ββ Pinned navigation (only when current post is pinned) βββ
Two card-style links: "Vorige vastgepinde" / "Volgende vastgepinde".
Edge-of-stack states show "β BOVENAAN β Nieuwste post" or the equivalent
for the bottom. Layout mirrors v9 exactly. %>
<% if (post.pinned) { %>
<% } %>
<%# ββ Chronological prev/next (kept for non-pinned posts) ββββββ
For pinned posts the pinned-nav above replaces this. Non-pinned
regular posts still get the simple older/newer pair. %>
<% if (!post.pinned && (prevPost || nextPost)) { %>
<% } %>
<%= totalComments %> comment<%= totalComments === 1 ? '' : 's' %>
<% if (typeof currentPath === 'string' && currentPath && currentPath.indexOf('/' + post.slug) === 0) { %> <% /* If the URL has ?pending=1, the previous submit landed in the queue */ %> <% } %> <% if (!comments || !comments.length) { %>No comments yet.<% if (!user) { %> Log in to start the conversation.<% } %>
<% } else { %><% comments.forEach(function(c) { %>-
<% if (c.author_avatar) { %>
<% } else { %>
<%= c.author_username.charAt(0).toUpperCase() %>
<% } %>
<%= c.author_username %>
<%= formatDateTime(c.created_at) %>
<%= c.content %>
<% if (user) { %>
<% } %>
<% if (user && permissions.canDeleteComment(user, c, site)) { %>
<% } %>
<% if (user) { %>
<% } %>
<% if (c.replies && c.replies.length) { %>
<% }); %>
<% } %> <% if (user) { %> <% } else { %><% c.replies.forEach(function(r) { %>-
<% if (r.author_avatar) { %>
<% } else { %>
<%= r.author_username.charAt(0).toUpperCase() %>
<% } %>
<%= r.author_username %>
<%= formatDateTime(r.created_at) %>
<%= r.content %>
<% if (user && permissions.canDeleteComment(user, r, site)) { %>
<% } %>
<% }); %>
<% } %>Log in to comment
<% } %>