<% // Homepage — feed of posts. // // Renders BOTH a timeline view (.post-list, default) AND a grid view // (.feed-grid, square Instagram-style tiles). CSS toggles between the // two based on body[data-feed-view="timeline"|"grid"]. This mirrors the // v9 pattern in lib/template-content.php so the same view-switcher works. // // Pinned posts sort first inside the timeline list; they are not given a // separate "Pinned" header (v9 just lets order speak for itself + a ★ chip). const allPosts = [...pinnedPosts, ...posts]; const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; %> <%# View switcher used to be rendered here; moved to shell.ejs (above #pcms-main) so it survives HTMX swaps and is visible on every non-admin page. %>
<% if (allPosts.length === 0) { %>

Hier is het nog stil.

Nog geen posts. Spannend.

<% if (user && canMutate && permissions.canCreatePost(user, site)) { %>

Schrijf je eerste post →

<% } %>
<% } else { %> <% } %>
<% if (allPosts.length > 0) { %>
<% allPosts.forEach(function(post) { %> <%- include('../partials/post-tile', { post: post }) %> <% }); %>
<% } %>