aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <hallo@tomsmeding.nl>2015-04-22 14:03:27 +0200
committertomsmeding <hallo@tomsmeding.nl>2015-04-22 14:03:27 +0200
commit5fb63f403568280e4395e5c1ea11fa2d37d520ea (patch)
treec06a621ed656bf9eeb0f44173071404c74500d31
parent55d1f2bbea67824754cc7752352434f4cb90a657 (diff)
Improve history row styling
-rw-r--r--chatserver.html14
-rw-r--r--theme-night.css7
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){
</div>
</td>
<td id="lobbylog">
- <div><table><tbody id="lobbylogtb"></tbody></table></div>
+ <div><table id="lobbylogtab"><tbody id="lobbylogtb"></tbody></table></div>
<input type="text" class="textinput" placeholder="..." onkeypress="if(event.keyCode==13){sendMessage(this.value);this.value='';}">
</td>
</tr></tbody></table>
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;
}