Changeset 600fbf3 in Klonkt for src/views/shell.ejs


Ignore:
Timestamp:
06/28/2026 05:29:51 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
3038fc9
Parents:
a64d705
Message:

feat(images): accent-gradient placeholder also for timeline feed media

The News-feed media images now show the same accent-gradient placeholder while loading
(with reserved space via :has(), so no blank gap), and fade in once loaded.

  • views/pages/news.ejs — .tl-media-img gradient placeholder + img fade + :has min-height
  • views/shell.ejs — add .tl-media-img img to the cover fade-in scan
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/shell.ejs

    ra64d705 r600fbf3  
    743743  if (window.__coverFadeWired) return; window.__coverFadeWired = true;
    744744  function scan(root) {
    745     (root || document).querySelectorAll('.grid-tile-img, .post-list-cover img').forEach(function (img) {
     745    (root || document).querySelectorAll('.grid-tile-img, .post-list-cover img, .tl-media-img img').forEach(function (img) {
    746746      if (img.dataset.fade) return; img.dataset.fade = '1';
    747747      if (img.complete && img.naturalWidth > 0) return;   // already loaded → leave visible
Note: See TracChangeset for help on using the changeset viewer.