Changeset 8308c9ca in Klonkt
- Timestamp:
- 06/28/2026 10:27:59 PM (2 months ago)
- Branches:
- main
- Children:
- 318e1ce
- Parents:
- 48027f2
- Location:
- src
- Files:
-
- 2 edited
-
services/ThumbnailService.js (modified) (1 diff)
-
views/pages/news.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ThumbnailService.js
r48027f2 r8308c9ca 24 24 25 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]); 26 // (~44px); 128 = nav/profile avatars; 256 ≈ 2× a list cover; 480 ≈ 2× a grid tile; 1280 = 27 // full-width timeline media (crisp on mobile retina, ~430px × 3 DPR). Keep these ~2× the 28 // display size so the browser barely scales (avoids both jaggies and upscaling blur). 29 export const THUMB_SIZES = new Set([96, 128, 256, 320, 480, 640, 1280]); 29 30 30 31 let _seq = 0; -
src/views/pages/news.ejs
r48027f2 r8308c9ca 118 118 <div class="tl-media"> 119 119 <% imgs.forEach(function(m){ %> 120 <a class="tl-media-img" href="<%= m.url %>" target="_blank" rel="noopener"><img src="<%= thumb(m.url, 640) %>" alt="" loading="lazy" decoding="async"></a>120 <a class="tl-media-img" href="<%= m.url %>" target="_blank" rel="noopener"><img src="<%= thumb(m.url, 1280) %>" alt="" loading="lazy" decoding="async"></a> 121 121 <% }); %> 122 122 </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)