Skip to content

Commit

Permalink
css changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabipurcaru committed Mar 24, 2013
1 parent 22f2125 commit 38c87d5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
8 changes: 6 additions & 2 deletions public/javascripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ $(function() {
.attr("dx", -10)
.attr("dy", -10)
.style("opacity", 0);
$("#messages").append($("<li>").html("<b>" + this.name + "</b>: " + text));
console.log("send? " + !supress);
if(this.isOwnUser()) {
$("#messages").append($("<li class='own'>").html("<b>" + this.name + "</b>: " + text));
} else {
$("#messages").append($("<li>").html("<b>" + this.name + "</b>: " + text));
}
$("#messages").scrollTop(10000000000);
if(!supress) {
socket.emit("user-message", $("#form input").val());
}
Expand Down
19 changes: 19 additions & 0 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,32 @@ svg {
background-color: rgba(128, 255, 255, 0.5);
bottom: 0;
right: 0;
border: 1px solid rgba(0, 0, 0, 0.2);
}
#chat #form {
position: fixed;
bottom: 0;
}
#chat #form input[type=text] {
width: 300px;
border: 1px solid rgba(0, 0, 0, 0.2);
margin-bottom: 0px;
border-collapse: collapse;
height: 20px;
}
#messages li {
list-style: none;
margin-left: 0px;
padding: 0px;
}
#messages li.own b {
color: #444;
}
#messages {
margin: 10px;
height: 350px;
overflow: auto;
padding: 0;
}
svg text {
font-family: Arial;
Expand Down

0 comments on commit 38c87d5

Please sign in to comment.