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.

10.9 KB
Raw Blame
<!doctype html>
<!--
  KALLAWAY · tier1 · stat · NEEDLE
  Horizontal linear gauge — a glowing track with a bright needle/marker that
  slides right to the target value; count-up number above. Tick marks, gradient
  fill, accent needle with a trailing glow. Centred, large and spacious.
  Knob: data-pct on #needle-track (default 60).
  Slots: kicker (~28 chars), stat (number with unit, e.g. "60%"), label (~65 chars),
         source (~40 chars).
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; }

      #t1-stat-needle {
        position: absolute; inset: 0; width: 1920px; height: 1080px;
        background: var(--canvas); color: var(--text);
        font-family: var(--font-display); overflow: hidden;
      }

      #t1-stat-needle .bloom {
        position: absolute; inset: 0; background: var(--bloom-bottom); z-index: 1;
      }
      #t1-stat-needle .grid {
        position: absolute; inset: 0; z-index: 1;
        background-image: var(--dot); background-size: var(--dot-size);
        opacity: 0.45;
        -webkit-mask-image: radial-gradient(120% 100% at 50% 60%, #000 35%, transparent 80%);
                mask-image: radial-gradient(120% 100% at 50% 60%, #000 35%, transparent 80%);
      }

      /* centered layout */
      #t1-stat-needle .content {
        position: absolute; left: 0; right: 0; top: 0; bottom: 0;
        display: flex; flex-direction: column; align-items: center;
        justify-content: center; z-index: 4; gap: 0; padding-bottom: 20px;
      }

      #t1-stat-needle .kicker {
        font-family: var(--font-mono); font-size: var(--size-label);
        font-weight: var(--wt-bold); letter-spacing: var(--track-wide);
        text-transform: uppercase; color: var(--accent);
        text-shadow: var(--textglow-accent);
        margin-bottom: 48px;
      }

      /* Number display */
      #t1-stat-needle .stat-wrap {
        display: flex; align-items: baseline; gap: 0; margin-bottom: 70px;
      }
      #t1-stat-needle .stat {
        font-family: var(--font-display); font-weight: var(--wt-black);
        font-size: var(--size-mega); line-height: 0.9; letter-spacing: var(--track-tight);
        background: linear-gradient(150deg, #ffffff 15%, rgba(var(--accent-rgb), 0.85) 80%);
        -webkit-background-clip: text; background-clip: text;
        -webkit-text-fill-color: transparent; text-fill-color: transparent;
        filter: drop-shadow(0 0 28px rgba(var(--accent-rgb), 0.55));
      }
      #t1-stat-needle .unit {
        font-family: var(--font-display); font-weight: var(--wt-bold);
        font-size: 96px; line-height: 1; letter-spacing: var(--track-tight);
        color: rgba(var(--accent-rgb), 0.75); text-shadow: var(--textglow-accent);
        margin-left: 12px; align-self: flex-start; padding-top: 28px;
      }

      /* Gauge SVG */
      #t1-stat-needle .gauge-svg {
        width: 1500px; height: 180px;
      }

      /* Label */
      #t1-stat-needle .label {
        font-family: var(--font-body); font-size: var(--size-body);
        font-weight: var(--wt-med); color: var(--text-dim);
        text-align: center; max-width: 1000px; line-height: 1.45; margin-top: 56px;
      }
      #t1-stat-needle .label em {
        font-style: normal; color: var(--text); text-shadow: var(--textglow);
      }

      #t1-stat-needle .source {
        position: absolute; left: var(--pad); bottom: 44px;
        font-family: var(--font-mono); font-size: var(--size-tiny);
        font-weight: var(--wt-reg); letter-spacing: 0.12em;
        text-transform: uppercase; color: var(--text-faint); z-index: 5;
      }

      #t1-stat-needle .vignette {
        position: absolute; inset: 0; pointer-events: none; z-index: 6;
        background: var(--vignette);
      }
      #t1-stat-needle .grain {
        position: absolute; inset: -40px; background: var(--tex-grain);
        background-size: 200px 200px; mix-blend-mode: overlay; opacity: 0.10;
        pointer-events: none; z-index: 7;
      }
    </style>
  </head>
  <body>
    <div id="t1-stat-needle" data-composition-id="t1-stat-needle" data-start="0" data-width="1920" data-height="1080">
      <div class="bloom"></div>
      <div class="grid"></div>

      <div class="content">
        <div class="kicker" data-slot="kicker">KNOWLEDGE RETENTION · POST-TEST</div>

        <div class="stat-wrap">
          <div class="stat" id="needle-num">0</div>
          <div class="unit">%</div>
        </div>

        <!--
          Gauge SVG: viewBox 0 0 1500 180
          Track: y=80, height=28, rx=14, x=0..1500
          Fill rect starts at x=0, grows right.
          Needle: vertical line + circle at x position.
          Ticks at 0,25,50,75,100% → x=0,375,750,1125,1500
          Track left x=60, right x=1440, width=1380
        -->
        <svg class="gauge-svg" id="needle-track" data-pct="60" viewBox="0 0 1500 180"
             fill="none" xmlns="http://www.w3.org/2000/svg">
          <defs>
            <linearGradient id="ngFill" x1="0%" y1="0%" x2="100%" y2="0%">
              <stop offset="0%" stop-color="#37BDF8" stop-opacity="0.35"/>
              <stop offset="100%" stop-color="#ffffff" stop-opacity="0.85"/>
            </linearGradient>
            <linearGradient id="ngNeedle" x1="0%" y1="0%" x2="0%" y2="100%">
              <stop offset="0%" stop-color="#ffffff" stop-opacity="1"/>
              <stop offset="100%" stop-color="#37BDF8" stop-opacity="0.70"/>
            </linearGradient>
            <filter id="nGlow" x="-30%" y="-60%" width="160%" height="220%">
              <feGaussianBlur in="SourceGraphic" stdDeviation="8" result="b"/>
              <feComposite in="SourceGraphic" in2="b" operator="over"/>
            </filter>
            <clipPath id="nClip">
              <rect id="nClipRect" x="60" y="52" width="0" height="76" rx="14"/>
            </clipPath>
          </defs>

          <!-- Track background -->
          <rect x="60" y="52" width="1380" height="76" rx="14"
                fill="rgba(255,255,255,0.05)" stroke="rgba(255,255,255,0.10)" stroke-width="1.5"/>

          <!-- Filled portion via clipped rect -->
          <rect x="60" y="52" width="1380" height="76" rx="14"
                fill="url(#ngFill)" clip-path="url(#nClip)"/>

          <!-- Tick marks + labels -->
          <line x1="60"   y1="40" x2="60"   y2="142" stroke="rgba(255,255,255,0.25)" stroke-width="1.5"/>
          <line x1="405"  y1="48" x2="405"  y2="134" stroke="rgba(255,255,255,0.15)" stroke-width="1"/>
          <line x1="750"  y1="40" x2="750"  y2="142" stroke="rgba(255,255,255,0.25)" stroke-width="1.5"/>
          <line x1="1095" y1="48" x2="1095" y2="134" stroke="rgba(255,255,255,0.15)" stroke-width="1"/>
          <line x1="1440" y1="40" x2="1440" y2="142" stroke="rgba(255,255,255,0.25)" stroke-width="1.5"/>

          <text x="60"   y="165" text-anchor="middle" font-family="Space Mono,monospace" font-size="18" fill="rgba(240,238,233,0.40)">0%</text>
          <text x="405"  y="165" text-anchor="middle" font-family="Space Mono,monospace" font-size="18" fill="rgba(240,238,233,0.40)">25%</text>
          <text x="750"  y="165" text-anchor="middle" font-family="Space Mono,monospace" font-size="18" fill="rgba(240,238,233,0.40)">50%</text>
          <text x="1095" y="165" text-anchor="middle" font-family="Space Mono,monospace" font-size="18" fill="rgba(240,238,233,0.40)">75%</text>
          <text x="1440" y="165" text-anchor="middle" font-family="Space Mono,monospace" font-size="18" fill="rgba(240,238,233,0.40)">100%</text>

          <!-- Needle (vertical line + circle) — x driven by GSAP -->
          <line id="nLine" x1="60" y1="38" x2="60" y2="144"
                stroke="url(#ngNeedle)" stroke-width="4" stroke-linecap="round"
                filter="url(#nGlow)"/>
          <circle id="nDot" cx="60" cy="90" r="18"
                  fill="white"
                  style="filter:drop-shadow(0 0 14px rgba(55,189,248,0.95)) drop-shadow(0 0 36px rgba(55,189,248,0.55));"/>
        </svg>

        <div class="label" data-slot="label">
          of learners recall key concepts accurately <em>30 days after</em> completing module assessments
        </div>
      </div>

      <div class="source" data-slot="source">SOURCE · AIS ASSESSMENT DATA 2026</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 || {};
      const tl = gsap.timeline({ paused: true });

      const trackEl = document.getElementById("needle-track");
      const pct     = parseFloat(trackEl.getAttribute("data-pct")) || 60;

      /* gauge geometry: track x=60..1440, width=1380 */
      const trackX = 60, trackW = 1380;
      const numEl    = document.getElementById("needle-num");
      const nLine    = document.getElementById("nLine");
      const nDot     = document.getElementById("nDot");
      const nClipR   = document.getElementById("nClipRect");

      function setNeedle(v) {
        const x = trackX + (v / 100) * trackW;
        nLine.setAttribute("x1", x);
        nLine.setAttribute("x2", x);
        nDot.setAttribute("cx", x);
        nClipR.setAttribute("width", x - trackX);
        numEl.textContent = Math.round(v);
      }

      /* grain */
      tl.fromTo("#t1-stat-needle .grain",
        { backgroundPosition: "0px 0px" },
        { backgroundPosition: "108px 82px", duration: 0.6, ease: "none", repeat: 11, yoyo: true }, 0);

      /* bloom + grid */
      tl.from("#t1-stat-needle .bloom",
          { autoAlpha: 0, scale: 0.9, transformOrigin: "50% 120%", duration: 1.3, ease: "expo.out" }, 0)
        .from("#t1-stat-needle .grid",
          { autoAlpha: 0, duration: 1.1, ease: "power2.out" }, 0.2)

        /* kicker */
        .from("#t1-stat-needle .kicker",
          { autoAlpha: 0, y: 18, filter: "blur(8px)", duration: 0.75, ease: "power3.out" }, 0.50)

        /* number count-up + needle slide — 3-arg .to */
        .from("#t1-stat-needle .stat-wrap",
          { autoAlpha: 0, duration: 0.5, ease: "power2.out" }, 0.80)

        .to({ val: 0 }, {
          val: pct,
          duration: 1.8, ease: "power2.out",
          onUpdate: function() { setNeedle(this.targets()[0].val); }
        }, 1.00)

        /* gauge track slides in */
        .from("#t1-stat-needle .gauge-svg",
          { autoAlpha: 0, scaleX: 0, transformOrigin: "0% 50%", duration: 0.7, ease: "power3.out" }, 0.85)

        /* needle glow pulse after landing */
        .to("#nDot",
          { attr: { r: 24 }, duration: 0.8, ease: "sine.inOut", repeat: 3, yoyo: true }, 2.90)

        /* label */
        .from("#t1-stat-needle .label",
          { autoAlpha: 0, y: 20, filter: "blur(8px)", duration: 0.85, ease: "power3.out" }, 2.00)

        /* source */
        .from("#t1-stat-needle .source",
          { autoAlpha: 0, duration: 0.6, ease: "power2.out" }, 2.30)

        .set({}, {}, 7);

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