mirror of
https://codeberg.org/TicklishHoneyBee/CLIte.git
synced 2026-03-11 09:04:37 +00:00
more playing with tty size pt2
This commit is contained in:
parent
ac0662b21c
commit
9cff3a7c10
2 changed files with 3 additions and 2 deletions
|
|
@ -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; max-height:100%; 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%; font-size:14px; line-height:20px; 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;}
|
||||
|
|
|
|||
|
|
@ -913,8 +913,9 @@ clite.term = {
|
|||
var s = document.createElement('span');
|
||||
s.innerText = 'W';
|
||||
tty.data.el.appendChild(s);
|
||||
// TODO: shouldn't need the 0.9 thing, but urgh
|
||||
// 20 should not be hardcoded
|
||||
tty.lines = parseInt((tty.data.el.offsetHeight/20)-1);
|
||||
// TODO: shouldn't need the 0.8 thing, but urgh
|
||||
tty.chars = parseInt((tty.data.el.offsetWidth/s.offsetWidth)*0.8);
|
||||
tty.data.el.removeChild(s);
|
||||
clite.events.refocus();
|
||||
|
|
|
|||
Loading…
Reference in a new issue