mirror of https://github.com/dirtbags/moth.git
Responsive CSS
This commit is contained in:
parent
3fd6116964
commit
eb9b623aae
|
@ -11,7 +11,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.terminal {
|
.terminal {
|
||||||
background: rgba(80, 70, 60, 0.9);
|
background: rgba(80, 70, 60, 0.96);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 1%;
|
margin: 1%;
|
||||||
border: solid black 0.2em;
|
border: solid black 0.2em;
|
||||||
|
@ -37,3 +37,9 @@ body {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
height: 70%;
|
height: 70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 52em) {
|
||||||
|
#overview, #messages, #puzzles, #main {
|
||||||
|
width: 96%;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,18 +2,19 @@ function tx(element, text, bps) {
|
||||||
var drawTimer;
|
var drawTimer;
|
||||||
|
|
||||||
var displayed = "";
|
var displayed = "";
|
||||||
|
var idx = 0;
|
||||||
function draw() {
|
function draw() {
|
||||||
c = text[0];
|
displayed += text[idx];
|
||||||
displayed += c;
|
|
||||||
element.textContent = displayed;
|
element.textContent = displayed;
|
||||||
text = text.substr(1);
|
|
||||||
if (text.length == 0) {
|
idx += 1;
|
||||||
clearInterval(drawTimer);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (element.parentNode.lastChild == element) {
|
if (element.parentNode.lastChild == element) {
|
||||||
element.scrollIntoView();
|
element.scrollIntoView();
|
||||||
}
|
}
|
||||||
|
if (text.length == idx) {
|
||||||
|
clearInterval(drawTimer);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// N81 uses 1 stop bit, and 1 parity bit.
|
// N81 uses 1 stop bit, and 1 parity bit.
|
||||||
|
@ -37,7 +38,6 @@ function Terminal(target, bps) {
|
||||||
target.appendChild(out);
|
target.appendChild(out);
|
||||||
tx(out, next[1], bps);
|
tx(out, next[1], bps);
|
||||||
|
|
||||||
console.log(outq.length);
|
|
||||||
if (outq.length == 0) {
|
if (outq.length == 0) {
|
||||||
clearInterval(outTimer);
|
clearInterval(outTimer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue