Changeset b5a09ce2 in Klonkt for src/views/pages/post.ejs


Ignore:
Timestamp:
06/30/2026 05:32:33 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
857a06f
Parents:
1d6f9a2
Message:

feat(video-cover): frontend — render animated covers as iOS video, capture in editor

  • post-edit.ejs: hidden cover_video_url field; the cover uploader stores the returned MP4 url
  • post.ejs: the cover <img> carries data-ios-mp4 when a loop MP4 exists
  • shell.ejs: on iOS, swap <img data-ios-mp4> for a muted looping inline <video> (runs on load + htmx swaps); every other browser keeps the crisp WebP

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/post.ejs

    r1d6f9a2 rb5a09ce2  
    2020  <% if (post.cover_image_url) { %>
    2121    <figure class="post-cover">
    22       <img src="<%= post.cover_image_url %>" alt="">
     22      <img src="<%= post.cover_image_url %>" alt=""<% if (post.cover_video_url) { %> data-ios-mp4="<%= post.cover_video_url %>"<% } %>>
    2323    </figure>
    2424  <% } %>
Note: See TracChangeset for help on using the changeset viewer.