Skip to content

Herk Edit Kit by Nate Herk: edit videos, reels, and YouTube Shorts with Codex or Claude Code. 15 skills, transcript-driven cuts, storytelling, 406 motion-graphics cards, and HyperFrames templates.

6.8 KB
Raw Blame
<!doctype html>
<!--
  VOX EXPLAINER · tier1 · overview · VERTICAL TIMELINE
  A vertical spine down the left-center with 4 event nodes (diamonds); each node
  = a year (Fraunces) + an event label to the right. Spine wipes top→bottom
  (scaleY), nodes pop in sequence. Marker title at top.
  Slots: title, yr1, ev1, yr2, ev2, yr3, ev3, yr4, ev4, source.
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; }
      #t1-ov-vtime {
        position: absolute; inset: 0; width: 1920px; height: 1080px;
        background: var(--paper); color: var(--ink);
        font-family: var(--font-display); overflow: hidden;
      }
      #t1-ov-vtime .grid {
        position: absolute; inset: -2px;
        background-image:
          repeating-linear-gradient(0deg,  var(--grid-line) 0 1px, transparent 1px var(--grid-size)),
          repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px var(--grid-size));
      }
      #t1-ov-vtime .grain {
        position: absolute; inset: -40px; background: var(--tex-grain);
        background-size: 180px 180px; mix-blend-mode: multiply; opacity: 0.4; pointer-events: none; z-index: 6;
      }
      #t1-ov-vtime .vignette {
        position: absolute; inset: 0; pointer-events: none; z-index: 5;
        background: radial-gradient(130% 120% at 50% 40%, transparent 60%, rgba(23,19,14,0.14) 100%);
      }

      /* marker title */
      #t1-ov-vtime .title {
        position: absolute; top: 88px; left: 50%; transform: translateX(-50%) skewX(var(--marker-skew));
        background: var(--yellow); padding: 8px 28px; z-index: 3;
        font-weight: var(--wt-black); font-size: var(--size-title); letter-spacing: var(--track-tight);
        text-transform: uppercase; white-space: nowrap;
      }

      /* vertical spine */
      #t1-ov-vtime .spine {
        position: absolute; left: 680px; top: 240px; width: 8px; height: 700px;
        background: var(--ink); transform-origin: top center; z-index: 2;
      }

      /* node rows */
      #t1-ov-vtime .nodes {
        position: absolute; left: 0; top: 240px; width: 1920px; z-index: 3;
      }
      #t1-ov-vtime .node {
        position: absolute; left: 0; width: 1920px; display: flex; align-items: center;
      }
      /* diamond node at spine center (left:680px, 8px wide → center=684px) */
      #t1-ov-vtime .node-diamond {
        position: absolute; left: 652px; width: 64px; height: 64px;
        background: var(--yellow); border: 6px solid var(--ink);
        transform: rotate(45deg);
      }
      #t1-ov-vtime .node-year {
        position: absolute; left: 280px; top: 50%; transform: translateY(-50%);
        font-weight: var(--wt-black); font-size: 90px; line-height: 1;
        letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink);
      }
      #t1-ov-vtime .node-label {
        position: absolute; left: 780px;
        font-family: var(--font-label); font-weight: var(--wt-bold);
        font-size: var(--size-headline); line-height: 1.2; color: var(--ink);
        max-width: 900px;
        top: 50%; transform: translateY(-50%);
      }

      /* source */
      #t1-ov-vtime .source {
        position: absolute; right: 130px; bottom: 60px; z-index: 4;
        font-family: var(--font-label); font-weight: var(--wt-bold);
        font-size: var(--size-tiny); letter-spacing: var(--track-wide);
        text-transform: uppercase; color: var(--muted);
      }
    </style>
  </head>
  <body>
    <div id="t1-ov-vtime" data-composition-id="t1-ov-vtime" data-start="0" data-width="1920" data-height="1080">
      <div class="grid"></div>
      <div class="title" data-slot="title">TIMELINE</div>
      <div class="spine"></div>
      <div class="nodes" id="vtime-nodes"></div>
      <div class="source" data-slot="source">SOURCE · RECORD</div>
      <div class="vignette"></div>
      <div class="grain"></div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <script>
      window.__timelines = window.__timelines || {};

      // Node data — deterministic, no Math.random
      const nodes = [
        { yr: "1991", ev: "The first agreement signed",    slot: ["yr1","ev1"] },
        { yr: "2003", ev: "Major reform reshapes the field", slot: ["yr2","ev2"] },
        { yr: "2014", ev: "Digital expansion begins",        slot: ["yr3","ev3"] },
        { yr: "2023", ev: "New era declared",                slot: ["yr4","ev4"] },
      ];

      const SPINE_TOP  = 240;   // px from top of comp (matches CSS)
      const SPINE_H    = 700;
      const STEP       = SPINE_H / (nodes.length - 1);   // 233px between nodes

      const container = document.getElementById("vtime-nodes");
      nodes.forEach((n, i) => {
        const row = document.createElement("div");
        row.className = "node n" + i;
        row.style.top = (i * STEP) + "px";
        row.style.height = "110px";

        const diamond = document.createElement("div");
        diamond.className = "node-diamond";

        const year = document.createElement("div");
        year.className = "node-year";
        year.setAttribute("data-slot", n.slot[0]);
        year.textContent = n.yr;

        const label = document.createElement("div");
        label.className = "node-label";
        label.setAttribute("data-slot", n.slot[1]);
        label.textContent = n.ev;

        row.appendChild(diamond);
        row.appendChild(year);
        row.appendChild(label);
        container.appendChild(row);
      });

      const tl = gsap.timeline({ paused: true });

      // grain flicker (finite)
      tl.fromTo("#t1-ov-vtime .grain", { backgroundPosition: "0px 0px" },
        { backgroundPosition: "160px 110px", duration: 0.5, ease: "steps(4)", repeat: 11, yoyo: true }, 0);

      // title snaps in
      tl.from("#t1-ov-vtime .title", { autoAlpha: 0, scaleX: 0, transformOrigin: "left center", duration: 0.35, ease: "power3.out" }, 0.15);

      // spine wipes top-to-bottom
      tl.from("#t1-ov-vtime .spine", { scaleY: 0, transformOrigin: "top center", duration: 0.55, ease: "power2.inOut" }, 0.5);

      // nodes stagger in
      nodes.forEach((_, i) => {
        const t = 0.7 + i * 0.22;
        tl.from("#t1-ov-vtime .n" + i + " .node-diamond",
          { autoAlpha: 0, scale: 0, transformOrigin: "center center", duration: 0.3, ease: "back.out(1.6)" }, t);
        tl.from("#t1-ov-vtime .n" + i + " .node-year",
          { autoAlpha: 0, x: -30, duration: 0.3, ease: "power3.out" }, t + 0.05);
        tl.from("#t1-ov-vtime .n" + i + " .node-label",
          { autoAlpha: 0, x: 24, duration: 0.3, ease: "power3.out" }, t + 0.1);
      });

      tl.from("#t1-ov-vtime .source", { autoAlpha: 0, duration: 0.3 }, 1.9);
      tl.set({}, {}, 7);

      window.__timelines["t1-ov-vtime"] = tl;
    </script>
  </body>
</html>