32 lines
1.8 KiB
HTML
32 lines
1.8 KiB
HTML
<!doctype html><html lang="en"><head><meta charset="utf-8">
|
|
<link rel="stylesheet" href="../styles.css"><style>
|
|
.canvas{padding:26px 32px 24px}
|
|
.cta{text-align:center}
|
|
.b{display:inline-flex;align-items:center;gap:12px;background:var(--pine);color:#f7fbf9;font-weight:700;font-size:24px;letter-spacing:-.01em;border-radius:999px;padding:18px 34px;box-shadow:0 10px 24px -10px rgba(28,93,76,.6)}
|
|
.b svg{width:24px;height:24px}
|
|
.cta p{font-family:var(--mono);font-size:14px;color:var(--muted);letter-spacing:.03em;margin-top:14px}
|
|
</style></head><body><div class="canvas" id="shot">
|
|
<div class="cta"><span class="b">Try the sample workflow <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></span>
|
|
<p>Free · about 15 minutes · sample data · aibook.fun</p></div></div>
|
|
<script>
|
|
window.__ready = (async () => {
|
|
let empty = 0;
|
|
for (const s of document.querySelectorAll('.slot[data-src]')) {
|
|
let ok = false;
|
|
for (const ext of ['jpg', 'jpeg', 'png', 'webp']) {
|
|
const url = s.dataset.src + '.' + ext;
|
|
ok = await new Promise(r => { const i = new Image(); i.onload = () => r(true); i.onerror = () => r(false); i.src = url; });
|
|
if (ok) { s.style.backgroundImage = 'url("' + url + '")'; s.classList.add('filled'); break; }
|
|
}
|
|
if (!ok) empty++;
|
|
}
|
|
await document.fonts.ready;
|
|
for (const el of document.querySelectorAll('[data-fit]')) {
|
|
let fs = parseFloat(getComputedStyle(el).fontSize);
|
|
const max = el.dataset.fit ? parseFloat(el.dataset.fit) : el.parentElement.clientWidth;
|
|
while (el.scrollWidth > max && fs > 10) { fs -= 0.5; el.style.fontSize = fs + 'px'; }
|
|
}
|
|
if (window.afterLayout) await window.afterLayout();
|
|
return empty;
|
|
})();
|
|
</script></body></html> |