Skip to content

Write HTML. Render video. Built for agents.

6.6 KB
Raw Blame
{"html":"<!doctype html>\n<html lang=\"en\">\n  <head><base href=\"/public/catalog/items/tiktok-follow/\">\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: 1080px;\n        height: 1920px;\n        font-family: \"DM Sans\", sans-serif;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .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: 30px;\n        background: #1a1a1a;\n        border-radius: 75px;\n        padding: 25px 40px 25px 25px;\n        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .avatar {\n        width: 120px;\n        height: 120px;\n        border-radius: 50%;\n        object-fit: cover;\n        flex-shrink: 0;\n        border: 3px solid #333;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .profile-info {\n        display: flex;\n        flex-direction: column;\n        gap: 2px;\n        margin-right: 20px;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .display-name {\n        font-size: 42px;\n        font-weight: 700;\n        color: #ffffff;\n        line-height: 1.3;\n        letter-spacing: -0.01em;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .handle {\n        font-size: 28px;\n        font-weight: 400;\n        color: #a0a0a0;\n        line-height: 1.3;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .follower-count {\n        font-size: 25px;\n        font-weight: 400;\n        color: #737373;\n        line-height: 1.3;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .follow-btn {\n        position: relative;\n        width: 250px;\n        height: 80px;\n        border-radius: 40px;\n        background: #fe2c55;\n        flex-shrink: 0;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        overflow: hidden;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .btn-text {\n        position: absolute;\n        font-family: \"DM Sans\", sans-serif;\n        font-size: 30px;\n        font-weight: 700;\n        color: #ffffff;\n        letter-spacing: 0.02em;\n        white-space: nowrap;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .btn-text-follow {\n        opacity: 1;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .btn-text-following {\n        opacity: 0;\n        display: flex;\n        align-items: center;\n        gap: 8px;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .check-icon {\n        display: inline-block;\n        width: 22px;\n        height: 22px;\n      }\n\n      [data-composition-id=\"tiktok-follow\"] .check-icon svg {\n        width: 22px;\n        height: 22px;\n        display: block;\n      }\n    </style>\n  </head>\n  <body>\n    <div\n      id=\"root\"\n      data-composition-id=\"tiktok-follow\"\n      data-width=\"1080\"\n      data-height=\"1920\"\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=\"profile-info\">\n          <div class=\"display-name\">HeyGen</div>\n          <div class=\"handle\">@heygen.com</div>\n          <div class=\"follower-count\">1,999 followers</div>\n        </div>\n        <div id=\"follow-btn\" class=\"follow-btn\">\n          <span id=\"btn-follow\" class=\"btn-text btn-text-follow\">Follow</span>\n          <span id=\"btn-following\" class=\"btn-text btn-text-following\">\n            <span>Following</span>\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          </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(\"follow-btn\");\n      var textFollow = document.getElementById(\"btn-follow\");\n      var textFollowing = document.getElementById(\"btn-following\");\n\n      // Start off-screen\n      gsap.set(card, { y: 300, opacity: 0 });\n\n      // Slide in from bottom\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\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      // Button background: rose-red → dark gray\n      tl.to(\n        btn,\n        {\n          backgroundColor: \"#2f2f2f\",\n          duration: 0.12,\n          ease: \"none\",\n        },\n        1.15,\n      );\n\n      // Fade out \"Follow\", fade in \"Following\"\n      tl.to(\n        textFollow,\n        {\n          opacity: 0,\n          duration: 0.08,\n          ease: \"none\",\n        },\n        1.15,\n      );\n\n      tl.to(\n        textFollowing,\n        {\n          opacity: 1,\n          duration: 0.08,\n          ease: \"none\",\n        },\n        1.18,\n      );\n\n      // Slide out to bottom\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[\"tiktok-follow\"] = tl;\n    </script>\n  </body>\n</html>\n"}