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:
@@ -5,10 +5,10 @@
|
|||||||
<title>PHOTOS</title>
|
<title>PHOTOS</title>
|
||||||
<style>
|
<style>
|
||||||
*{box-sizing:border-box;margin:0;padding:0}
|
*{box-sizing:border-box;margin:0;padding:0}
|
||||||
html,body{width:100%;height:100%;overflow:hidden;background:#000}
|
html,body{width:320px;height:240px;overflow:hidden;background:#000;margin:0}
|
||||||
.bezel{width:100%;height:100%;display:grid;place-items:center;background:#1a1408}
|
.bezel{width:320px;height:240px;background:#1a1408}
|
||||||
.screen{width:320px;height:240px;background:#0A1016;color:#EAF0F6;font:12px/1.2 system-ui,sans-serif;
|
.screen{width:320px;height:240px;background:#0A1016;color:#EAF0F6;font:12px/1.2 system-ui,sans-serif;
|
||||||
display:flex;flex-direction:column;overflow:hidden;transform-origin:center;transform:scale(var(--s,1))}
|
display:flex;flex-direction:column;overflow:hidden;}
|
||||||
.top{height:28px;display:flex;align-items:center;padding:0 10px;gap:10px}
|
.top{height:28px;display:flex;align-items:center;padding:0 10px;gap:10px}
|
||||||
.top .t{color:#4FC3F7;font-weight:700;font-size:14px}
|
.top .t{color:#4FC3F7;font-weight:700;font-size:14px}
|
||||||
.top .i{margin-left:auto;color:#EAF0F6}
|
.top .i{margin-left:auto;color:#EAF0F6}
|
||||||
@@ -38,10 +38,6 @@
|
|||||||
<div class="hint">tap · SoftSPI touch</div>
|
<div class="hint">tap · SoftSPI touch</div>
|
||||||
<div class="bot"><button class="btn" type="button">PREV</button><button class="btn next" type="button">NEXT</button></div>
|
<div class="bot"><button class="btn" type="button">PREV</button><button class="btn next" type="button">NEXT</button></div>
|
||||||
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user