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.

6.3 KB
Raw Blame
<template id="ambient-bg-template">
  <div
    data-composition-id="ambient-bg"
    data-start="0"
    data-duration="30"
    data-width="1920"
    data-height="1080"
  >
    <link
      rel="stylesheet"
      href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&display=block"
    />

    <div class="amb-root">
      <!-- Base navy pedestal -->
      <div class="amb-base"></div>

      <!-- Radial cyan glow bed (center-bottom, subtle) -->
      <div class="amb-glow"></div>

      <!-- Subtle drift grid -->
      <svg class="amb-grid" viewBox="0 0 1920 1080" preserveAspectRatio="none" aria-hidden="true">
        <defs>
          <pattern id="grid-p" width="60" height="60" patternUnits="userSpaceOnUse">
            <path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.035)" stroke-width="1" />
          </pattern>
        </defs>
        <rect width="100%" height="100%" fill="url(#grid-p)" />
      </svg>

      <!-- Deterministic particle layer -->
      <svg class="amb-particles" viewBox="0 0 1920 1080" aria-hidden="true">
        <g fill="#37bdf8" fill-opacity="0.45">
          <circle cx="120" cy="220" r="2" />
          <circle cx="280" cy="840" r="1.5" />
          <circle cx="460" cy="120" r="2" />
          <circle cx="620" cy="980" r="1" />
          <circle cx="780" cy="340" r="1.5" />
          <circle cx="920" cy="880" r="2" />
          <circle cx="1080" cy="180" r="1" />
          <circle cx="1240" cy="720" r="2" />
          <circle cx="1380" cy="280" r="1.5" />
          <circle cx="1540" cy="840" r="1" />
          <circle cx="1700" cy="200" r="2" />
          <circle cx="1820" cy="600" r="1.5" />
          <circle cx="180" cy="520" r="1" />
          <circle cx="340" cy="680" r="1.5" />
          <circle cx="520" cy="440" r="2" />
          <circle cx="740" cy="620" r="1" />
          <circle cx="880" cy="500" r="1.5" />
          <circle cx="1160" cy="420" r="2" />
          <circle cx="1340" cy="560" r="1" />
          <circle cx="1460" cy="680" r="1.5" />
        </g>
      </svg>

      <!-- Corner telemetry tickers -->
      <div class="amb-tick amb-tick-tl">
        <span class="dot"></span>SYS.INIT · READY
      </div>
      <div class="amb-tick amb-tick-tr">
        UPTIME · 1,100/day<span class="dot"></span>
      </div>
      <div class="amb-tick amb-tick-bl">
        v0.1.0-release
      </div>
      <div class="amb-tick amb-tick-br">
        MEMBERS · 332,600
      </div>

      <!-- Vignette -->
      <div class="amb-vignette"></div>
    </div>

    <style>
      [data-composition-id="ambient-bg"] {
        position: absolute;
        inset: 0;
        background: #07121c;
        overflow: hidden;
      }
      [data-composition-id="ambient-bg"] .amb-root {
        position: absolute;
        inset: 0;
      }
      [data-composition-id="ambient-bg"] .amb-base {
        position: absolute;
        inset: 0;
        background:
          radial-gradient(ellipse at 50% 85%, rgba(55, 189, 248, 0.10) 0%, transparent 55%),
          radial-gradient(ellipse at 50% 20%, rgba(3, 7, 255, 0.05) 0%, transparent 60%),
          #07121c;
      }
      [data-composition-id="ambient-bg"] .amb-glow {
        position: absolute;
        left: 50%;
        top: 55%;
        transform: translate(-50%, -50%);
        width: 1200px;
        height: 800px;
        background: radial-gradient(ellipse at center, rgba(55, 189, 248, 0.18) 0%, transparent 65%);
        filter: blur(40px);
        pointer-events: none;
      }
      [data-composition-id="ambient-bg"] .amb-grid {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0.6;
      }
      [data-composition-id="ambient-bg"] .amb-particles {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
      }
      [data-composition-id="ambient-bg"] .amb-tick {
        position: absolute;
        font-family: "Roboto Mono", ui-monospace, monospace;
        font-size: 18px;
        font-weight: 500;
        color: #96a2b6;
        letter-spacing: 0.12em;
        display: flex;
        align-items: center;
        gap: 10px;
      }
      [data-composition-id="ambient-bg"] .amb-tick .dot {
        display: inline-block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #37bdf8;
        box-shadow: 0 0 10px rgba(55, 189, 248, 0.8);
      }
      [data-composition-id="ambient-bg"] .amb-tick-tl {
        top: 52px;
        left: 60px;
      }
      [data-composition-id="ambient-bg"] .amb-tick-tr {
        top: 52px;
        right: 60px;
      }
      [data-composition-id="ambient-bg"] .amb-tick-bl {
        bottom: 52px;
        left: 60px;
      }
      [data-composition-id="ambient-bg"] .amb-tick-br {
        bottom: 52px;
        right: 60px;
      }
      [data-composition-id="ambient-bg"] .amb-vignette {
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(ellipse at center, transparent 55%, rgba(7, 18, 28, 0.85) 100%);
      }
    </style>

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <script>
      (function () {
        window.__timelines = window.__timelines || {};
        const tl = gsap.timeline({ paused: true, defaults: { ease: "power2.out" } });
        const root = '[data-composition-id="ambient-bg"]';

        // Tickers flicker in
        tl.from(root + " .amb-tick", { autoAlpha: 0, x: -8, duration: 0.35, stagger: 0.08 }, 0.2);

        // Particles subtle float — opacity breathing (finite repeat, deterministic stagger)
        tl.fromTo(root + " .amb-particles circle",
          { opacity: 0.15 },
          { opacity: 0.6, duration: 3, ease: "sine.inOut", repeat: 9, yoyo: true, stagger: { each: 0.15, from: "start" } },
          0.5
        );

        // Glow bed: slow pulse (3 finite cycles over 30s)
        tl.fromTo(root + " .amb-glow",
          { scale: 1, opacity: 0.8 },
          { scale: 1.08, opacity: 1, duration: 5, ease: "sine.inOut", repeat: 5, yoyo: true },
          0
        );

        // Tick dot pulse
        tl.to(root + " .amb-tick .dot",
          { opacity: 0.35, duration: 0.8, ease: "sine.inOut", repeat: 35, yoyo: true },
          1.2
        );

        // Pad timeline to full 30s
        tl.to({}, { duration: 30 }, 0);

        window.__timelines["ambient-bg"] = tl;
      })();
    </script>
  </div>
</template>