summaryrefslogtreecommitdiff
path: root/morph.html
blob: b600234625cb743de91f6ce25a33132db50d2cb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Synoptic — 30-day morph</title>
<style>
  body { margin: 0; background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; }
  video { max-width: 100%; max-height: 100vh; cursor: pointer; }
  a.nav-button {
    position: fixed; left: 0;
    color: #aaa; background: rgba(0,0,0,0.7);
    padding: 0.45em 0.9em;
    border: 1px solid #444; border-left: none;
    border-radius: 0 0.3em 0.3em 0;
    text-decoration: none; font-family: sans-serif; font-size: 0.95em;
  }
  a.nav-button.radars { top: 60%; }
  a.nav-button.static { top: 75%; }
  a.nav-button:hover  { color: #fff; border-color: #888; }
  .hint {
    position: fixed; right: 0.6em; bottom: 0.5em;
    color: #555; font-family: sans-serif; font-size: 0.75em;
    pointer-events: none;
  }
  #paused-indicator {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: #fff; font-family: sans-serif; font-size: 4em;
    background: rgba(0,0,0,0.5); padding: 0.2em 0.6em; border-radius: 0.2em;
    display: none; pointer-events: none;
  }
  body.paused #paused-indicator { display: block; }
</style>
</head>
<body>
  <video id="vid" src="/morph.mp4" autoplay muted loop playsinline></video>
  <a class="nav-button radars" href="https://radar.pestrel.com/">Radars</a>
  <a class="nav-button static" href="/">Static Chart</a>
  <div class="hint">click or Shift: pause / resume</div>
  <div id="paused-indicator">⏸</div>
  <script>
    const v = document.getElementById('vid');
    function toggle() {
      if (v.paused) { v.play(); document.body.classList.remove('paused'); }
      else          { v.pause(); document.body.classList.add('paused'); }
    }
    v.addEventListener('click', toggle);
    window.addEventListener('keydown', (e) => {
      if (e.key === 'Shift' && !e.repeat) { e.preventDefault(); toggle(); }
    });
  </script>
</body>
</html>