Responsive CSS

This commit is contained in:
Neale Pickett 2016-04-04 03:23:16 +00:00
parent 3fd6116964
commit eb9b623aae
2 changed files with 15 additions and 9 deletions

View File

@ -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%;
}
}

View File

@ -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);
}