<% // 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 _isBoost = !!post.isBoost; const _hasCover = !!post.cover_image_url; const _typeLabel = (post.type && post.type !== 'post') ? post.type : ''; const _src = post.source_name || ''; // bron-site (cirkel-feed: van welke site komt deze post) const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; const _external = post.external_url || null; const _href = _external || (_base + '/' + post.slug); const _ext = !!_external; %> style="background-image: url('<%= post.cover_image_url %>'); --tile-hue: <%= _tileHue %>;"<% } else { %>style="--tile-hue: <%= _tileHue %>;"<% } %> <% if (_ext) { %>target="_blank" rel="noopener"<% } else { %>hx-get="<%= _href %>?partial=1" hx-target="#pcms-main" hx-swap="innerHTML" hx-push-url="<%= _href %>" hx-indicator="#pcms-loading"<% } %>> <% if (_typeLabel) { %> <%= _typeLabel %> <% } %> <% if (_isBoost) { %> Boost <% } else if (_isPinned) { %> Pinned <% } %> <% if (_hasCover) { %>
<%= post.title || '(untitled)' %> <% if (_src) { %>van <%= _src %><% } %>
<% } else { %> <%= post.title || '(untitled)' %> <% if (_src) { %>van <%= _src %><% } %> <% } %>