Skip to content

Commit 0726c2c

Browse files
authored
[fix] larkin-mcp overflow on iframes (#94)
1 parent 6efcd36 commit 0726c2c

File tree

4 files changed

+52
-5
lines changed

4 files changed

+52
-5
lines changed

_sass/pages/_post.scss

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,12 @@
468468

469469
/* see the MCP larkin-mcp post for more details */
470470
/* iframe is 1120x630, scaled 0.75 = 840x472.5 visible */
471+
/* aspect-ratio matches iframe: 1120/630 = 16/9 */
471472
.mcp-demo-iframe-wrapper {
472473
display: block;
473474
width: 840px; /* 1120 * 0.75 */
474-
height: 473px; /* 630 * 0.75 */
475+
max-width: 100%;
476+
aspect-ratio: 1120 / 630;
475477
margin: 0 auto;
476478
overflow: hidden;
477479
position: relative;
@@ -488,4 +490,49 @@
488490
overflow: hidden;
489491
box-shadow: 0 2px 16px 0 rgba(20,32,60,0.07);
490492
border-radius: 10px;
493+
}
494+
495+
/* Responsive iframe scaling for tablets and mobile */
496+
@media (max-width: 900px) {
497+
.mcp-demo-iframe-wrapper {
498+
/* scale(0.55): 1120*0.55=616, 630*0.55=346 */
499+
width: 616px;
500+
height: 347px;
501+
}
502+
.mcp-demo-iframe-container {
503+
transform: scale(0.55);
504+
}
505+
}
506+
507+
@media (max-width: 650px) {
508+
.mcp-demo-iframe-wrapper {
509+
/* scale(0.42): 1120*0.42=470, 630*0.42=265 */
510+
width: 470px;
511+
height: 265px;
512+
}
513+
.mcp-demo-iframe-container {
514+
transform: scale(0.42);
515+
}
516+
}
517+
518+
@media (max-width: 500px) {
519+
.mcp-demo-iframe-wrapper {
520+
/* scale(0.32): 1120*0.32=358, 630*0.32=202 */
521+
width: 358px;
522+
height: 202px;
523+
}
524+
.mcp-demo-iframe-container {
525+
transform: scale(0.32);
526+
}
527+
}
528+
529+
@media (max-width: 380px) {
530+
.mcp-demo-iframe-wrapper {
531+
/* scale(0.28): 1120*0.28=314, 630*0.28=176 */
532+
width: 314px;
533+
height: 176px;
534+
}
535+
.mcp-demo-iframe-container {
536+
transform: scale(0.28);
537+
}
491538
}

_site/assets/css/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_site/sitemap.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@
221221
</url>
222222
<url>
223223
<loc>http://localhost:4000/assets/html/larkin-mcp/john-larkin-profile.html</loc>
224-
<lastmod>2025-12-14T15:13:03-05:00</lastmod>
224+
<lastmod>2025-12-23T18:18:23-05:00</lastmod>
225225
</url>
226226
<url>
227227
<loc>http://localhost:4000/assets/html/larkin-mcp/john-larkin-timeline.html</loc>
228-
<lastmod>2025-12-18T07:52:22-05:00</lastmod>
228+
<lastmod>2025-12-23T18:18:23-05:00</lastmod>
229229
</url>
230230
<url>
231231
<loc>http://localhost:4000/images/hac/Hierarchical-clustering-cheatsheet.pdf</loc>

assets/css/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)