Changeset 515cf1a in Klonkt for src/views/pages/post.ejs


Ignore:
Timestamp:
06/28/2026 10:39:11 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
73cffc3
Parents:
0596945
Message:

fix(nsfw): warn on cover-less NSFW posts everywhere (related, list, news)

A sensitive post with no cover image showed no warning in the related-posts grid, the list
view, or the News feed (text-only). Now they all get the click-to-reveal veil over a
placeholder (cards) or over the content (text-only News post), matching the grid tile.

  • views/pages/post.ejs — veil on the empty related-cover placeholder
  • views/partials/post-card.ejs — placeholder cover + veil when nsfw and no cover
  • views/pages/news.ejs — blur the content for a text-only sensitive post
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/post.ejs

    r0596945 r515cf1a  
    181181                      aria-hidden="true"><% if (rp.nsfw) { %><span class="nsfw-veil"><span class="nsfw-veil-label">🔞 <%= rp.content_warning || t('post.nsfw_warning') %></span><span class="nsfw-veil-btn"><%= t('post.nsfw_show') %></span></span><% } %></span>
    182182              <% } else { %>
    183                 <span class="post-related-cover post-related-cover--empty" aria-hidden="true"></span>
     183                <span class="post-related-cover post-related-cover--empty<%= rp.nsfw ? ' nsfw-media' : '' %>" aria-hidden="true"><% if (rp.nsfw) { %><span class="nsfw-veil"><span class="nsfw-veil-label">🔞 <%= rp.content_warning || t('post.nsfw_warning') %></span><span class="nsfw-veil-btn"><%= t('post.nsfw_show') %></span></span><% } %></span>
    184184              <% } %>
    185185              <span class="post-related-meta">
Note: See TracChangeset for help on using the changeset viewer.