From ac0662b21ce0f81836c1175404f53a62943c95ee Mon Sep 17 00:00:00 2001 From: Lisa Milne Date: Sat, 11 Nov 2023 17:22:48 +1000 Subject: [PATCH] more playing with tty size --- clite/core.css | 2 +- clite/core.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clite/core.css b/clite/core.css index 25abee7..2e4ef02 100644 --- a/clite/core.css +++ b/clite/core.css @@ -6,7 +6,7 @@ header {padding:10px;} header h1 {line-height:40px; font-size:30px;} section {} section.content {position:relative; overflow:hidden;} -section.content div#terminal {width:100%; min-width: 500px; max-width:1000px; margin:0 auto; overflow:hidden; overflow-y:auto; scrollbar-width:none;} +section.content div#terminal {width:100%; min-width: 500px; max-width:1000px; max-height:100%; margin:0 auto; overflow:hidden; overflow-y:auto; scrollbar-width:none;} section.content div#tty {width:100%; min-width: 500px; max-width:1000px; margin:0 auto; overflow:hidden; overflow-y:auto; scrollbar-width:none; z-index:99; background:#000000;} section.content article {unicode-bidi: embed; white-space: pre-wrap;} section.content form {display:flex;} diff --git a/clite/core.js b/clite/core.js index 5109bf4..5dfe3ee 100644 --- a/clite/core.js +++ b/clite/core.js @@ -914,7 +914,7 @@ clite.term = { s.innerText = 'W'; tty.data.el.appendChild(s); // TODO: shouldn't need the 0.9 thing, but urgh - tty.lines = parseInt((tty.data.el.offsetHeight/s.offsetHeight)*0.9); + tty.lines = parseInt((tty.data.el.offsetHeight/20)-1); tty.chars = parseInt((tty.data.el.offsetWidth/s.offsetWidth)*0.8); tty.data.el.removeChild(s); clite.events.refocus();