24 lines
1.7 KiB
HTML
24 lines
1.7 KiB
HTML
<!doctype html><html lang="en"><head><meta charset="utf-8">
|
|
<link rel="stylesheet" href="../styles.css"><style></style></head><body><div class="hdr" id="shot"><div class="tabs"><span></span><span></span><span></span><span></span><span></span></div><div class="mark"><svg viewBox="0 0 40 40" fill="none" aria-hidden="true"><circle cx="20" cy="20" r="17.5" stroke="#efe9db" stroke-width="1" opacity="0.7"/><path d="M20 5 L22.6 20 L20 35 L17.4 20 Z" fill="#efe9db"/><path d="M5 20 L20 17.4 L35 20 L20 22.6 Z" fill="#efe9db" opacity="0.55"/></svg></div><div class="badge"><span class="emoji">🧭</span></div><div style="min-width:0;flex:1"><div class="kicker">We Own AI — The New American Dream</div><h1 data-fit>Three ways to back</h1></div><div class="rule"></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> |