Skip to content

Write HTML. Render video. Built for agents.

13.7 KB
Raw Blame
{"html":"<!doctype html>\n<html lang=\"en\">\n  <head>\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=Inter: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        box-sizing: border-box;\n      }\n      html,\n      body {\n        background: #1a1a2e;\n        overflow: hidden;\n      }\n      body {\n        width: 1920px;\n        height: 1080px;\n        font-family: \"Inter\", sans-serif;\n      }\n\n      [data-composition-id=\"x-post\"] .x-card {\n        position: absolute;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n        width: 880px;\n        background: #15202b;\n        border-radius: 20px;\n        padding: 36px 36px 28px;\n        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);\n        border: 1px solid #38444d;\n        overflow: hidden;\n      }\n\n      /* Bottom glow */\n      [data-composition-id=\"x-post\"] .x-card::after {\n        content: \"\";\n        position: absolute;\n        bottom: 0;\n        left: 0;\n        right: 0;\n        height: 80px;\n        background: linear-gradient(to top, rgba(29, 155, 240, 0.08), transparent);\n        pointer-events: none;\n      }\n\n      /* Header row */\n      [data-composition-id=\"x-post\"] .post-header {\n        display: flex;\n        align-items: flex-start;\n        gap: 14px;\n        margin-bottom: 18px;\n        position: relative;\n      }\n\n      [data-composition-id=\"x-post\"] .avatar {\n        width: 52px;\n        height: 52px;\n        flex-shrink: 0;\n        border-radius: 50%;\n        overflow: hidden;\n      }\n\n      [data-composition-id=\"x-post\"] .avatar svg {\n        width: 52px;\n        height: 52px;\n        display: block;\n      }\n\n      [data-composition-id=\"x-post\"] .user-info {\n        display: flex;\n        flex-direction: column;\n        gap: 2px;\n        flex: 1;\n      }\n\n      [data-composition-id=\"x-post\"] .name-row {\n        display: flex;\n        align-items: center;\n        gap: 6px;\n      }\n\n      [data-composition-id=\"x-post\"] .display-name {\n        font-size: 26px;\n        font-weight: 700;\n        color: #e7e9ea;\n        line-height: 1.3;\n      }\n\n      [data-composition-id=\"x-post\"] .verified-badge svg {\n        width: 22px;\n        height: 22px;\n        display: block;\n      }\n\n      [data-composition-id=\"x-post\"] .handle {\n        font-size: 22px;\n        font-weight: 400;\n        color: #8b98a5;\n        line-height: 1.3;\n      }\n\n      /* X logo top-right */\n      [data-composition-id=\"x-post\"] .x-logo {\n        position: absolute;\n        top: 2px;\n        right: 0;\n        width: 32px;\n        height: 32px;\n      }\n\n      [data-composition-id=\"x-post\"] .x-logo svg {\n        width: 32px;\n        height: 32px;\n        display: block;\n      }\n\n      /* Tweet body */\n      [data-composition-id=\"x-post\"] .tweet-body {\n        font-size: 30px;\n        font-weight: 400;\n        color: #e7e9ea;\n        line-height: 1.45;\n        margin-bottom: 12px;\n        display: -webkit-box;\n        -webkit-line-clamp: 4;\n        -webkit-box-orient: vertical;\n        overflow: hidden;\n      }\n\n      [data-composition-id=\"x-post\"] .hashtag {\n        color: #1d9bf0;\n      }\n\n      /* Timestamp */\n      [data-composition-id=\"x-post\"] .timestamp {\n        font-size: 22px;\n        color: #8b98a5;\n        padding-bottom: 20px;\n        border-bottom: 1px solid #38444d;\n        margin-bottom: 16px;\n      }\n\n      /* Metrics bar — matches real X spacing */\n      [data-composition-id=\"x-post\"] .metrics-bar {\n        display: flex;\n        align-items: center;\n        padding: 0;\n        position: relative;\n        z-index: 1;\n      }\n\n      [data-composition-id=\"x-post\"] .metrics-left {\n        display: flex;\n        align-items: center;\n        flex: 1;\n        justify-content: space-between;\n        padding-right: 60px;\n      }\n\n      [data-composition-id=\"x-post\"] .metrics-right {\n        display: flex;\n        align-items: center;\n        gap: 20px;\n      }\n\n      [data-composition-id=\"x-post\"] .metric {\n        display: flex;\n        align-items: center;\n        gap: 8px;\n      }\n\n      [data-composition-id=\"x-post\"] .metric-icon {\n        width: 35px;\n        height: 35px;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n      }\n\n      [data-composition-id=\"x-post\"] .metric-icon svg {\n        width: 35px;\n        height: 35px;\n        display: block;\n      }\n\n      [data-composition-id=\"x-post\"] .metric-count {\n        font-size: 20px;\n        font-weight: 400;\n        color: #8b98a5;\n      }\n    </style>\n  </head>\n  <body>\n    <div\n      id=\"root\"\n      data-composition-id=\"x-post\"\n      data-width=\"1920\"\n      data-height=\"1080\"\n      data-start=\"0\"\n      data-duration=\"5\"\n    >\n      <div id=\"card\" class=\"clip x-card\" data-start=\"0\" data-duration=\"5\" data-track-index=\"0\">\n        <!-- Header: prompt to replace display name, handle, and avatar -->\n        <div class=\"post-header\">\n          <div class=\"avatar\">\n            <svg viewBox=\"0 0 52 52\" fill=\"none\">\n              <circle cx=\"26\" cy=\"26\" r=\"26\" fill=\"#536471\" />\n              <circle cx=\"26\" cy=\"21\" r=\"10\" fill=\"#8b98a5\" />\n              <ellipse cx=\"26\" cy=\"42\" rx=\"16\" ry=\"12\" fill=\"#8b98a5\" />\n            </svg>\n          </div>\n          <div class=\"user-info\">\n            <div class=\"name-row\">\n              <span class=\"display-name\">Hyperframes</span>\n              <span class=\"verified-badge\">\n                <svg viewBox=\"0 0 22 22\" fill=\"none\">\n                  <circle cx=\"11\" cy=\"11\" r=\"11\" fill=\"#1d9bf0\" />\n                  <path\n                    d=\"M9.5 14.25L6.25 11l1.06-1.06 2.19 2.19 4.69-4.69L15.25 8.5 9.5 14.25z\"\n                    fill=\"#fff\"\n                  />\n                </svg>\n              </span>\n            </div>\n            <span class=\"handle\">@hyperframes</span>\n          </div>\n          <div class=\"x-logo\">\n            <svg viewBox=\"0 0 24 24\" fill=\"#e7e9ea\">\n              <path\n                d=\"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\"\n              />\n            </svg>\n          </div>\n        </div>\n\n        <!-- Tweet body: prompt to replace with your content -->\n        <div class=\"tweet-body\">\n          Prompt to replace this text with your tweet. Change the display name, handle, timestamp,\n          and engagement counts to match your content. <span class=\"hashtag\">#YourHashtag</span>\n        </div>\n\n        <!-- Timestamp: prompt to replace -->\n        <div class=\"timestamp\">1:10 PM &middot; Apr 7, 2026</div>\n\n        <!-- Metrics bar -->\n        <div class=\"metrics-bar\">\n          <div class=\"metrics-left\">\n            <!-- Reply -->\n            <div class=\"metric\">\n              <div class=\"metric-icon\">\n                <svg viewBox=\"0 0 24 24\" fill=\"#8b98a5\">\n                  <path\n                    d=\"M1.751 10c0-4.42 3.584-8 8.005-8h4.366c4.49 0 8.129 3.64 8.129 8.13 0 2.96-1.607 5.68-4.196 7.11l-8.054 4.46v-3.69h-.067c-4.49.1-8.183-3.51-8.183-8.01zm8.005-6c-3.317 0-6.005 2.69-6.005 6 0 3.37 2.77 6.08 6.138 6.01l.351-.01h1.761v2.3l5.087-2.81c1.951-1.08 3.163-3.13 3.163-5.36 0-3.39-2.744-6.13-6.129-6.13H9.756z\"\n                  />\n                </svg>\n              </div>\n              <span class=\"metric-count\">34</span>\n            </div>\n\n            <!-- Repost -->\n            <div class=\"metric\">\n              <div class=\"metric-icon\">\n                <svg viewBox=\"0 0 24 24\" fill=\"#8b98a5\">\n                  <path\n                    d=\"M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z\"\n                  />\n                </svg>\n              </div>\n              <span class=\"metric-count\">2.3K</span>\n            </div>\n\n            <!-- Like -->\n            <div id=\"like-btn\" class=\"metric\">\n              <div class=\"metric-icon\">\n                <svg viewBox=\"0 0 24 24\">\n                  <!-- Outline heart (visible initially) -->\n                  <path\n                    id=\"heart-outline\"\n                    d=\"M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.03-3.7.477-4.82-.561-1.13-1.666-1.84-2.908-1.91zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z\"\n                    fill=\"#8b98a5\"\n                  />\n                  <!-- Filled heart (hidden initially, shown on like) -->\n                  <path\n                    id=\"heart-filled\"\n                    d=\"M20.884 13.19c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z\"\n                    fill=\"#f91880\"\n                    opacity=\"0\"\n                  />\n                </svg>\n              </div>\n              <span id=\"like-count\" class=\"metric-count\">10.9K</span>\n            </div>\n\n            <!-- Views -->\n            <div class=\"metric\">\n              <div class=\"metric-icon\">\n                <svg viewBox=\"0 0 24 24\" fill=\"#8b98a5\">\n                  <path\n                    d=\"M8.75 21V3h2v18h-2zM18 21V8.5h2V21h-2zM4 21l.004-10h2L6 21H4zm9.248 0v-7h2v7h-2z\"\n                  />\n                </svg>\n              </div>\n              <span class=\"metric-count\">150K</span>\n            </div>\n          </div>\n\n          <div class=\"metrics-right\">\n            <!-- Bookmark -->\n            <div class=\"metric\">\n              <div class=\"metric-icon\">\n                <svg viewBox=\"0 0 24 24\" fill=\"#8b98a5\">\n                  <path\n                    d=\"M4 4.5C4 3.12 5.119 2 6.5 2h11C18.881 2 20 3.12 20 4.5v18.44l-8-5.71-8 5.71V4.5zM6.5 4c-.276 0-.5.22-.5.5v14.56l6-4.29 6 4.29V4.5c0-.28-.224-.5-.5-.5h-11z\"\n                  />\n                </svg>\n              </div>\n            </div>\n\n            <!-- Share -->\n            <div class=\"metric\">\n              <div class=\"metric-icon\">\n                <svg viewBox=\"0 0 24 24\" fill=\"#8b98a5\">\n                  <path\n                    d=\"M12 2.59l5.7 5.7-1.41 1.42L13 6.41V16h-2V6.41l-3.3 3.3-1.41-1.42L12 2.59zM21 15l-.02 3.51c0 1.38-1.12 2.49-2.5 2.49H5.5C4.11 21 3 19.88 3 18.5V15h2v3.5c0 .28.22.5.5.5h12.98c.28 0 .5-.22.5-.5L19 15h2z\"\n                  />\n                </svg>\n              </div>\n            </div>\n          </div>\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 likeBtn = document.getElementById(\"like-btn\");\n      var heartOutline = document.getElementById(\"heart-outline\");\n      var heartFilled = document.getElementById(\"heart-filled\");\n      var likeCount = document.getElementById(\"like-count\");\n\n      // Start off-screen below\n      gsap.set(card, { y: 400, opacity: 0 });\n\n      // Slide in from bottom\n      tl.to(\n        card,\n        {\n          y: 0,\n          opacity: 1,\n          duration: 0.6,\n          ease: \"power3.out\",\n        },\n        0.1,\n      );\n\n      // Like press-in\n      tl.to(\n        likeBtn,\n        {\n          scale: 0.85,\n          duration: 0.12,\n          ease: \"power2.out\",\n        },\n        1.5,\n      );\n\n      // Like release with spring bounce\n      tl.to(\n        likeBtn,\n        {\n          scale: 1,\n          duration: 0.4,\n          ease: \"elastic.out(1, 0.4)\",\n        },\n        1.62,\n      );\n\n      // Hide outline heart\n      tl.to(\n        heartOutline,\n        {\n          opacity: 0,\n          duration: 0.01,\n          ease: \"none\",\n        },\n        1.62,\n      );\n\n      // Show filled heart\n      tl.to(\n        heartFilled,\n        {\n          opacity: 1,\n          duration: 0.12,\n          ease: \"none\",\n        },\n        1.62,\n      );\n\n      // Like count turns pink + increments\n      tl.to(\n        likeCount,\n        {\n          color: \"#f91880\",\n          duration: 0.12,\n          ease: \"none\",\n          onStart: function () {\n            likeCount.textContent = \"11.0K\";\n          },\n        },\n        1.62,\n      );\n\n      // Slide out to bottom\n      tl.to(\n        card,\n        {\n          y: 400,\n          opacity: 0,\n          duration: 0.3,\n          ease: \"power3.in\",\n        },\n        4.2,\n      );\n\n      window.__timelines[\"x-post\"] = tl;\n    </script>\n  </body>\n</html>\n"}