fix displaing in webpage
This commit is contained in:
+2
-2
@@ -47,7 +47,7 @@ INDEX_HTML = """<!DOCTYPE HTML><html>
|
|||||||
.container { max-width: 600px; margin: 0 auto; }
|
.container { max-width: 600px; margin: 0 auto; }
|
||||||
.display-wrapper { background: #0a0a0a; border-radius: 12px; padding: 12px; margin-bottom: 20px; overflow-x: auto; }
|
.display-wrapper { background: #0a0a0a; border-radius: 12px; padding: 12px; margin-bottom: 20px; overflow-x: auto; }
|
||||||
.display-grid { display: grid; grid-template-columns: repeat(48, 1fr); gap: 1px; width: 100%; aspect-ratio: 3/1; }
|
.display-grid { display: grid; grid-template-columns: repeat(48, 1fr); gap: 1px; width: 100%; aspect-ratio: 3/1; }
|
||||||
.dot { aspect-ratio: 1; border-radius: 50%; background: #111; }
|
.dot { aspect-ratio: 1; border-radius: 50%; background: #000; }
|
||||||
.controls { max-width: 400px; margin: 0 auto; }
|
.controls { max-width: 400px; margin: 0 auto; }
|
||||||
.card { background: #16213e; border-radius: 12px; padding: 16px 20px; margin-bottom: 12px;
|
.card { background: #16213e; border-radius: 12px; padding: 16px 20px; margin-bottom: 12px;
|
||||||
display: flex; align-items: center; justify-content: space-between; }
|
display: flex; align-items: center; justify-content: space-between; }
|
||||||
@@ -124,7 +124,7 @@ INDEX_HTML = """<!DOCTYPE HTML><html>
|
|||||||
var c = px[y][x];
|
var c = px[y][x];
|
||||||
var idx = y * COLS + x;
|
var idx = y * COLS + x;
|
||||||
if (c[0] === 0 && c[1] === 0 && c[2] === 0) {
|
if (c[0] === 0 && c[1] === 0 && c[2] === 0) {
|
||||||
dots[idx].style.background = "#111";
|
dots[idx].style.background = "#000";
|
||||||
} else {
|
} else {
|
||||||
dots[idx].style.background = "rgb(" + c[0] + "," + c[1] + "," + c[2] + ")";
|
dots[idx].style.background = "rgb(" + c[0] + "," + c[1] + "," + c[2] + ")";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user