Changeset 492fc20 in Klonkt
- Timestamp:
- 06/28/2026 05:40:58 PM (2 months ago)
- Branches:
- main
- Children:
- 5bc67b4
- Parents:
- 041a0df
- Location:
- src
- Files:
-
- 2 edited
-
services/ThumbnailService.js (modified) (1 diff)
-
views/partials/post-card.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ThumbnailService.js
r041a0df r492fc20 23 23 const execFileP = promisify(execFile); 24 24 25 // Allowed widths (whitelist → no arbitrary-size abuse). 128 = avatars; 480 ≈ 2× a grid tile. 26 export const THUMB_SIZES = new Set([128, 320, 480, 640]); 25 // Allowed widths (whitelist → no arbitrary-size abuse). 128 = avatars; 256 ≈ 2× a list 26 // cover; 480 ≈ 2× a grid tile. Keep these ~2× the display size so line-art stays crisp. 27 export const THUMB_SIZES = new Set([128, 256, 320, 480, 640]); 27 28 28 29 let _seq = 0; -
src/views/partials/post-card.ejs
r041a0df r492fc20 49 49 <% 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"<% } %> 50 50 aria-label="<%= post.title || '(zonder titel)' %>" tabindex="-1"> 51 <img src="<%= thumb(post.cover_image_url, 320) %>" alt="" loading="lazy" decoding="async">51 <img src="<%= thumb(post.cover_image_url, 256) %>" 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 53 </a>
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)