Skip to content

Commit 5268800

Browse files
committed
fix: iframe test min-width 1024px; correct bar offset to 32px; note canvas min-width in README
1 parent a0ce1e1 commit 5268800

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A self-contained, embeddable web app that sequences the five interactive modes o
66

77
```html
88
<!-- padding-top = 9/16 canvas + 52px progress bar -->
9-
<div style="position:relative; width:100%; padding-top:calc(56.25% + 48px);">
9+
<div style="position:relative; width:100%; padding-top:calc(56.25% + 32px);">
1010
<iframe
1111
src="https://code-dot-org.github.io/ai-literacy-oceans/"
1212
style="position:absolute; top:0; left:0; width:100%; height:100%; border:none;"
@@ -15,7 +15,9 @@ A self-contained, embeddable web app that sequences the five interactive modes o
1515
</div>
1616
```
1717

18-
The canvas is always 16:9. The progress bar sits above it — the iframe is taller than 16:9 by the bar's height (52px).
18+
The canvas is always 16:9. The progress bar sits above it — the iframe is taller than 16:9 by the bar's height (~32px).
19+
The iframe container should be at least **1024px wide** so the 16:9 canvas reaches 576px height,
20+
which is OceansLab's designed canvas height. Below 1024px the word-selection scene clips.
1921

2022
### Contract
2123

public/iframe-test.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
}
1515
h1 { font-size: 20px; margin-bottom: 8px; }
1616
p { font-size: 14px; color: #4a5568; margin-bottom: 20px; }
17-
.embed-container { width: 100%; max-width: 960px; margin: 0 auto; }
17+
/* 1024px minimum: OceansLab's word scene is designed for a 1024×576 canvas.
18+
At narrower widths the 16:9 canvas is shorter than 576px and clips buttons. */
19+
.embed-container { width: 100%; max-width: 1280px; min-width: 1024px; margin: 0 auto; overflow-x: auto; }
1820

1921
/*
2022
* Responsive wrapper for the iframe.
@@ -28,7 +30,7 @@
2830
.iframe-wrapper {
2931
position: relative;
3032
width: 100%;
31-
padding-top: calc(56.25% + 48px);
33+
padding-top: calc(56.25% + 32px);
3234
border-radius: 8px;
3335
overflow: hidden;
3436
box-shadow: 0 4px 24px rgba(0,0,0,0.15);

0 commit comments

Comments
 (0)