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.

11.7 KB
Raw Blame
<!doctype html>
<!--
  KALLAWAY · tier1 · stat · DIAL
  Radial gauge dial with a glowing needle that swings to the value; large number
  counts up in the center of the dial arc. Aurora bloom, glass surface, breathing glow.
  Knob: data-pct on #t1-stat-dial-svg (default 72).
  Slots: kicker (~28 chars uppercase), stat (center number), label (~70 chars, <em> on one phrase), source (~40 chars uppercase).
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; }

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

      #t1-stat-dial .bloom {
        position: absolute; inset: 0; background: var(--bloom-bottom); z-index: 1;
      }
      #t1-stat-dial .grid {
        position: absolute; inset: 0; z-index: 1;
        background-image: var(--dot); background-size: var(--dot-size);
        opacity: 0.5;
        -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%);
      }

      #t1-stat-dial .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: 44px; padding-bottom: 20px;
      }

      #t1-stat-dial .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);
      }

      /* Dial container */
      #t1-stat-dial .dial-container {
        position: relative;
        width: 560px; height: 340px;
        display: flex; align-items: flex-end; justify-content: center;
        flex-shrink: 0;
      }

      #t1-stat-dial .dial-glow {
        position: absolute; left: 50%; top: 50%;
        transform: translate(-50%, -50%);
        width: 640px; height: 640px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(var(--accent-rgb), 0.16) 0%, transparent 65%);
        box-shadow: 0 0 120px 30px rgba(var(--accent-rgb), 0.18);
      }

      #t1-stat-dial .dial-svg {
        width: 560px; height: 340px;
        position: relative; z-index: 2;
        overflow: visible;
      }

      /* Stat number overlaid at dial center */
      #t1-stat-dial .dial-num-wrap {
        position: absolute; left: 50%; bottom: 20px;
        transform: translateX(-50%);
        z-index: 3; text-align: center;
      }
      #t1-stat-dial .stat {
        font-family: var(--font-display);
        font-weight: var(--wt-black);
        font-size: 120px;
        line-height: 1;
        letter-spacing: var(--track-tight);
        background: linear-gradient(160deg, #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 22px rgba(var(--accent-rgb), 0.55));
      }

      #t1-stat-dial .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: 860px;
        line-height: 1.45;
      }
      #t1-stat-dial .label em {
        font-style: normal; color: var(--text); text-shadow: var(--textglow);
      }

      #t1-stat-dial .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-dial .vignette {
        position: absolute; inset: 0; pointer-events: none; z-index: 6;
        background: var(--vignette);
      }
      #t1-stat-dial .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-dial" data-composition-id="t1-stat-dial" 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">LEARNER CONFIDENCE · 2026 SURVEY</div>

        <div class="dial-container">
          <div class="dial-glow"></div>

          <!--
            Gauge: 220deg arc from -200deg to 20deg (roughly 8 o'clock to 4 o'clock).
            data-pct drives fill + needle angle.
          -->
          <svg class="dial-svg" id="t1-stat-dial-svg" data-pct="72"
               viewBox="0 0 560 340" fill="none" xmlns="http://www.w3.org/2000/svg">
            <defs>
              <linearGradient id="dialGrad" x1="0%" y1="0%" x2="100%" y2="0%">
                <stop offset="0%" stop-color="#37BDF8" stop-opacity="0.6"/>
                <stop offset="60%" stop-color="#37BDF8" stop-opacity="1"/>
                <stop offset="100%" stop-color="#ffffff" stop-opacity="0.95"/>
              </linearGradient>
              <filter id="dialGlow" x="-30%" y="-30%" width="160%" height="160%">
                <feGaussianBlur in="SourceGraphic" stdDeviation="7" result="blur"/>
                <feComposite in="SourceGraphic" in2="blur" operator="over"/>
              </filter>
              <filter id="needleGlow" x="-60%" y="-60%" width="220%" height="220%">
                <feGaussianBlur in="SourceGraphic" stdDeviation="5" result="blur"/>
                <feComposite in="SourceGraphic" in2="blur" operator="over"/>
              </filter>
            </defs>

            <!-- Track arc: 220deg from -200deg, center (280,310), r=250 -->
            <path id="t1-stat-dial-track" stroke="rgba(255,255,255,0.08)" stroke-width="20"
              stroke-linecap="round" fill="none"
              d="M 60 297 A 250 250 0 1 1 500 297"
            />

            <!-- Progress arc -->
            <path id="t1-stat-dial-arc" stroke="url(#dialGrad)" stroke-width="20"
              stroke-linecap="round" fill="none" filter="url(#dialGlow)"
              d="M 60 297 A 250 250 0 1 1 500 297"
            />

            <!-- Tick marks (9 ticks, 0-100) -->
            <g stroke="rgba(255,255,255,0.20)" stroke-width="1.5">
              <!-- ticks hardcoded at 0,12.5,25,37.5,50,62.5,75,87.5,100 pct of 220deg arc, r=250, cx=280, cy=310 -->
              <!-- angle = -200 + pct/100*220 (degrees) -->
              <!-- 0%: -200deg: cos=-0.9397, sin=-0.342 → from (280-250*0.9397, 310-250*0.342)=(45.1,224.5) to r=230 -->
              <line x1="45" y1="224" x2="58" y2="228"/>
              <line x1="89" y1="115" x2="99" y2="124"/>
              <line x1="186" y1="42" x2="191" y2="53"/>
              <line x1="301" y1="17" x2="301" y2="29"/>
              <line x1="413" y1="44" x2="408" y2="55"/>
              <line x1="500" y1="130" x2="489" y2="135"/>
              <line x1="530" y1="228" x2="517" y2="231"/>
              <!-- 100%: +20deg endpoint -->
              <line x1="500" y1="297" x2="490" y2="289"/>
            </g>

            <!-- Needle — rotates around pivot (280, 310) -->
            <g id="t1-stat-dial-needle" transform="rotate(-200, 280, 310)" filter="url(#needleGlow)">
              <!-- needle line from center to near arc -->
              <line x1="280" y1="310" x2="280" y2="75" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/>
              <!-- glowing tip dot at end of needle -->
              <circle cx="280" cy="75" r="9" fill="#37BDF8"
                style="filter: drop-shadow(0 0 10px rgba(55,189,248,0.9)) drop-shadow(0 0 28px rgba(55,189,248,0.5));"/>
              <!-- pivot dot -->
              <circle cx="280" cy="310" r="12" fill="rgba(255,255,255,0.12)"
                stroke="rgba(55,189,248,0.6)" stroke-width="2"/>
            </g>
          </svg>

          <div class="dial-num-wrap">
            <div class="stat" id="t1-stat-dial-num" data-slot="stat">72%</div>
          </div>
        </div>

        <div class="label" data-slot="label">of students rate their practical AI skills as <em>job-ready</em> after completing the program</div>
      </div>

      <div class="source" data-slot="source">SOURCE · AIS OUTCOMES REPORT 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 });

      /* Read knob */
      const dialSvg  = document.getElementById("t1-stat-dial-svg");
      const pct      = parseFloat(dialSvg.getAttribute("data-pct")) || 72;
      const arcEl    = document.getElementById("t1-stat-dial-arc");
      const needleEl = document.getElementById("t1-stat-dial-needle");
      const numEl    = document.getElementById("t1-stat-dial-num");

      /* Compute arc dasharray for the track path.
         Path goes from -200deg to +20deg (220deg sweep). r=250, so arc length = 2π*250*(220/360) ≈ 959.9 */
      const arcLen = 2 * Math.PI * 250 * (220 / 360);
      arcEl.style.strokeDasharray  = arcLen;
      arcEl.style.strokeDashoffset = arcLen; /* start empty */

      /* ambient grain flicker */
      tl.fromTo("#t1-stat-dial .grain",
        { backgroundPosition: "0px 0px" },
        { backgroundPosition: "110px 80px", duration: 0.6, ease: "none", repeat: 11, yoyo: true }, 0);

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

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

        /* dial glow blooms in */
        .from("#t1-stat-dial .dial-glow",
          { autoAlpha: 0, scale: 0.5, duration: 1.2, ease: "expo.out" }, 0.65)

        /* dial SVG scale in */
        .from("#t1-stat-dial .dial-svg",
          { autoAlpha: 0, scale: 0.78, transformOrigin: "50% 90%", duration: 1.0, ease: "back.out(1.4)" }, 0.70)

        /* needle + arc + count-up drive together */
        .to({ val: 0 }, {
          val: pct,
          duration: 1.8, ease: "power2.out",
          onUpdate: function() {
            const v = this.targets()[0].val;
            /* arc fill */
            arcEl.style.strokeDashoffset = arcLen - (v / 100) * arcLen;
            /* needle rotation: starts at -200deg, ends at -200 + pct/100*220 */
            const angle = -200 + (v / 100) * 220;
            needleEl.setAttribute("transform", "rotate(" + angle + ", 280, 310)");
            /* count-up */
            numEl.textContent = Math.round(v) + "%";
          }
        }, 1.05)

        /* stat blur-in */
        .from("#t1-stat-dial .stat",
          { autoAlpha: 0, scale: 0.8, duration: 0.85, ease: "power3.out" }, 1.10)

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

        /* source */
        .from("#t1-stat-dial .source",
          { autoAlpha: 0, duration: 0.7, ease: "power2.out" }, 2.40)

        /* breathing glow */
        .to("#t1-stat-dial .dial-glow",
          { opacity: 0.50, scale: 1.08, transformOrigin: "50% 50%",
            duration: 1.6, ease: "sine.inOut", repeat: 2, yoyo: true }, 3.0)

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

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