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.

7.9 KB
Raw Blame
<!doctype html>
<!--
  KALLAWAY · tier2 · label · SPARKCHIP
  A compact frosted glass chip with a tiny SVG sparkline that draws on via
  stroke-dashoffset, a term label, and a value/detail line. The sparkline tip
  ends at a glowing node. Anchored left side, mid-height. Transparent overlay.
  Slots: term (~26 chars), detail (~60 chars).
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; background: transparent; }

      #t2-lb-spark {
        position: absolute; inset: 0; width: 1920px; height: 1080px;
        background: transparent; overflow: hidden;
        font-family: var(--font-display);
      }

      /* Localized ambient glow behind chip — left side */
      #t2-lb-spark .local-glow {
        position: absolute;
        left: 50px; top: 430px;
        width: 460px; height: 260px;
        border-radius: 50%;
        background: radial-gradient(ellipse at 35% 55%,
          rgba(var(--accent-rgb), 0.24) 0%,
          rgba(var(--accent-rgb), 0.07) 54%,
          transparent 82%);
        filter: blur(38px);
        pointer-events: none;
      }

      /* Chip positioned left-mid */
      #t2-lb-spark .chip {
        position: absolute;
        left: 80px; top: 454px;
        padding: 18px 22px 16px;
        background: var(--glass-bg-dark);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        border: 1.5px solid var(--glass-border);
        border-radius: var(--radius);
        box-shadow:
          var(--glass-shadow),
          0 0 0 1px rgba(var(--accent-rgb), 0.22),
          0 0 22px rgba(var(--accent-rgb), 0.16),
          inset 0 1px 0 var(--glass-hi);
        overflow: hidden;
        min-width: 360px;
      }

      /* Hairline top shimmer */
      #t2-lb-spark .chip::before {
        content: "";
        position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
        background: linear-gradient(90deg,
          transparent,
          rgba(255,255,255,0.48) 45%,
          rgba(255,255,255,0.48) 55%,
          transparent);
      }

      /* Top row: sparkline SVG + term */
      #t2-lb-spark .top-row {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-bottom: 10px;
      }

      /* Sparkline wrapper */
      #t2-lb-spark .spark-wrap {
        flex-shrink: 0;
        position: relative;
        width: 110px; height: 40px;
      }

      #t2-lb-spark .spark-svg {
        width: 110px; height: 40px;
        overflow: visible;
      }

      /* Glowing node at sparkline tip */
      #t2-lb-spark .spark-node {
        position: absolute;
        right: -2px; top: 50%;
        transform: translateY(-50%);
        width: 10px; height: 10px;
        border-radius: 50%;
        background: var(--accent);
        box-shadow: var(--glow-accent), 0 0 16px rgba(var(--accent-rgb), 0.55);
      }

      #t2-lb-spark .term {
        font-family: var(--font-display);
        font-weight: var(--wt-bold);
        font-size: 26px;
        letter-spacing: var(--track-snug);
        color: var(--white);
        text-shadow: var(--textglow);
        line-height: 1.1;
        white-space: nowrap;
      }

      /* Divider */
      #t2-lb-spark .divider {
        height: 1px;
        background: var(--glass-border);
        margin-bottom: 10px;
      }

      /* Detail + inline accent value */
      #t2-lb-spark .detail-row {
        display: flex;
        align-items: baseline;
        gap: 12px;
      }

      #t2-lb-spark .value-badge {
        font-family: var(--font-mono);
        font-weight: var(--wt-bold);
        font-size: 22px;
        color: var(--accent);
        text-shadow: var(--textglow-accent);
        letter-spacing: 0.04em;
        white-space: nowrap;
        flex-shrink: 0;
      }

      #t2-lb-spark .detail {
        font-family: var(--font-body);
        font-weight: var(--wt-reg);
        font-size: 19px;
        line-height: 1.40;
        color: var(--text-dim);
      }
    </style>
  </head>
  <body>
    <div id="t2-lb-spark" data-composition-id="t2-lb-spark"
         data-start="0" data-width="1920" data-height="1080">

      <div class="local-glow"></div>

      <div class="chip">
        <div class="top-row">
          <!-- Sparkline: upward trending path, 110×40 viewBox -->
          <div class="spark-wrap">
            <svg class="spark-svg" id="t2-lb-spark-svg"
                 viewBox="0 0 110 40" fill="none" xmlns="http://www.w3.org/2000/svg">
              <defs>
                <filter id="sparkGlow" x="-20%" y="-40%" width="140%" height="180%">
                  <feGaussianBlur in="SourceGraphic" stdDeviation="1.8" result="blur"/>
                  <feComposite in="SourceGraphic" in2="blur" operator="over"/>
                </filter>
                <linearGradient id="sparkGrad" x1="0%" y1="0%" x2="100%" y2="0%">
                  <stop offset="0%" stop-color="#37BDF8" stop-opacity="0.45"/>
                  <stop offset="100%" stop-color="#37BDF8" stop-opacity="1"/>
                </linearGradient>
              </defs>
              <!-- Upward trending sparkline path (7 control points) -->
              <polyline id="t2-lb-spark-path"
                points="0,35 18,30 34,26 50,22 66,16 84,11 108,5"
                stroke="url(#sparkGrad)"
                stroke-width="2.4"
                stroke-linecap="round"
                stroke-linejoin="round"
                fill="none"
                filter="url(#sparkGlow)"
                style="stroke-dasharray: 120; stroke-dashoffset: 120;"
              />
            </svg>
            <div class="spark-node" id="t2-lb-spark-node" style="opacity:0;"></div>
          </div>
          <div class="term" data-slot="term">Course Revenue</div>
        </div>

        <div class="divider"></div>

        <div class="detail-row">
          <div class="value-badge">+38%</div>
          <div class="detail" data-slot="detail">quarter-over-quarter growth across AI literacy cohorts.</div>
        </div>
      </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 COMP    = "#t2-lb-spark";
      const pathEl  = document.getElementById("t2-lb-spark-path");
      const nodeEl  = document.getElementById("t2-lb-spark-node");

      /* ambient glow */
      tl.from(`${COMP} .local-glow`,
        { autoAlpha: 0, scale: 0.60, transformOrigin: "35% 55%",
          duration: 1.10, ease: "expo.out" }, 0)

      /* chip springs in from left */
        .from(`${COMP} .chip`,
          { autoAlpha: 0, x: -34, scale: 0.92, transformOrigin: "left center",
            filter: "blur(12px)", duration: 0.78, ease: "back.out(1.4)" }, 0.20)

      /* sparkline draws on left to right */
        .to({ val: 120 }, {
          val: 0, duration: 0.80, ease: "power2.out",
          onUpdate: function() {
            pathEl.style.strokeDashoffset = this.targets()[0].val;
          }
        }, 0.64)

      /* tip node pops in when line nearly done */
        .to(nodeEl, { autoAlpha: 1, scale: 1.4, transformOrigin: "50% 50%",
          duration: 0.22, ease: "back.out(2.5)" }, 1.36)
        .to(nodeEl, { scale: 1.0, duration: 0.20, ease: "power2.out" }, 1.58)

      /* term glides in */
        .from(`${COMP} .term`,
          { autoAlpha: 0, x: -18, filter: "blur(8px)",
            duration: 0.62, ease: "power4.out" }, 0.72)

      /* detail row */
        .from(`${COMP} .detail-row`,
          { autoAlpha: 0, y: 12, filter: "blur(6px)",
            duration: 0.58, ease: "power3.out" }, 1.00)

      /* breathing glow on node — finite */
        .to(nodeEl, {
          boxShadow: "0 0 22px rgba(55,189,248,0.90), 0 0 44px rgba(55,189,248,0.50)",
          duration: 1.05, ease: "sine.inOut", repeat: 3, yoyo: true }, 1.80)

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

      window.__timelines["t2-lb-spark"] = tl;
    </script>
  </body>
</html>