Permalink
Browse files

improve css

  • Loading branch information...
1 parent 51c6cc3 commit d8041c2d1feeab2b136ce2ca66d262c2f47e5cc9 @ericz committed Feb 18, 2012
Showing with 52 additions and 2 deletions.
  1. +42 −0 admin/public/css/style.css
  2. +5 −0 admin/public/js/index.js
  3. +4 −1 admin/views/index.ejs
  4. +1 −1 physics.js
View
@@ -10,6 +10,8 @@ a img {border: none;} /* Gets rid of IE's blue borders */
position: relative;
}
+
+
.close {
position: absolute;
top: 5px;
@@ -25,4 +27,44 @@ a img {border: none;} /* Gets rid of IE's blue borders */
border: 5px solid #d4d4d4;
margin: 50px auto;
position: relative;
+}
+
+.green {
+ background-color: #bdecb6;
+}
+
+.red {
+ background-color: #ff7878;
+}
+
+#control {
+ text-align: center;
+ margin-top: 30px;
+}
+
+.lang {
+ font-family: Helvetica, Arial;
+ text-transform: uppercase;
+ height: 26px;
+ display: inline-block;
+ padding-bottom: 4px;
+ padding: 0 12px 5px 12px;
+ line-height: 31px;
+ margin: 7px 0;
+ color: #fff;
+ font-weight: bold;
+ font-size: 14px;
+ text-align: center;
+ box-shadow: inset 0 -3px 0 0 rgba(0,0,0,0.05);
+ -webkit-transition: all 150ms ease-in-out;
+ -moz-transition: all 150ms ease-in-out;
+ -o-transition: all 150ms ease-in-out;
+ -ms-transition: all 150ms ease-in-out;
+ transition: all 150ms ease-in-out;
+ cursor: pointer;
+ border-radius: 3px;
+}
+
+.lang:hover {
+ box-shadow: inset 0 -3px 0 0 rgba(0,0,0,0.3);
}
View
@@ -65,6 +65,11 @@ var findCenterOffset = function(xoff, yoff) {
$(function(){
+ $('#start').click(send);
+ $('#end').click(function(){
+ physics.stop();
+ });
+
bridge = new Bridge({url: 'http://136.152.37.120:8091/bridge'});
bridge.ready(function(){
bridge.publishService('admin', {addRect: addRect});
View
@@ -19,7 +19,10 @@
</head>
<body>
- <div id="control"></div>
+ <div id="control">
+ <div id="start" class="lang green">Start game</div>
+ <div id="end" class="lang red">End game</div>
+ </div>
<div id="field"></div>
</body>
</html>
View
@@ -1,5 +1,5 @@
var Bridge = require('./bridge').Bridge;
-var bridge = new Bridge({host:'136.152.37.120 '});
+var bridge = new Bridge({host:'136.152.37.120'});
var ball = {x:120,y:120,radius:20};
var paddle1 = {x1:50,y1:50,x2:90,y2:60};
var paddle2 = {x1:50,y1:50,x2:90,y2:70};

0 comments on commit d8041c2

Please sign in to comment.