Changeset 515cf1a in Klonkt
- Timestamp:
- 06/28/2026 10:39:11 AM (2 months ago)
- Branches:
- main
- Children:
- 73cffc3
- Parents:
- 0596945
- Location:
- src/views
- Files:
-
- 3 edited
-
pages/news.ejs (modified) (2 diffs)
-
pages/post.ejs (modified) (1 diff)
-
partials/post-card.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/news.ejs
r0596945 r515cf1a 101 101 </div> 102 102 103 <div class="tl-content"><%- p.content %></div>104 105 103 <% 106 104 var media = []; try { media = JSON.parse(p.media_json || '[]'); } catch (e) { media = []; } … … 109 107 var auds = media.filter(function(m){ return m && m.url && m.type && /^audio\//.test(m.type); }); 110 108 var _nsfwVisual = !!p.nsfw && (imgs.length || vids.length || auds.length); 109 var _nsfwText = !!p.nsfw && !(imgs.length || vids.length || auds.length); 111 110 %> 111 <% if (_nsfwText) { %> 112 <div class="tl-content nsfw-media"><span class="nsfw-veil"><span class="nsfw-veil-label">🔞 <%= p.cw || t('post.nsfw_warning') %></span><span class="nsfw-veil-btn"><%= t('post.nsfw_show') %></span></span><%- p.content %></div> 113 <% } else { %> 114 <div class="tl-content"><%- p.content %></div> 115 <% } %> 112 116 <% if (_nsfwVisual) { %><div class="nsfw-media"><% } %> 113 117 <% if (imgs.length) { %> -
src/views/pages/post.ejs
r0596945 r515cf1a 181 181 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> 182 182 <% } 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> 184 184 <% } %> 185 185 <span class="post-related-meta"> -
src/views/partials/post-card.ejs
r0596945 r515cf1a 43 43 } 44 44 %> 45 <li class="post-list-item<%= _hasCover? ' has-cover' : '' %><%= (_isPinned || _isBoost) ? ' is-pinned' : '' %>">45 <li class="post-list-item<%= (_hasCover || post.nsfw) ? ' has-cover' : '' %><%= (_isPinned || _isBoost) ? ' is-pinned' : '' %>"> 46 46 47 47 <% if (_hasCover) { %> … … 51 51 <img src="<%= post.cover_image_url %>" alt="" loading="lazy" decoding="async"> 52 52 <% if (post.nsfw) { %><span 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></span><% } %> 53 </a> 54 <% } else if (post.nsfw) { %> 55 <a class="post-list-cover nsfw-media" href="<%= _href %>" 56 <% 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"<% } %> 57 aria-label="<%= post.title || '(zonder titel)' %>" tabindex="-1"> 58 <span 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></span> 53 59 </a> 54 60 <% } %>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)