<% // Square Instagram-style tile for the .feed-grid view (v9 pattern). // - With cover → background-image, dark gradient overlay reveals title on hover/touch // - No cover → .grid-tile-gradient with the title centered (random hue per tile) const _tileHue = ((post.id || post.slug || '0').charCodeAt(0) * 7) % 360; const _isPinned = !!post.pinned; const _hasCover = !!post.cover_image_url; const _typeLabel = (post.type && post.type !== 'post') ? post.type : ''; %> style="background-image: url('<%= post.cover_image_url %>'); --tile-hue: <%= _tileHue %>;"<% } else { %>style="--tile-hue: <%= _tileHue %>;"<% } %> hx-get="/<%= post.slug %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="/<%= post.slug %>" hx-indicator="#pcms-loading"> <% if (_typeLabel) { %> <%= _typeLabel %> <% } %> <% if (_isPinned) { %> Pinned <% } %> <% if (_hasCover) { %>
<%= post.title || '(untitled)' %>
<% } else { %> <%= post.title || '(untitled)' %> <% } %>