Skip to content

Write HTML. Render video. Built for agents.

6.2 KB
Raw Blame
{"html":"<!doctype html>\n<html lang=\"en\">\n  <head><base href=\"/public/catalog/items/yt-lower-third/\">\n    <meta charset=\"UTF-8\" />\n    <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\" />\n    <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin />\n    <link\n      href=\"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;700&display=block\"\n      rel=\"stylesheet\"\n    />\n    <script src=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js\"></script>\n    <style>\n      * {\n        margin: 0;\n        padding: 0;\n      }\n      html,\n      body {\n        background: #1a1a2e;\n        overflow: hidden;\n      }\n      body {\n        width: 1920px;\n        height: 1080px;\n        font-family: \"DM Sans\", sans-serif;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .lower-third {\n        position: absolute;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n        display: flex;\n        align-items: center;\n        gap: 28px;\n        background: #ffffff;\n        border-radius: 60px;\n        padding: 20px 32px 20px 20px;\n        box-shadow: 0 6px 32px rgba(0, 0, 0, 0.14);\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .avatar {\n        width: 96px;\n        height: 96px;\n        border-radius: 50%;\n        object-fit: cover;\n        flex-shrink: 0;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .channel-info {\n        display: flex;\n        flex-direction: column;\n        gap: 2px;\n        margin-right: 20px;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .channel-name {\n        font-size: 34px;\n        font-weight: 700;\n        color: #0f0f0f;\n        line-height: 1.3;\n        letter-spacing: -0.01em;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .subscriber-count {\n        font-size: 22px;\n        font-weight: 400;\n        color: #606060;\n        line-height: 1.3;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .subscribe-btn {\n        position: relative;\n        width: 220px;\n        height: 68px;\n        border-radius: 34px;\n        background: #0f0f0f;\n        flex-shrink: 0;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        overflow: hidden;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .btn-text {\n        position: absolute;\n        font-family: \"DM Sans\", sans-serif;\n        font-size: 24px;\n        font-weight: 700;\n        color: #ffffff;\n        letter-spacing: 0.02em;\n        white-space: nowrap;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .btn-text-subscribe {\n        opacity: 1;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .btn-text-subscribed {\n        opacity: 0;\n        display: flex;\n        align-items: center;\n        gap: 8px;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .check-icon {\n        display: inline-block;\n        width: 24px;\n        height: 24px;\n      }\n\n      [data-composition-id=\"yt-lower-third\"] .check-icon svg {\n        width: 24px;\n        height: 24px;\n        display: block;\n      }\n    </style>\n  </head>\n  <body>\n    <div\n      id=\"root\"\n      data-composition-id=\"yt-lower-third\"\n      data-width=\"1920\"\n      data-height=\"1080\"\n      data-start=\"0\"\n      data-duration=\"4.5\"\n    >\n      <div\n        id=\"card\"\n        class=\"clip lower-third\"\n        data-start=\"0\"\n        data-duration=\"4.5\"\n        data-track-index=\"0\"\n      >\n        <img class=\"avatar\" src=\"/public/catalog/assets/a300f59c31d2ea16.jpg\" alt=\"HeyGen\" crossorigin=\"anonymous\" />\n        <div class=\"channel-info\">\n          <div class=\"channel-name\">HeyGen</div>\n          <div class=\"subscriber-count\">82.2K subscribers</div>\n        </div>\n        <div id=\"subscribe-btn\" class=\"subscribe-btn\">\n          <span id=\"btn-subscribe\" class=\"btn-text btn-text-subscribe\">Subscribe</span>\n          <span id=\"btn-subscribed\" class=\"btn-text btn-text-subscribed\">\n            <span class=\"check-icon\"\n              ><svg\n                viewBox=\"0 0 24 24\"\n                fill=\"none\"\n                stroke=\"#fff\"\n                stroke-width=\"2.5\"\n                stroke-linecap=\"round\"\n                stroke-linejoin=\"round\"\n              >\n                <polyline points=\"20 6 9 17 4 12\"></polyline></svg\n            ></span>\n            Subscribed\n          </span>\n        </div>\n      </div>\n    </div>\n\n    <script>\n      window.__timelines = window.__timelines || {};\n\n      var tl = gsap.timeline({ paused: true });\n\n      var card = document.getElementById(\"card\");\n      var btn = document.getElementById(\"subscribe-btn\");\n      var textSub = document.getElementById(\"btn-subscribe\");\n      var textSubd = document.getElementById(\"btn-subscribed\");\n\n      // Slide in from bottom\n      gsap.set(card, { y: 300, opacity: 0 });\n\n      tl.to(\n        card,\n        {\n          y: 0,\n          opacity: 1,\n          duration: 0.5,\n          ease: \"power3.out\",\n        },\n        0.1,\n      );\n\n      // Hold, then button press-in\n      tl.to(\n        btn,\n        {\n          scale: 0.92,\n          duration: 0.15,\n          ease: \"power2.out\",\n        },\n        1.0,\n      );\n\n      // Button release with spring bounce + text swap\n      tl.to(\n        btn,\n        {\n          scale: 1,\n          duration: 0.4,\n          ease: \"elastic.out(1, 0.4)\",\n        },\n        1.15,\n      );\n\n      // Fade out \"Subscribe\", fade in \"Subscribed\"\n      tl.to(\n        textSub,\n        {\n          opacity: 0,\n          duration: 0.08,\n          ease: \"none\",\n        },\n        1.15,\n      );\n\n      tl.to(\n        textSubd,\n        {\n          opacity: 1,\n          duration: 0.08,\n          ease: \"none\",\n        },\n        1.18,\n      );\n\n      // Slide out to bottom (inverse of entrance)\n      tl.to(\n        card,\n        {\n          y: 300,\n          opacity: 0,\n          duration: 0.25,\n          ease: \"power3.in\",\n        },\n        3.8,\n      );\n\n      window.__timelines[\"yt-lower-third\"] = tl;\n    </script>\n  </body>\n</html>\n"}