Skip to content

Commit 704bd9e

Browse files
jsundaiclaude
andcommitted
Fix copy and auto-resize iframe to content height
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 37ef597 commit 704bd9e

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

docs/nexus-demo.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,18 @@ hide_table_of_contents: true
1818
`}</style>
1919

2020
<iframe
21+
id="nexus-demo-frame"
2122
src="/nexus-demo.html"
22-
style={{display: 'block', width: '100%', height: 'calc(100vh - 60px)', border: 'none'}}
23+
style={{display: 'block', width: '100%', height: '100vh', border: 'none'}}
2324
title="Temporal Nexus Interactive Demo"
25+
onLoad={() => {
26+
const frame = document.getElementById('nexus-demo-frame');
27+
const resize = () => {
28+
try {
29+
frame.style.height = frame.contentDocument.body.scrollHeight + 'px';
30+
} catch(e) {}
31+
};
32+
resize();
33+
frame.contentWindow.addEventListener('click', () => setTimeout(resize, 400));
34+
}}
2435
/>

static/nexus-demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ <h3>Cross-Everything</h3>
403403
<div id="components" class="section">
404404
<div class="progress-bar"><div class="progress-fill" style="width:33%"></div></div>
405405
<h1>The Four Building Blocks</h1>
406-
<p class="lead">Nexus has four key concepts. Understanding these unlocks everything else.</p>
406+
<p class="lead">Nexus has four key concepts. These four concepts are the foundation of everything in Nexus.</p>
407407

408408
<div style="display:flex;flex-direction:column;gap:20px;">
409409

0 commit comments

Comments
 (0)