Skip to content

Write HTML. Render video. Built for agents.

9.1 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;600;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: 1080px;\n        height: 1920px;\n        font-family: \"Inter\", sans-serif;\n      }\n\n      [data-composition-id=\"spotify-card\"] .card {\n        position: absolute;\n        top: 50%;\n        left: 50%;\n        margin-top: -495px;\n        margin-left: -390px;\n        width: 780px;\n        background: linear-gradient(\n          165deg,\n          rgba(140, 155, 170, 0.42) 0%,\n          rgba(100, 115, 130, 0.35) 30%,\n          rgba(75, 88, 105, 0.38) 60%,\n          rgba(60, 72, 88, 0.44) 100%\n        );\n        border-radius: 28px;\n        padding: 36px;\n        border: 1px solid rgba(255, 255, 255, 0.22);\n        box-shadow:\n          0 24px 48px rgba(0, 0, 0, 0.3),\n          0 2px 6px rgba(0, 0, 0, 0.12),\n          inset 0 1px 0 rgba(255, 255, 255, 0.32),\n          inset 0 -1px 0 rgba(0, 0, 0, 0.12);\n        backdrop-filter: blur(40px) saturate(180%);\n        -webkit-backdrop-filter: blur(40px) saturate(180%);\n        overflow: hidden;\n      }\n\n      /* Specular highlight — light refraction across top */\n      [data-composition-id=\"spotify-card\"] .card::before {\n        content: \"\";\n        position: absolute;\n        top: 0;\n        left: 0;\n        right: 0;\n        height: 55%;\n        background: linear-gradient(\n          180deg,\n          rgba(255, 255, 255, 0.18) 0%,\n          rgba(255, 255, 255, 0.07) 35%,\n          transparent 100%\n        );\n        border-radius: 28px 28px 0 0;\n        pointer-events: none;\n      }\n\n      /* Edge shine — bottom rim catch light */\n      [data-composition-id=\"spotify-card\"] .card::after {\n        content: \"\";\n        position: absolute;\n        bottom: 0;\n        left: 20px;\n        right: 20px;\n        height: 1px;\n        background: linear-gradient(\n          90deg,\n          transparent 0%,\n          rgba(255, 255, 255, 0.08) 30%,\n          rgba(255, 255, 255, 0.12) 50%,\n          rgba(255, 255, 255, 0.08) 70%,\n          transparent 100%\n        );\n        pointer-events: none;\n      }\n\n      /* Album Art */\n      [data-composition-id=\"spotify-card\"] .album-art {\n        width: 708px;\n        height: 708px;\n        border-radius: 16px;\n        overflow: hidden;\n        position: relative;\n        z-index: 1;\n        background: linear-gradient(145deg, #1db954 0%, #17a34a 30%, #0f7234 60%, #191414 100%);\n        margin-bottom: 36px;\n      }\n\n      [data-composition-id=\"spotify-card\"] .album-art-icon {\n        position: absolute;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n        opacity: 0.2;\n      }\n\n      /* Track Info */\n      [data-composition-id=\"spotify-card\"] .track-info {\n        position: relative;\n        z-index: 1;\n        margin-bottom: 28px;\n        padding: 0 8px;\n      }\n\n      [data-composition-id=\"spotify-card\"] .track-name {\n        font-size: 52px;\n        font-weight: 700;\n        color: #ffffff;\n        letter-spacing: -0.02em;\n        line-height: 1.15;\n        margin-bottom: 8px;\n      }\n\n      [data-composition-id=\"spotify-card\"] .artist-name {\n        font-size: 34px;\n        font-weight: 400;\n        color: rgba(255, 255, 255, 0.7);\n        line-height: 1.3;\n      }\n\n      /* Spotify Branding */\n      [data-composition-id=\"spotify-card\"] .spotify-brand {\n        position: relative;\n        z-index: 1;\n        display: flex;\n        align-items: center;\n        gap: 12px;\n        padding: 0 8px;\n      }\n\n      [data-composition-id=\"spotify-card\"] .spotify-logo {\n        display: flex;\n        align-items: center;\n        justify-content: center;\n      }\n\n      [data-composition-id=\"spotify-card\"] .spotify-brand-text {\n        font-size: 26px;\n        font-weight: 600;\n        color: rgba(255, 255, 255, 0.55);\n        letter-spacing: 0.01em;\n      }\n    </style>\n  </head>\n  <body>\n<style>body { transform: scale(0.55); transform-origin: center center; }</style>\n    <div\n      id=\"root\"\n      data-composition-id=\"spotify-card\"\n      data-width=\"1080\"\n      data-height=\"1920\"\n      data-start=\"0\"\n      data-duration=\"5\"\n    >\n      <div id=\"card\" class=\"clip card\" data-start=\"0\" data-duration=\"5\" data-track-index=\"0\">\n        <!-- Album Art -->\n        <div id=\"album-art\" class=\"album-art\">\n          <svg class=\"album-art-icon\" width=\"200\" height=\"200\" viewBox=\"0 0 24 24\" fill=\"none\">\n            <path\n              d=\"M9 18V5l12-2v13\"\n              stroke=\"rgba(255,255,255,0.7)\"\n              stroke-width=\"1\"\n              stroke-linecap=\"round\"\n              stroke-linejoin=\"round\"\n            />\n            <circle cx=\"6\" cy=\"18\" r=\"3\" stroke=\"rgba(255,255,255,0.7)\" stroke-width=\"1\" />\n            <circle cx=\"18\" cy=\"16\" r=\"3\" stroke=\"rgba(255,255,255,0.7)\" stroke-width=\"1\" />\n          </svg>\n        </div>\n\n        <!-- Track Info -->\n        <div class=\"track-info\">\n          <div id=\"track-name\" class=\"track-name\">HyperFrames</div>\n          <div id=\"artist-name\" class=\"artist-name\">HeyGen</div>\n        </div>\n\n        <!-- Spotify Branding -->\n        <div id=\"spotify-brand\" class=\"spotify-brand\">\n          <div class=\"spotify-logo\">\n            <svg width=\"32\" height=\"32\" viewBox=\"0 0 16 16\" fill=\"rgba(255,255,255,0.55)\">\n              <path\n                d=\"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0m3.669 11.538a.5.5 0 0 1-.686.165c-1.879-1.147-4.243-1.407-7.028-.77a.499.499 0 0 1-.222-.973c3.048-.696 5.662-.397 7.77.892a.5.5 0 0 1 .166.686m.979-2.178a.624.624 0 0 1-.858.205c-2.15-1.321-5.428-1.704-7.972-.932a.625.625 0 0 1-.362-1.194c2.905-.881 6.517-.454 8.986 1.063a.624.624 0 0 1 .206.858m.084-2.268C10.154 5.56 5.9 5.419 3.438 6.166a.748.748 0 1 1-.434-1.432c2.825-.857 7.523-.692 10.492 1.07a.747.747 0 1 1-.764 1.288\"\n              />\n            </svg>\n          </div>\n          <span class=\"spotify-brand-text\">Spotify</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 albumArt = document.getElementById(\"album-art\");\n      var trackName = document.getElementById(\"track-name\");\n      var artistName = document.getElementById(\"artist-name\");\n      var spotifyBrand = document.getElementById(\"spotify-brand\");\n\n      // Start state\n      gsap.set(card, { y: 60, opacity: 0, scale: 0.94 });\n      gsap.set(trackName, { y: 20, opacity: 0 });\n      gsap.set(artistName, { y: 16, opacity: 0 });\n      gsap.set(spotifyBrand, { y: 12, opacity: 0 });\n\n      // ── Card entrance ────────────────────────────────────────\n      tl.to(\n        card,\n        {\n          y: 0,\n          opacity: 1,\n          scale: 1,\n          duration: 0.7,\n          ease: \"power3.out\",\n        },\n        0.1,\n      );\n\n      // ── Text stagger in ─────────────────────────────────────\n      tl.to(\n        trackName,\n        {\n          y: 0,\n          opacity: 1,\n          duration: 0.5,\n          ease: \"power2.out\",\n        },\n        0.55,\n      );\n\n      tl.to(\n        artistName,\n        {\n          y: 0,\n          opacity: 1,\n          duration: 0.45,\n          ease: \"power2.out\",\n        },\n        0.7,\n      );\n\n      tl.to(\n        spotifyBrand,\n        {\n          y: 0,\n          opacity: 1,\n          duration: 0.4,\n          ease: \"power2.out\",\n        },\n        0.85,\n      );\n\n      // ── Subtle album art breathe ────────────────────────────\n      tl.to(\n        albumArt,\n        {\n          scale: 1.015,\n          duration: 1.5,\n          ease: \"power1.inOut\",\n          yoyo: true,\n          repeat: 1,\n        },\n        1.2,\n      );\n\n      // ── Card exit ────────────────────────────────────────────\n      tl.to(\n        card,\n        {\n          y: -40,\n          opacity: 0,\n          scale: 0.96,\n          duration: 0.5,\n          ease: \"power2.in\",\n        },\n        4.2,\n      );\n\n      window.__timelines[\"spotify-card\"] = tl;\n    </script>\n  </body>\n</html>\n"}