Download frontend/src/lib/ctaFormEmbed.js from Seth0330/qualifier: direct link, hf CLI and curl.
- Browser
- Download file 850 Bytes
-
https://huggingface.co/spaces/Seth0330/qualifier/resolve/main/frontend/src/lib/ctaFormEmbed.js
- Command line
-
hf download hf://spaces/Seth0330/qualifier/frontend/src/lib/ctaFormEmbed.js
-
curl -L -o ctaFormEmbed.js https://huggingface.co/spaces/Seth0330/qualifier/resolve/main/frontend/src/lib/ctaFormEmbed.js
850 Bytes
| /** | |
| * Client-side embed snippets (updates instantly while editing). | |
| * Sizing is responsive — no manual width/height needed. | |
| */ | |
| export function buildCtaEmbedCodes({ publicId, name, origin }) { | |
| if (!publicId) { | |
| return { embed_iframe: '', embed_script: '' }; | |
| } | |
| const base = | |
| origin || (typeof window !== 'undefined' ? window.location.origin : ''); | |
| const title = (name || 'Form').replace(/"/g, '"'); | |
| const iframeStyle = | |
| 'width:100%;max-width:100%;border:none;border-radius:12px;display:block;min-height:280px;'; | |
| return { | |
| embed_iframe: `<iframe src="${base}/embed/cta/${publicId}" title="${title}" style="${iframeStyle}" loading="lazy"></iframe>`, | |
| embed_script: `<div id="ezofis-cta-${publicId}"></div>\n<script src="${base}/api/embed/cta/${publicId}.js" async></script>`, | |
| }; | |
| } | |