fee51f7a65
* feat(docs): add template gallery page with visual previews * fix(docs): remove invalid MDX heading anchors * chore: retrigger CI * feat(docs): merge gallery into templates page with hover-to-play video previews - Consolidated gallery.mdx and templates.mdx into single templates.mdx - Moved templates page to Getting Started section - Added MP4 video previews rendered by hyperframes (hover to play) - Custom JS for hover-to-play behavior (Mintlify strips JSX event handlers) - 2-column grid for landscape, 3-column for portrait - Remotion-style cards with gradient overlay labels * fix(docs): update broken links after templates page move * ci(regression): remove scripts/ from regression trigger paths scripts/ contains dev utilities (lint, versioning, preview generation) that don't affect the rendering engine.
28 lines
992 B
JavaScript
28 lines
992 B
JavaScript
// Hover-to-play for template gallery video cards
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
document.querySelectorAll('.tpl-card video').forEach(function (video) {
|
|
video.parentElement.addEventListener('mouseenter', function () {
|
|
video.play();
|
|
});
|
|
video.parentElement.addEventListener('mouseleave', function () {
|
|
video.pause();
|
|
video.currentTime = 2;
|
|
});
|
|
});
|
|
});
|
|
|
|
// Re-attach after client-side navigation (Mintlify uses SPA routing)
|
|
var observer = new MutationObserver(function () {
|
|
document.querySelectorAll('.tpl-card video:not([data-hover-bound])').forEach(function (video) {
|
|
video.setAttribute('data-hover-bound', 'true');
|
|
video.parentElement.addEventListener('mouseenter', function () {
|
|
video.play();
|
|
});
|
|
video.parentElement.addEventListener('mouseleave', function () {
|
|
video.pause();
|
|
video.currentTime = 2;
|
|
});
|
|
});
|
|
});
|
|
observer.observe(document.body, { childList: true, subtree: true });
|