From e00fa116c51e728e341e48e4c5f9f09cf4d416fc Mon Sep 17 00:00:00 2001 From: stale Date: Sun, 5 Jun 2022 20:43:32 -0300 Subject: code cleanup, floodfill algo changed to iterative --- assets/client.js | 4 ++-- assets/index.html | 33 ++++++++++++++++++++++++++------- assets/room.html | 4 ++-- assets/style.css | 20 +++++++++++--------- 4 files changed, 41 insertions(+), 20 deletions(-) (limited to 'assets') diff --git a/assets/client.js b/assets/client.js index 14e95f0..33ad796 100644 --- a/assets/client.js +++ b/assets/client.js @@ -11,7 +11,7 @@ window.room = { }; window.info_elem = document.getElementById("miscinfo"); window.identform = document.getElementById("identform"); -window.statusline = document.getElementById("statusline"); +window.statusline = document.getElementsByClassName("statusline")[0]; window.bcont_elem = document.getElementById("board-container"); window.board_elem = document.getElementById("board"); window.cursor_frame = document.getElementById("cursor-frame"); @@ -34,7 +34,7 @@ function join() { room.socket = connect(); statusline.style.display = "flex"; } -function new_ident_btn() { +function clear_ident() { localStorage.removeItem("identity"); document.location.reload(); } diff --git a/assets/index.html b/assets/index.html index 9282726..f86287e 100644 --- a/assets/index.html +++ b/assets/index.html @@ -52,20 +52,39 @@
-={ Create a new room }=- -
-
- +
+
+

+ clear identity +
+ diff --git a/assets/room.html b/assets/room.html index b669757..c3dc871 100644 --- a/assets/room.html +++ b/assets/room.html @@ -17,10 +17,10 @@ -
+
diff --git a/assets/style.css b/assets/style.css index 16ca7f0..49e832e 100644 --- a/assets/style.css +++ b/assets/style.css @@ -15,10 +15,6 @@ top: 0px; left: 0px; } -.cent { - width: 80vw; - margin: 0 auto; -} body { font-family: vt323, monospace; @@ -50,17 +46,16 @@ body { line-height: initial; } -#rlist a, #rlist span { +a { text-decoration: none; - color: #dfdfff; - background-color: #3c3c3c; + color: #8b8be8; } #miscinfo { flex-grow: 1; } -#statusline { +.statusline { display: flex; position: sticky; background-color: black; @@ -69,10 +64,17 @@ body { bottom: 0px; left: 0px; } -#statusline * { +.statusline * { margin: 0.5em 2em 0 0; } +/* i was today years old when i learned that css selector declaration order matters */ +/* cent should come after statusline, so it overwrites statusline's props */ +.cent { + width: 80vw; + margin: 0 auto; +} + span, h1, h4 { margin: 0 auto; } -- cgit v1.2.3