style tweaking

This commit is contained in:
ericrius1 2015-11-16 15:46:22 -08:00
parent 3c363f2664
commit b8cdff7a7a
4 changed files with 32 additions and 11 deletions

View file

@ -46,7 +46,8 @@ var GameBoard = React.createClass({
render: function() { render: function() {
return ( return (
<div className="commentBox"> <div>
<div className = "gameTitle">Kill All The Rats!</div>
<UserList data ={this.state.data}/> <UserList data ={this.state.data}/>
</div> </div>
); );

View file

@ -1,13 +1,26 @@
body {
font-family: Impact;
background-color: #009DC0 ;
font-size: 60px;
}
.gameTitle {
color: #D61010;
}
.entry{ .entry{
width:100%; width:100%;
height:50px; height:50px;
border:1px solid red; border:1px solid #A9D1E1;
margin-right:10px; color: white;
float:left; margin-right:10px;
font-size: 40px; padding: 10px;
float:left;
font-size: 40px;
} }
.username{ .username{
float: left; font-weight: bold;
margin-right: 50%; float: left;
margin-right: 50%;
} }

View file

@ -52,7 +52,12 @@ var GameBoard = React.createClass({
return React.createElement( return React.createElement(
'div', 'div',
{ className: 'commentBox' }, null,
React.createElement(
'div',
{ className: 'gameTitle' },
'Kill All The Rats!'
),
React.createElement(UserList, { data: this.state.data }) React.createElement(UserList, { data: this.state.data })
); );
} }

View file

@ -16,6 +16,7 @@
Script.include("../libraries/utils.js"); Script.include("../libraries/utils.js");
Script.include("../libraries/constants.js"); Script.include("../libraries/constants.js");
var gameName = "Kill All The Rats!"
var HOST = "localhost:5000" var HOST = "localhost:5000"
var socketClient = new WebSocket("ws://" + HOST); var socketClient = new WebSocket("ws://" + HOST);
var username = GlobalServices.username; var username = GlobalServices.username;
@ -27,7 +28,8 @@ function score() {
currentScore++; currentScore++;
socketClient.send(JSON.stringify({ socketClient.send(JSON.stringify({
username: username, username: username,
score: currentScore score: currentScore,
gameName: gameName
})) }))
} }