Skip to content

Commit 795579e

Browse files
Programcodeclaude
andcommitted
Size the embed snippet so the attribution link shows without scrolling
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 632aee0 commit 795579e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/pages/tools/DebateTimerToolPage.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ function EmbedSnippets() {
4545
const [formatId, setFormatId] = useState<BuiltInFormatId>('bp');
4646
const [copied, setCopied] = useState(false);
4747
const format = FORMATS[formatId];
48-
const snippet = `<iframe src="${site.origin}/embed/debate-timer?format=${formatId}" title="${format.name} debate timer" width="100%" height="560" style="border:0;max-width:760px" allow="screen-wake-lock; fullscreen" allowfullscreen loading="lazy"></iframe>
48+
// Tall enough that the attribution link shows without scrolling: prep banks and the POI strip add height.
49+
const height = format.prepSeconds > 0 ? 700 : format.segments.some((segment) => segment.poi) ? 600 : 540;
50+
const snippet = `<iframe src="${site.origin}/embed/debate-timer?format=${formatId}" title="${format.name} debate timer" width="100%" height="${height}" style="border:0;max-width:760px" allow="screen-wake-lock; fullscreen" allowfullscreen loading="lazy"></iframe>
4951
<p><a href="${site.origin}/tools/debate-timer">Free debate timer by DebateLab</a></p>`;
5052

5153
return (
@@ -135,7 +137,7 @@ export default function DebateTimerToolPage() {
135137
<h2>Embed this timer on your club site</h2>
136138
<p>Pick a format and paste the snippet into any page that accepts HTML. The embedded timer is the same clock without the page around it, has a small link back here, and loads nothing but its own files: no ads, no tracking, no account.</p>
137139
<EmbedSnippets />
138-
<p>For a custom format, set it up above, copy its link, and replace <code>/tools/debate-timer</code> with <code>/embed/debate-timer</code> in the iframe address.</p>
140+
<p>For a custom format, set it up above, copy its link, and replace <code>/tools/debate-timer</code> with <code>/embed/debate-timer</code> in the iframe address. Use a height of 700 if it has prep time.</p>
139141
</section>
140142

141143
<ToolFaq faq={FAQ} />

0 commit comments

Comments
 (0)