% // 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. %> <%# FEP-7628 slice 3: this account moved. The signpost comes FIRST, before any post: a visitor should not scroll a dead feed to find out we left. typeof-guard because an old route may render this template for one request right after a deploy (view cache fills on first hit). %> <% if (typeof movedTo !== 'undefined' && movedTo) { %>
<%= t('phome.empty_sub') %>
<% if (user && canMutate && permissions.canCreatePost(user, site)) { %> <% } %>