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.1 KB
Raw Blame
<!doctype html>
<!--
  KALLAWAY · tier2 · label · KEYCAP
  A glass keyboard-key button renders the `term` as if embossed on a 3D key.
  `detail` appears as a smaller label line beneath the key. Anchored right side.
  Transparent overlay.
  Slots: term (~10 chars — key label / shortcut / keyword),
         detail (~44 chars — contextual description).
-->
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../tokens.css" />
    <style>
      html, body { margin: 0; background: transparent; }

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

      /* Localized glow — anchored right, centered on key */
      #t2-lb-cap .local-glow {
        position: absolute; right: 60px; top: 390px;
        width: 480px; height: 340px; border-radius: 50%;
        background: radial-gradient(ellipse at 50% 50%,
          rgba(var(--accent-rgb), 0.24) 0%,
          rgba(var(--accent-rgb), 0.07) 55%,
          transparent 78%);
        filter: blur(38px);
        pointer-events: none;
      }

      /* Key container — wraps key + detail label, anchored right */
      #t2-lb-cap .keycap-group {
        position: absolute; right: 80px; top: 420px;
        display: flex; flex-direction: column; align-items: center; gap: 22px;
      }

      /* ===== The key itself ===== */
      #t2-lb-cap .key {
        position: relative;
        min-width: 220px;
        /* 3D key illusion: outer shell is the "base" */
        background: linear-gradient(175deg,
          rgba(28, 38, 56, 0.92) 0%,
          rgba(14, 20, 32, 0.97) 100%);
        border: 1.5px solid rgba(var(--accent-rgb), 0.45);
        border-bottom: 4px solid rgba(var(--accent-rgb), 0.60);
        border-radius: 18px;
        /* outer bevel shadow mimics depth */
        box-shadow:
          0 6px 0 rgba(0, 0, 0, 0.65),          /* depth shelf */
          0 0 30px rgba(var(--accent-rgb), 0.35), /* glow aura */
          0 0 8px  rgba(var(--accent-rgb), 0.55), /* edge rim */
          inset 0 1px 0 rgba(255,255,255,0.18),   /* top inner highlight */
          inset 0 -2px 0 rgba(0,0,0,0.40);        /* inner bottom shadow */
        padding: 22px 36px 20px;
        display: flex; align-items: center; justify-content: center;
        backdrop-filter: blur(16px) saturate(120%);
        -webkit-backdrop-filter: blur(16px) saturate(120%);
      }

      /* Top neon rim line across the key face */
      #t2-lb-cap .key::before {
        content: "";
        position: absolute; left: 24px; right: 24px; top: 0; height: 1.5px;
        background: linear-gradient(90deg,
          transparent 0%, rgba(var(--accent-rgb), 0.85) 50%, transparent 100%);
        box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.55);
        border-radius: 0 0 2px 2px;
      }

      /* Small corner indicator dot (top-right of key face — interface detail) */
      #t2-lb-cap .key::after {
        content: "";
        position: absolute; right: 14px; top: 12px;
        width: 6px; height: 6px; border-radius: 50%;
        background: rgba(var(--accent-rgb), 0.70);
        box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.80);
      }

      /* Key text — gradient glow, Plus Jakarta heavy */
      #t2-lb-cap .key-text {
        font-family: var(--font-display); font-weight: var(--wt-black);
        font-size: 46px; letter-spacing: var(--track-tight);
        line-height: 1.0;
        background: linear-gradient(115deg, #FFFFFF 0%, #FFFFFF 45%, var(--accent) 100%);
        -webkit-background-clip: text; background-clip: text;
        -webkit-text-fill-color: transparent; color: transparent;
        filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), 0.65))
                drop-shadow(0 0 4px rgba(255,255,255,0.30));
        user-select: none;
        text-align: center;
      }

      /* Detail label beneath the key */
      #t2-lb-cap .detail-wrap {
        display: flex; flex-direction: column; align-items: center; gap: 8px;
        width: 320px;
      }

      #t2-lb-cap .detail-rule {
        height: 1px; width: 60%;
        background: linear-gradient(90deg,
          transparent 0%, rgba(var(--accent-rgb), 0.50) 50%, transparent 100%);
        transform-origin: center;
      }

      #t2-lb-cap .detail {
        font-family: var(--font-body); font-weight: var(--wt-med);
        font-size: 22px; letter-spacing: 0.02em; line-height: 1.45;
        color: var(--text-dim); text-align: center;
      }
    </style>
  </head>
  <body>
    <div id="t2-lb-cap"
         data-composition-id="t2-lb-cap"
         data-start="0" data-width="1920" data-height="1080">

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

      <div class="keycap-group">
        <div class="key">
          <span class="key-text" data-slot="term">Cmd + K</span>
        </div>

        <div class="detail-wrap">
          <div class="detail-rule"></div>
          <div class="detail" data-slot="detail">opens the command palette anywhere in the app</div>
        </div>
      </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <script>
      window.__timelines = window.__timelines || {};

      const COMP = "#t2-lb-cap";
      const tl   = gsap.timeline({ paused: true });

      /* 1 — glow blooms in */
      tl.from(`${COMP} .local-glow`, {
            autoAlpha: 0, scale: 0.50, transformOrigin: "50% 50%",
            duration: 1.1, ease: "expo.out" }, 0)

        /* 2 — key drops in from above + spring settle (3D press feel) */
        .from(`${COMP} .key`, {
            autoAlpha: 0, y: -40, scale: 0.78, filter: "blur(16px)",
            transformOrigin: "50% 0%",
            duration: 0.80, ease: "back.out(1.6)" }, 0.20)

        /* 3 — key-text blur-in (focus pull) */
        .from(`${COMP} .key-text`, {
            autoAlpha: 0, filter: "blur(18px)",
            duration: 0.55, ease: "power4.out" }, 0.62)

        /* 4 — detail rule draws from center */
        .from(`${COMP} .detail-rule`, {
            scaleX: 0, transformOrigin: "50% 50%",
            duration: 0.38, ease: "power3.out" }, 0.88)

        /* 5 — detail label fades up */
        .from(`${COMP} .detail`, {
            autoAlpha: 0, y: 10, filter: "blur(6px)",
            duration: 0.50, ease: "power3.out" }, 1.02)

        /* 6 — key press micro-animation: slight y translate simulates a tap */
        .to(`${COMP} .key`, {
            y: 4,
            duration: 0.10, ease: "power2.in" }, 1.60)
        .to(`${COMP} .key`, {
            y: 0,
            duration: 0.22, ease: "back.out(2.2)" }, 1.70)

        /* 7 — edge-glow pulse on key, finite */
        .to(`${COMP} .key`, {
            boxShadow: [
              "0 6px 0 rgba(0,0,0,0.65)",
              "0 0 50px rgba(55,189,248,0.60)",
              "0 0 14px rgba(55,189,248,0.80)",
              "inset 0 1px 0 rgba(255,255,255,0.18)",
              "inset 0 -2px 0 rgba(0,0,0,0.40)"
            ].join(", "),
            duration: 0.90, ease: "sine.inOut", repeat: 3, yoyo: true }, 2.0)

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

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