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.

8.1 KB
Raw Blame
<!doctype html>
<!--
  KALLAWAY · tier1 · stat · BIGPERCENT
  A massive percentage figure with a circular glow halo behind it. Number counts
  up from 0 to the target. Aurora bloom, grain, vignette, sublabel beneath the
  stat, glass pill kicker at top.
  Knob: data-pct on #t1-st-pct-root (default 82).
  Slots: kicker (~28 chars uppercase), stat (the figure text e.g. "82%"),
         label (~70 chars, <em> on key phrase), source (~40 chars).
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; }

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

      /* Aurora bloom */
      #t1-st-pct .bloom {
        position: absolute; inset: 0; background: var(--bloom-bottom); z-index: 1;
      }
      /* Dot grid */
      #t1-st-pct .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 — centered vertically */
      #t1-st-pct .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;
      }

      /* Kicker pill */
      #t1-st-pct .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: 52px;
      }

      /* Halo container — behind the number */
      #t1-st-pct .halo-wrap {
        position: relative;
        display: flex; align-items: center; justify-content: center;
        width: 680px; height: 440px;
        flex-shrink: 0;
      }

      /* The circular glow halo */
      #t1-st-pct .halo {
        position: absolute;
        width: 560px; height: 560px;
        border-radius: 50%;
        top: 50%; left: 50%; transform: translate(-50%, -50%);
        background: radial-gradient(circle,
          rgba(var(--accent-rgb), 0.28) 0%,
          rgba(var(--accent-rgb), 0.10) 40%,
          transparent 68%);
        /* No CSS filter here so GSAP can animate scale/autoAlpha cleanly */
      }

      /* Secondary outer diffuse bloom ring */
      #t1-st-pct .halo-outer {
        position: absolute;
        width: 780px; height: 780px;
        border-radius: 50%;
        top: 50%; left: 50%; transform: translate(-50%, -50%);
        background: radial-gradient(circle,
          rgba(var(--accent-rgb), 0.10) 0%,
          transparent 55%);
      }

      /* The huge percentage number */
      #t1-st-pct .stat {
        position: relative; z-index: 2;
        font-family: var(--font-display);
        font-weight: var(--wt-black);
        font-size: 320px;
        line-height: 1;
        letter-spacing: -0.03em;
        background: linear-gradient(160deg, #ffffff 20%, rgba(var(--accent-rgb), 0.80) 85%);
        -webkit-background-clip: text; background-clip: text;
        -webkit-text-fill-color: transparent; text-fill-color: transparent;
        filter: drop-shadow(0 0 36px rgba(var(--accent-rgb), 0.60));
      }

      /* Label below the halo */
      #t1-st-pct .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: 880px;
        line-height: 1.45;
        margin-top: 48px;
      }
      #t1-st-pct .label em {
        font-style: normal; color: var(--text); text-shadow: var(--textglow);
      }

      /* Source */
      #t1-st-pct .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;
      }

      /* Vignette + grain */
      #t1-st-pct .vignette {
        position: absolute; inset: 0; pointer-events: none; z-index: 6;
        background: var(--vignette);
      }
      #t1-st-pct .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-pct" data-composition-id="t1-st-pct" data-start="0"
         data-width="1920" data-height="1080" data-pct="82">
      <div class="bloom"></div>
      <div class="grid"></div>

      <div class="content">
        <div class="kicker" data-slot="kicker">LEARNER SATISFACTION RATE</div>

        <div class="halo-wrap">
          <div class="halo-outer"></div>
          <div class="halo"></div>
          <div class="stat" id="t1-st-pct-num" data-slot="stat">82%</div>
        </div>

        <div class="label" data-slot="label">of students rate this course <em>above expectations</em> in post-completion surveys</div>
      </div>

      <div class="source" data-slot="source">SOURCE · PLATFORM SURVEY 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 rootEl = document.getElementById("t1-st-pct");
      const pct    = parseFloat(rootEl.getAttribute("data-pct")) || 82;
      const numEl  = document.getElementById("t1-st-pct-num");

      /* Grain flicker — finite, deterministic */
      tl.fromTo("#t1-st-pct .grain",
        { backgroundPosition: "0px 0px" },
        { backgroundPosition: "120px 90px", duration: 0.6, ease: "none", repeat: 11, yoyo: true }, 0);

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

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

        /* Outer halo bloom in */
        .from("#t1-st-pct .halo-outer",
          { autoAlpha: 0, scale: 0.5, transformOrigin: "50% 50%", duration: 1.4, ease: "expo.out" }, 0.55)

        /* Inner halo */
        .from("#t1-st-pct .halo",
          { autoAlpha: 0, scale: 0.5, transformOrigin: "50% 50%", duration: 1.2, ease: "expo.out" }, 0.65)

        /* Big number: scale in + count up */
        .from("#t1-st-pct .stat",
          { autoAlpha: 0, scale: 0.6, transformOrigin: "50% 50%", duration: 0.9, ease: "back.out(1.4)" }, 0.80)

        /* Count-up — 3-arg .to form: target, vars, position */
        .to({ val: 0 }, {
          val: pct,
          duration: 1.6, ease: "power2.out",
          onUpdate: function() {
            numEl.textContent = Math.round(this.targets()[0].val) + "%";
          }
        }, 0.85)

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

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

        /* Breathing halo pulse — finite */
        .to("#t1-st-pct .halo",
          { opacity: 0.55, scale: 1.10, transformOrigin: "50% 50%",
            duration: 1.6, ease: "sine.inOut", repeat: 2, yoyo: true }, 2.60)
        .to("#t1-st-pct .halo-outer",
          { opacity: 0.45, scale: 1.06, transformOrigin: "50% 50%",
            duration: 2.0, ease: "sine.inOut", repeat: 1, yoyo: true }, 2.70)

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

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