Fix preview.html to native 320x240 without internal scale.

Card host now scales the iframe; remove broken transform that clipped UI to the corner.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-19 22:14:22 +08:00
parent 8e57cba1d8
commit 51a35f7553

View File

@@ -5,10 +5,10 @@
<title>AIR</title>
<style>
*{box-sizing:border-box;margin:0;padding:0}
html,body{width:100%;height:100%;overflow:hidden;background:#000}
.bezel{width:100%;height:100%;display:grid;place-items:center;background:#1a1408}
html,body{width:320px;height:240px;overflow:hidden;background:#000;margin:0}
.bezel{width:320px;height:240px;background:#1a1408}
.screen{width:320px;height:240px;background:#0A1018;color:#F2F5FA;font:12px/1.2 system-ui,sans-serif;
overflow:hidden;transform-origin:center;transform:scale(var(--s,1))}
overflow:hidden;}
.hdr{display:flex;align-items:center;gap:8px;padding:4px 8px;height:24px}
.hdr b{font-size:14px}.up{color:#7E90A8}.sp{margin-left:auto;display:flex;gap:6px;align-items:center;color:#7E90A8}
.led{width:9px;height:9px;border-radius:50%;background:#4CAF7A}
@@ -52,10 +52,6 @@
</svg></div>
</div>
</div></div>
<script>
(function(){function fit(){var s=document.getElementById('s');var r=s.parentElement.getBoundingClientRect();
s.style.setProperty('--s',Math.min(r.width/320,r.height/240));}
fit();addEventListener('resize',fit);})();
</script>
</body>
</html>