3 <div class=header_content>
6 <!-- Wrapper reserves space and handles the click -->
7 <div class="fox-player ratio-1x1" style="--size: 80px">
8 <!-- Clickable poster (image of first frame) -->
9 <button class="fox-thumb" type="button" aria-label="Play animation">
11 src="/images/fox-first-frame.webp"
12 width="80px" height="80px"
14 loading="eager" decoding="async"
18 <!-- Hidden initially; revealed on click -->
19 <stacked-alpha-video class="fox-video" inert>
20 <video muted playsinline>
21 <source src="/videos/av1.mp4"
22 type="video/mp4; codecs=av01.0.08M.08.0.110.01.01.01.1">
23 <source src="/videos/hevc.mp4"
24 type="video/mp4; codecs=hvc1.1.6.H120.b0">
26 </stacked-alpha-video>
29 <img src="/images/fox-first-frame.webp" alt="">
34 <a class="header_name" href="/">
39 {% assign navPages = collections.all | eleventyNavigation %}
41 {%- for entry in navPages %}
42 <li{% if entry.url == page.url %} class="current"{% endif %}>
43 <a href="{{ entry.url }}">{{ entry.title }}</a>
47 <button id="darkModeToggle">
54 <script type="module">
55 const root = document.querySelector('.fox-player');
56 const thumb = root.querySelector('.fox-thumb');
57 const el = root.querySelector('.fox-video');
58 const v = el.querySelector('video');
60 thumb.addEventListener('click', async () => {
61 thumb.classList.add('is-hidden'); // fades out poster (no layout change)
62 // el.addEventListener('click', () => {
63 // if (v.paused) v.play().catch(()=>{});
65 // }, { passive: true });
67 // Start playback on gesture (Safari-friendly)
71 // As a fallback, mute then try again (autoplay policy)
73 try { await v.play(); } catch {}
75 }, { passive: true });