Changeset 476d6e7 in Klonkt for src/views/partials/post-tile.ejs


Ignore:
Timestamp:
07/16/2026 12:20:51 PM (8 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
1cc8c85
Parents:
af21002
git-author:
Robin <roboburr@…> (07/13/2026 05:36:18 AM)
git-committer:
Robin <roboburr@…> (07/16/2026 12:20:51 PM)
Message:

Spoor A step 3a: extract nsfw-veil partial (7 copies → 1)

The NSFW veil contents (🔞 label + reveal button) were copy-pasted in 7 spots
across post-card, post-tile, post.ejs (related) and news.ejs, each with its own
content_warning variable. Extract the identical inner block into
partials/nsfw-veil.ejs; each caller keeps its exact wrapper element, so the
rendered HTML is byte-identical (verified live: the homepage card emits the
same veil markup as before, both include paths resolve).

Co-Authored-By: Claude Opus 4.8 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/post-tile.ejs

    raf21002 r476d6e7  
    3939    <% if (_src) { %><span class="grid-tile-gradient-src">van <%= _src %></span><% } %>
    4040  <% } %>
    41   <% if (post.nsfw) { %><div class="nsfw-veil"><span class="nsfw-veil-label">🔞 <%= post.content_warning || t('post.nsfw_warning') %></span><span class="nsfw-veil-btn"><%= t('post.nsfw_show') %></span></div><% } %>
     41  <% if (post.nsfw) { %><div class="nsfw-veil"><%- include('nsfw-veil', { cw: post.content_warning }) %></div><% } %>
    4242</a>
Note: See TracChangeset for help on using the changeset viewer.