diff --git a/www/res/style.css b/www/res/style.css index d38d3bf..12ed521 100644 --- a/www/res/style.css +++ b/www/res/style.css @@ -11,7 +11,7 @@ body { } .terminal { - background: rgba(80, 70, 60, 0.9); + background: rgba(80, 70, 60, 0.96); display: inline-block; margin: 1%; border: solid black 0.2em; @@ -37,3 +37,9 @@ body { width: 70%; height: 70%; } + +@media (max-width: 52em) { + #overview, #messages, #puzzles, #main { + width: 96%; + } +} \ No newline at end of file diff --git a/www/res/terminal.js b/www/res/terminal.js index 8967889..fec7de5 100644 --- a/www/res/terminal.js +++ b/www/res/terminal.js @@ -2,18 +2,19 @@ function tx(element, text, bps) { var drawTimer; var displayed = ""; + var idx = 0; function draw() { - c = text[0]; - displayed += c; + displayed += text[idx]; element.textContent = displayed; - text = text.substr(1); - if (text.length == 0) { - clearInterval(drawTimer); - return; - } + + idx += 1; if (element.parentNode.lastChild == element) { element.scrollIntoView(); } + if (text.length == idx) { + clearInterval(drawTimer); + return; + } } // N81 uses 1 stop bit, and 1 parity bit. @@ -37,7 +38,6 @@ function Terminal(target, bps) { target.appendChild(out); tx(out, next[1], bps); - console.log(outq.length); if (outq.length == 0) { clearInterval(outTimer); }