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.8 KB
Raw Blame
<!doctype html>
<!--
  KALLAWAY · tier1 · stat · SEMIGAUGE
  A semicircle gauge (SVG arc). The stroke draws from left to right to the
  target value. The percentage reads in the center of the arc and counts up.
  Aurora bloom, glass surface, breathing glow.
  Knob: data-pct on #t1-st-semi-svg (default 64).
  Slots: kicker (~28 chars uppercase), stat (center figure e.g. "64%"),
         label (~70 chars, <em>), source (~40 chars).
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; }

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

      #t1-st-semi .bloom {
        position: absolute; inset: 0; background: var(--bloom-bottom); z-index: 1;
      }
      #t1-st-semi .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%);
      }

      /* Content stack */
      #t1-st-semi .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;
      }

      /* Kicker */
      #t1-st-semi .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: 56px;
      }

      /* Gauge container */
      #t1-st-semi .gauge-container {
        position: relative;
        width: 680px; height: 380px;
        display: flex; align-items: flex-start; justify-content: center;
        flex-shrink: 0;
      }

      /* Outer glow halo behind SVG */
      #t1-st-semi .gauge-glow {
        position: absolute;
        width: 640px; height: 380px;
        left: 50%; top: 0; transform: translateX(-50%);
        background: radial-gradient(ellipse 70% 100% at 50% 100%,
          rgba(var(--accent-rgb), 0.22) 0%, transparent 65%);
      }

      /* SVG gauge */
      #t1-st-semi .gauge-svg {
        position: relative; z-index: 2;
        width: 680px; height: 380px;
        overflow: visible;
      }

      /* Center readout — positioned inside the gauge arc well */
      #t1-st-semi .gauge-center {
        position: absolute;
        bottom: 0; left: 50%; transform: translateX(-50%);
        text-align: center; z-index: 3; width: 320px;
      }
      #t1-st-semi .stat {
        font-family: var(--font-display);
        font-weight: var(--wt-black);
        font-size: 110px;
        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.60));
      }
      #t1-st-semi .stat-sub {
        font-family: var(--font-mono);
        font-size: var(--size-label);
        font-weight: var(--wt-bold);
        letter-spacing: 0.10em;
        text-transform: uppercase;
        color: var(--text-dim);
        margin-top: 4px;
      }

      /* Tick marks at 0% and 100% extremes */
      #t1-st-semi .tick-label {
        position: absolute;
        bottom: 10px;
        font-family: var(--font-mono);
        font-size: 20px;
        font-weight: var(--wt-bold);
        letter-spacing: 0.06em;
        color: var(--text-faint);
      }
      #t1-st-semi .tick-label.t0  { left: 22px; }
      #t1-st-semi .tick-label.t100 { right: 22px; }

      /* Label + source */
      #t1-st-semi .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;
        margin-top: 52px;
      }
      #t1-st-semi .label em {
        font-style: normal; color: var(--text); text-shadow: var(--textglow);
      }

      #t1-st-semi .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-st-semi .vignette {
        position: absolute; inset: 0; pointer-events: none; z-index: 6;
        background: var(--vignette);
      }
      #t1-st-semi .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-st-semi" data-composition-id="t1-st-semi" 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">COURSE PASS RATE · 2026</div>

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

          <!--
            Semi-circle: centre (340,340), r=300, sweep 180° left-to-right.
            Arc path goes from (40,340) across the top to (640,340).
            We use stroke-dasharray/dashoffset on the progress arc.
          -->
          <svg class="gauge-svg" id="t1-st-semi-svg" data-pct="64"
               viewBox="0 0 680 380" fill="none" xmlns="http://www.w3.org/2000/svg">
            <defs>
              <linearGradient id="semiGrad" 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="semiGlow" x="-15%" y="-15%" width="130%" height="130%">
                <feGaussianBlur in="SourceGraphic" stdDeviation="5" result="blur"/>
                <feComposite in="SourceGraphic" in2="blur" operator="over"/>
              </filter>
            </defs>

            <!-- Track arc — ghost -->
            <path id="t1-st-semi-track"
              d="M 40 340 A 300 300 0 0 1 640 340"
              stroke="rgba(255,255,255,0.08)"
              stroke-width="20"
              stroke-linecap="round"
              fill="none"
            />

            <!-- Progress arc — animated -->
            <path id="t1-st-semi-arc"
              d="M 40 340 A 300 300 0 0 1 640 340"
              stroke="url(#semiGrad)"
              stroke-width="20"
              stroke-linecap="round"
              fill="none"
              filter="url(#semiGlow)"
            />

            <!-- Bright tip dot — moves along the arc -->
            <circle id="t1-st-semi-tip" cx="40" cy="340" r="12"
              fill="#ffffff"
              style="filter: drop-shadow(0 0 10px rgba(55,189,248,0.9)) drop-shadow(0 0 26px rgba(55,189,248,0.5));"
            />
          </svg>

          <div class="gauge-center">
            <div class="stat" id="t1-st-semi-num" data-slot="stat">64%</div>
            <div class="stat-sub">pass rate</div>
          </div>

          <div class="tick-label t0">0%</div>
          <div class="tick-label t100">100%</div>
        </div>

        <div class="label" data-slot="label">students who complete all quizzes <em>pass on their first attempt</em></div>
      </div>

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

      /* Read knob */
      const svgEl = document.getElementById("t1-st-semi-svg");
      const pct   = parseFloat(svgEl.getAttribute("data-pct")) || 64;
      const arcEl = document.getElementById("t1-st-semi-arc");
      const tipEl = document.getElementById("t1-st-semi-tip");
      const numEl = document.getElementById("t1-st-semi-num");

      /* Semi-circle arc length: π * r = π * 300 */
      const arcLen = Math.PI * 300;

      /* Init: arc fully hidden (dashoffset = full length) */
      arcEl.style.strokeDasharray  = arcLen;
      arcEl.style.strokeDashoffset = arcLen;

      /* Compute tip position along the semicircle for a given 0-100 fraction.
         Arc goes from angle=180° (left) to angle=0° (right) at centre (340,340). */
      function tipPos(p) {
        const frac  = p / 100;
        const angle = Math.PI - frac * Math.PI;   // 180° → 0°
        return {
          cx: 340 + 300 * Math.cos(angle),
          cy: 340 - 300 * Math.sin(angle)         // SVG y is down, arc is above centre
        };
      }

      /* Init tip at start (left end) */
      tipEl.setAttribute("cx", "40");
      tipEl.setAttribute("cy", "340");

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

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

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

        /* Gauge glow blooms in */
        .from("#t1-st-semi .gauge-glow",
          { autoAlpha: 0, scale: 0.5, transformOrigin: "50% 100%", duration: 1.3, ease: "expo.out" }, 0.55)

        /* Track arc fades in */
        .from("#t1-st-semi-track",
          { autoAlpha: 0, duration: 0.8, ease: "power2.out" }, 0.65)

        /* Arc fill + tip travel + count-up — all in sync */
        .to({ val: 0 }, {
          val: pct,
          duration: 1.8, ease: "power2.out",
          onUpdate: function() {
            const v = this.targets()[0].val;
            arcEl.style.strokeDashoffset = arcLen - (v / 100) * arcLen;
            const pos = tipPos(v);
            tipEl.setAttribute("cx", pos.cx);
            tipEl.setAttribute("cy", pos.cy);
            numEl.textContent = Math.round(v) + "%";
          }
        }, 0.95)

        /* Center number blur-in */
        .from("#t1-st-semi .stat",
          { autoAlpha: 0, filter: "blur(18px)", duration: 0.85, ease: "power3.out" }, 1.00)

        /* Sub-label under the number */
        .from("#t1-st-semi .stat-sub",
          { autoAlpha: 0, y: 8, duration: 0.7, ease: "power2.out" }, 1.60)

        /* Tick labels */
        .from("#t1-st-semi .tick-label",
          { autoAlpha: 0, duration: 0.5, ease: "power2.out" }, 1.70)

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

        /* Source */
        .from("#t1-st-semi .source",
          { autoAlpha: 0, duration: 0.7, ease: "power2.out" }, 2.30)

        /* Breathing glow pulse */
        .to("#t1-st-semi .gauge-glow",
          { opacity: 0.55, scale: 1.08, transformOrigin: "50% 100%",
            duration: 1.6, ease: "sine.inOut", repeat: 2, yoyo: true }, 2.80)

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

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