Changeset 0596945 in Klonkt
- Timestamp:
- 06/28/2026 10:33:07 AM (2 months ago)
- Branches:
- main
- Children:
- 515cf1a
- Parents:
- c6cdce6
- Location:
- src
- Files:
-
- 2 edited
-
routes/posts.js (modified) (2 diffs)
-
views/pages/post.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
rc6cdce6 r0596945 946 946 const candidates = isHub 947 947 ? db.prepare(` 948 SELECT p.id, p.slug, p.title, p.cover_image_url, p.published_at, p.tags, s.slug AS site_slug948 SELECT p.id, p.slug, p.title, p.cover_image_url, p.published_at, p.tags, p.nsfw, p.content_warning, s.slug AS site_slug 949 949 FROM posts p JOIN sites s ON s.id = p.site_id 950 950 WHERE p.status = 'published' AND p.id != ? … … 952 952 `).all(post.id) 953 953 : db.prepare(` 954 SELECT id, slug, title, cover_image_url, published_at, tags 954 SELECT id, slug, title, cover_image_url, published_at, tags, nsfw, content_warning 955 955 FROM posts 956 956 WHERE site_id = ? AND status = 'published' AND id != ? -
src/views/pages/post.ejs
rc6cdce6 r0596945 177 177 hx-push-url="/<%= rp.slug %>" hx-indicator="#pcms-loading"<% } %>> 178 178 <% if (rp.cover_image_url) { %> 179 <span class="post-related-cover "179 <span class="post-related-cover<%= rp.nsfw ? ' nsfw-media' : '' %>" 180 180 style="background-image: url('<%= rp.cover_image_url %>')" 181 aria-hidden="true">< /span>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 183 <span class="post-related-cover post-related-cover--empty" aria-hidden="true"></span>
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)