Changeset 2a58d76 in Klonkt for src/views/shell.ejs


Ignore:
Timestamp:
06/30/2026 11:46:46 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
b31c119
Parents:
38120c7
Message:

fix(cirkel): video covers were blank in the grid view

The cover fade-in script grabbed <video class=grid-tile-img> too and
set is-loading (opacity:0) waiting for a 'load' event a <video> never
fires (it fires loadeddata/canplay), so grid video covers stayed
invisible and the tile's accent-gradient placeholder showed through.
The list view was unaffected (its selector is img-only).

  • src/views/shell.ejs — qualify the fade selector as img.grid-tile-img so it no longer touches <video> elements (they show + autoplay directly)
  • src/views/partials/post-tile.ejs — give the grid video a poster (still frame via the thumb proxy) so the cover is never blank even if autoplay is throttled
  • src/views/partials/post-card.ejs — same poster on the list video

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/shell.ejs

    r38120c7 r2a58d76  
    759759  if (window.__coverFadeWired) return; window.__coverFadeWired = true;
    760760  function scan(root) {
    761     (root || document).querySelectorAll('.grid-tile-img, .post-list-cover img, .tl-media-img img').forEach(function (img) {
     761    (root || document).querySelectorAll('img.grid-tile-img, .post-list-cover img, .tl-media-img img').forEach(function (img) {
    762762      if (img.dataset.fade) return; img.dataset.fade = '1';
    763763      if (img.complete && img.naturalWidth > 0) return;   // already loaded → leave visible
Note: See TracChangeset for help on using the changeset viewer.