Skip to content

Write HTML. Render video. Built for agents.

12.5 KB
Raw Blame
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=1920, height=1080" />
    <title>Marker Checklist Card</title>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
    <style>
      html,
      body {
        margin: 0;
        width: 1920px;
        height: 1080px;
        overflow: hidden;
      }
      body {
        background: #101413;
        font-family:
          ui-sans-serif,
          -apple-system,
          "Segoe UI",
          sans-serif;
      }
      .hf-ui-demo-canvas {
        position: relative;
        width: 1920px;
        height: 1080px;
        overflow: hidden;
        background:
          radial-gradient(
            ellipse 70% 90% at 26% 30%,
            rgba(60, 230, 172, 0.07) 0%,
            rgba(60, 230, 172, 0) 60%
          ),
          linear-gradient(160deg, #1a201d 0%, #121614 55%, #0e1210 100%);
      }
      .spec-phone {
        position: absolute;
        left: 430px;
        top: 158px;
        width: 438px;
        height: 764px;
        border-radius: 64px;
        background: #3a3d42;
        box-shadow:
          inset 0 2px 3px rgba(255, 255, 255, 0.22),
          0 34px 80px rgba(0, 0, 0, 0.55);
      }
      .spec-screen {
        position: absolute;
        left: 14px;
        top: 14px;
        width: 410px;
        height: 736px;
        border-radius: 52px;
        overflow: hidden;
        background: #000;
        container-type: size;
      }
      .spec-paper {
        position: absolute;
        left: 330px;
        top: 90px;
        width: 640px;
        height: 900px;
        container-type: size;
        background: #ece1d5;
        background-image: radial-gradient(
          circle,
          rgba(178, 150, 138, 0.18) 1.4px,
          transparent 1.8px
        );
        background-size: 26px 26px;
        border-radius: 10px;
        box-shadow: 0 34px 80px rgba(0, 0, 0, 0.5);
      }
      .spec-cap {
        position: absolute;
        left: 1010px;
        top: 300px;
        width: 730px;
      }
      .spec-cap .name {
        font:
          600 46px/1.1 ui-monospace,
          "SF Mono",
          Menlo,
          monospace;
        color: #3ce6ac;
        letter-spacing: -0.5px;
      }
      .spec-cap .rule {
        width: 84px;
        height: 3px;
        background: #3ce6ac;
        margin: 26px 0;
      }
      .spec-cap .desc {
        font:
          400 21px/1.6 ui-sans-serif,
          -apple-system,
          sans-serif;
        color: #b9c2bd;
        max-width: 620px;
      }
      .spec-cap .stats {
        margin-top: 30px;
        display: grid;
        gap: 12px;
      }
      .spec-cap .stat {
        font:
          500 16px/1.5 ui-monospace,
          "SF Mono",
          Menlo,
          monospace;
        color: #78827d;
      }
      .spec-cap .stat b {
        color: #e8ece9;
        font-weight: 600;
      }
      *,
      *::before,
      *::after {
        box-sizing: border-box;
      }
      @font-face {
        font-family: "Permanent Marker";
        src: url("assets/fonts/permanent-marker-400.woff2") format("woff2");
      }
      @font-face {
        font-family: "Courier Prime";
        font-weight: 700;
        src: url("assets/fonts/courier-prime-700.woff2") format("woff2");
      }
      #root {
        position: absolute;
        inset: 0;
        overflow: hidden;
        container-type: size;
        isolation: isolate;
        background: var(--bg, transparent);
        pointer-events: none;
      }
      .mcc-card {
        position: absolute;
        left: 50%;
        top: 50%;
        width: min(74cqw, 52cqh);
        aspect-ratio: 0.585;
        transform: translate(-50%, -50%) rotate(-3.03deg);
        background: #fcfcfc;
        box-shadow: 0 1.2cqmin 3cqmin rgba(90, 60, 40, 0.16);
        container-type: size;
        will-change: opacity, transform;
      }
      .mcc-mk {
        font-family: "Permanent Marker", cursive;
        color: #602640;
        position: absolute;
        white-space: nowrap;
        will-change: opacity;
      }
      #mcc-top {
        left: 14cqw;
        top: 4cqh;
        font-size: 13cqw;
        letter-spacing: 0.02em;
      }
      #mcc-ul {
        position: absolute;
        left: 40cqw;
        top: 12.6cqh;
        width: 49cqw;
        height: 0.55cqh;
        background: #602640;
        border-radius: 1cqmin;
        will-change: opacity;
      }
      #mcc-mid {
        left: 43cqw;
        top: 12.2cqh;
        font-size: 12cqw;
      }
      #mcc-line2 {
        left: 15cqw;
        top: 21.5cqh;
        font-size: 13cqw;
      }
      #mcc-line2 .c {
        padding-left: 4.5cqw;
      }
      #mcc-line2 .r {
        padding-left: 6cqw;
      }
      #mcc-ellipse {
        position: absolute;
        left: 10cqw;
        top: 20.2cqh;
        width: 34cqw;
        height: 10.4cqh;
        will-change: opacity;
      }
      #mcc-ellipse ellipse {
        fill: none;
        stroke: #602640;
        stroke-width: 1.8cqmin;
      }
      .mcc-row {
        position: absolute;
        left: 9cqw;
        width: 82cqw;
        will-change: opacity;
      }
      .mcc-label {
        font-family: "Courier Prime", monospace;
        font-weight: 700;
        font-size: 5.2cqw;
        color: #602640;
        position: absolute;
        left: 0;
        top: 1.4cqh;
      }
      .mcc-value {
        font-family: "Permanent Marker", cursive;
        font-size: 6cqw;
        color: #602640;
        position: absolute;
        left: 38cqw;
        top: 0;
      }
      .mcc-check {
        position: absolute;
        right: 2cqw;
        top: 0.4cqh;
        width: 6cqw;
        height: 5.5cqw;
      }
      .mcc-check path {
        fill: none;
        stroke: #602640;
        stroke-width: 1.6cqmin;
        stroke-linecap: round;
      }
      .mcc-rule {
        position: absolute;
        left: 0;
        top: 5.4cqh;
        width: 82cqw;
        height: 0.18cqh;
        background: #602640;
        opacity: 0.92;
      }
    </style>
  </head>
  <body>
    <div
      class="hf-ui-demo-canvas"
      data-composition-id="marker-checklist-card-demo"
      data-start="0"
      data-width="1920"
      data-height="1080"
      data-duration="4.5"
    >
      <section
        class="clip"
        data-start="0"
        data-duration="4.5"
        data-track-index="1"
        style="position: absolute; inset: 0"
      >
        <div class="spec-paper">
          <div id="root" style="position: relative; width: 100%; height: 100%; overflow: hidden">
            <div class="mcc-card" id="mcc-card">
              <div
                class="mcc-mk"
                id="mcc-top"
                data-layout-allow-overflow
                data-layout-allow-overlap
                data-layout-allow-occlusion
              >
                THE POWER
              </div>
              <div id="mcc-ul"></div>
              <div
                class="mcc-mk"
                id="mcc-mid"
                data-layout-allow-overflow
                data-layout-allow-overlap
                data-layout-allow-occlusion
              >
                OF
              </div>
              <svg id="mcc-ellipse" viewBox="0 0 100 32" preserveAspectRatio="none">
                <ellipse cx="50" cy="16" rx="47" ry="13.5" pathLength="100" />
              </svg>
              <div
                class="mcc-mk"
                id="mcc-line2"
                data-layout-allow-overflow
                data-layout-allow-overlap
                data-layout-allow-occlusion
              >
                <span class="c" id="mcc-circled">ONE</span><span class="r" id="mcc-rest">FILE</span>
              </div>
              <div class="mcc-row" style="top: 62cqh" id="mcc-row1">
                <div class="mcc-label">WRITE</div>
                <div class="mcc-value">HTML</div>
                <svg class="mcc-check" viewBox="0 0 86 80">
                  <path d="M6 46 L30 72 L80 8" pathLength="100" />
                </svg>
                <div class="mcc-rule"></div>
              </div>
              <div class="mcc-row" style="top: 72cqh" id="mcc-row2">
                <div class="mcc-label">RENDER</div>
                <div class="mcc-value">IN 4K</div>
                <svg class="mcc-check" viewBox="0 0 86 80">
                  <path d="M6 46 L30 72 L80 8" pathLength="100" />
                </svg>
                <div class="mcc-rule"></div>
              </div>
              <div class="mcc-row" style="top: 82cqh" id="mcc-row3">
                <div class="mcc-label">SHIP</div>
                <div class="mcc-value">TODAY</div>
                <svg class="mcc-check" viewBox="0 0 86 80">
                  <path d="M6 46 L30 72 L80 8" pathLength="100" />
                </svg>
                <div class="mcc-rule"></div>
              </div>
            </div>
          </div>
        </div>
        <div class="spec-cap">
          <div class="name">marker-checklist-card</div>
          <div class="rule"></div>
          <div class="desc">
            A hand-lettered paper card: marker headline, a drawn ellipse around one word, and three
            checklist rows whose checks draw themselves on.
          </div>
          <div class="stats">
            <div class="stat"><b>0.55s</b> — the ellipse draws around the word</div>
            <div class="stat"><b>3 rows</b> — label / value / self-drawing check</div>
            <div class="stat">
              <b>Open faces</b> — Permanent Marker (Apache-2.0) + Courier Prime (OFL 1.1)
            </div>
          </div>
        </div>
      </section>
    </div>
    <script>
      (function () {
        "use strict";
        var compositionId = "marker-checklist-card-demo";
        var vars =
          window.__hyperframes && window.__hyperframes.getVariables
            ? window.__hyperframes.getVariables()
            : {};
        function text(v, fb, mx) {
          if (typeof v !== "string") return fb;
          var t = v.trim();
          if (!t) return fb;
          return t.length > mx ? t.slice(0, mx) : t;
        }
        document.getElementById("mcc-top").textContent = text(vars.top, "THE POWER", 12);
        document.getElementById("mcc-mid").textContent = text(vars.mid, "OF", 6);
        document.getElementById("mcc-circled").textContent = text(vars.circled, "ONE", 8);
        document.getElementById("mcc-rest").textContent = text(vars.rest, "FILE", 10);
        [
          ["1", "WRITE", "HTML"],
          ["2", "RENDER", "IN 4K"],
          ["3", "SHIP", "TODAY"],
        ].forEach(function (row) {
          var el = document.getElementById("mcc-row" + row[0]);
          el.querySelector(".mcc-label").textContent = text(vars["l" + row[0]], row[1], 9);
          el.querySelector(".mcc-value").textContent = text(vars["v" + row[0]], row[2], 9);
        });

        var tl = gsap.timeline({ paused: true });
        tl.fromTo(
          "#mcc-card",
          { autoAlpha: 0, y: "2cqh" },
          { autoAlpha: 1, y: 0, duration: 0.4, ease: "power2.out" },
          0.2,
        );
        tl.fromTo(
          "#mcc-top",
          { autoAlpha: 0 },
          { autoAlpha: 1, duration: 0.25, ease: "none" },
          0.55,
        );
        tl.fromTo(
          ["#mcc-ul", "#mcc-mid"],
          { autoAlpha: 0 },
          { autoAlpha: 1, duration: 0.25, ease: "none" },
          0.8,
        );
        tl.fromTo(
          "#mcc-line2",
          { autoAlpha: 0 },
          { autoAlpha: 1, duration: 0.25, ease: "none" },
          1.05,
        );
        /* the marker draws the ellipse around the circled word */
        tl.set("#mcc-ellipse", { autoAlpha: 1 }, 1.3);
        tl.fromTo(
          "#mcc-ellipse ellipse",
          { strokeDasharray: 100, strokeDashoffset: 100 },
          { strokeDashoffset: 0, duration: 0.55, ease: "power1.inOut" },
          1.3,
        );
        gsap.set("#mcc-ellipse", { autoAlpha: 0 });
        /* rows land, each check draws itself on */
        [1, 2, 3].forEach(function (n, i) {
          var at = 1.9 + i * 0.55;
          tl.fromTo(
            "#mcc-row" + n,
            { autoAlpha: 0 },
            { autoAlpha: 1, duration: 0.25, ease: "none" },
            at,
          );
          tl.fromTo(
            "#mcc-row" + n + " .mcc-check path",
            { strokeDasharray: 100, strokeDashoffset: 100 },
            { strokeDashoffset: 0, duration: 0.35, ease: "power1.in" },
            at + 0.25,
          );
        });
        tl.set({}, {}, 4.5);
        tl.seek(0);
        window.__timelines = window.__timelines || {};
        window.__timelines[compositionId] = tl;
      })();
    </script>
  </body>
</html>