Changeset adb6291 in Klonkt for src/routes/posts.js


Ignore:
Timestamp:
06/30/2026 06:11:50 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
a95dbfd
Parents:
1c33804
Message:

feat(video-cover): render iOS video covers across grid, list, related + listing pages

  • post-tile.ejs / post-card.ejs / post.ejs(related): the cover <img> carries data-ios-mp4 when a loop MP4 exists; shell.ejs's iOS swap upgrades it everywhere covers render
  • cover_video_url threaded through the explicit listing SELECTs (tags/types/users/related); the home grid + main list already use SELECT p.*

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/routes/posts.js

    r1c33804 radb6291  
    998998  const candidates = isHub
    999999    ? db.prepare(`
    1000         SELECT p.id, p.slug, p.title, p.cover_image_url, p.published_at, p.tags, p.nsfw, p.content_warning, s.slug AS site_slug
     1000        SELECT p.id, p.slug, p.title, p.cover_image_url, p.cover_video_url, p.published_at, p.tags, p.nsfw, p.content_warning, s.slug AS site_slug
    10011001        FROM posts p JOIN sites s ON s.id = p.site_id
    10021002        WHERE p.status = 'published' AND p.id != ?
     
    10041004      `).all(post.id)
    10051005    : db.prepare(`
    1006         SELECT id, slug, title, cover_image_url, published_at, tags, nsfw, content_warning
     1006        SELECT id, slug, title, cover_image_url, cover_video_url, published_at, tags, nsfw, content_warning
    10071007        FROM posts
    10081008        WHERE site_id = ? AND status = 'published' AND id != ?
Note: See TracChangeset for help on using the changeset viewer.