Changeset 5bc67b4 in Klonkt
- Timestamp:
- 06/28/2026 09:20:04 PM (2 months ago)
- Branches:
- main
- Children:
- abc8959
- Parents:
- 492fc20
- Location:
- src
- Files:
-
- 4 edited
-
services/ThumbnailService.js (modified) (1 diff)
-
views/pages/following.ejs (modified) (1 diff)
-
views/pages/news.ejs (modified) (1 diff)
-
views/partials/fedi-node.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ThumbnailService.js
r492fc20 r5bc67b4 23 23 const execFileP = promisify(execFile); 24 24 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]); 25 // Allowed widths (whitelist → no arbitrary-size abuse). 96 = small feed/comment avatars 26 // (~44px); 128 = nav/profile avatars; 256 ≈ 2× a list cover; 480 ≈ 2× a grid tile. Keep 27 // these ~2× the display size so line-art stays crisp (the browser barely downscales). 28 export const THUMB_SIZES = new Set([96, 128, 256, 320, 480, 640]); 28 29 29 30 let _seq = 0; -
src/views/pages/following.ejs
r492fc20 r5bc67b4 20 20 <% following.forEach(function(f){ %> 21 21 <li class="tl-foll"> 22 <span class="tl-foll-av"><% if (f.icon) { %><img src="<%= avatar(f.icon, 128) %>" alt=""><% } else { %><%= (f.name || '?').charAt(0).toUpperCase() %><% } %></span>22 <span class="tl-foll-av"><% if (f.icon) { %><img src="<%= avatar(f.icon, 96) %>" alt=""><% } else { %><%= (f.name || '?').charAt(0).toUpperCase() %><% } %></span> 23 23 <span class="tl-foll-meta"> 24 24 <a href="<%= f.url || f.actor_uri %>" target="_blank" rel="nofollow noopener"><%= f.name || f.handle %></a> -
src/views/pages/news.ejs
r492fc20 r5bc67b4 93 93 <% if (p.reblog_name) { %><div class="tl-boost-by"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg> <strong><%= p.reblog_name %></strong> <%= t('tl.boosted') %></div><% } %> 94 94 <div class="tl-head"> 95 <span class="tl-avatar"><% if (p.author_icon) { %><img src="<%= avatar(p.author_icon, 128) %>" alt="" loading="lazy"><% } else { %><%= (p.author_name || '?').charAt(0).toUpperCase() %><% } %></span>95 <span class="tl-avatar"><% if (p.author_icon) { %><img src="<%= avatar(p.author_icon, 96) %>" alt="" loading="lazy"><% } else { %><%= (p.author_name || '?').charAt(0).toUpperCase() %><% } %></span> 96 96 <span class="tl-id"> 97 97 <a class="tl-author" href="<%= p.author_url || p.author_uri %>" target="_blank" rel="nofollow noopener"><%= p.author_name %></a> -
src/views/partials/fedi-node.ejs
r492fc20 r5bc67b4 1 1 <%# Renders one fediverse thread node (n). Expects: n, t, canManageSite, _base, siteAvatar, formatDateTime, postSlug %> 2 2 <div class="comment-avatar"> 3 <% if (n.actor_icon) { %><img src="<%= avatar(n.actor_icon, 128) %>" alt="" loading="lazy">3 <% if (n.actor_icon) { %><img src="<%= avatar(n.actor_icon, 96) %>" alt="" loading="lazy"> 4 4 <% } else { %><span><%= (n.actor_name || '?').charAt(0).toUpperCase() %></span><% } %> 5 5 </div>
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)