From 5fb63f403568280e4395e5c1ea11fa2d37d520ea Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Wed, 22 Apr 2015 14:03:27 +0200 Subject: Improve history row styling --- chatserver.html | 14 ++++++++------ theme-night.css | 7 +++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/chatserver.html b/chatserver.html index 3b11fd5..02c0b1a 100644 --- a/chatserver.html +++ b/chatserver.html @@ -23,7 +23,7 @@ td#lobbylog{ display:inline-block; height:calc(100% - 8px); border:1px #ccc solid; - border-radius:10px; + border-radius:3px; padding:0; font-family:Monaco,"Courier New",Monospace; } @@ -43,13 +43,15 @@ div#lobbylistdiv > div.selected{ color:#00a; background-color:#eef; } +table#lobbylogtab{ + width:100%; +} td#lobbylog > div, tbody#lobbtlobtb{ overflow:scroll; } -tbody#lobbylogtb, -tbody#lobbylogtb > tr{ - width:100%; +tbody#lobbylogtb > tr.history{ + background-color:#ccc; } td#lobbylog > div{ height:calc(100% - 22px); @@ -178,7 +180,7 @@ function addMessageLine(from,msg,isHistory){ td.appendChild(table); tr.appendChild(td); - if(isHistory)tr.style.backgroundColor="#ccc"; + if(isHistory)tr.classList.add("history"); document.getElementById("lobbylogtb").appendChild(tr); @@ -220,7 +222,7 @@ function switchTheme(theme){ -
+
diff --git a/theme-night.css b/theme-night.css index 44c096d..1ff3679 100644 --- a/theme-night.css +++ b/theme-night.css @@ -2,6 +2,13 @@ body{ color:#fff; background-color:#112; } +td#lobbylist, +td#lobbylog{ + border:1px #557 solid; +} +tbody#lobbylogtb > tr.history{ + background-color:#4c535d; +} tbody#lobbylogtb td.message-ownmessage{ color:#2d4; } -- cgit v1.2.3-70-g09d2