Skip to content

Commit

Permalink
added logo and favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed May 19, 2012
1 parent 9b979d2 commit 58a19e6
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 48 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# binb #
![binb](http://dl.dropbox.com/u/58444696/binb-logo.png)

binb is a simple, realtime, multiplayer, competitive music listening game.

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "binb",
"dependencies": {
"async": "0.1.x",
"canvas": "0.11.x",
"canvas": "0.12.x",
"connect": "1.8.x",
"connect-redis": "1.3.x",
"express": "2.5.x",
"express-form": "0.6.x",
"jade": "0.25.x",
"jade": "0.26.x",
"redis-url": "0.1.x",
"socket.io": "0.9.x"
},
Expand All @@ -18,5 +18,5 @@
"engines": {
"node": "0.6.x"
},
"version": "0.3.0-10"
"version": "0.3.0-12"
}
Binary file added public/static/css/comesinhandy-webfont.eot
Binary file not shown.
Binary file added public/static/css/comesinhandy-webfont.ttf
Binary file not shown.
Binary file added public/static/css/comesinhandy-webfont.woff
Binary file not shown.
50 changes: 34 additions & 16 deletions public/static/css/style.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
@font-face {
font-family: 'ChristopherhandRegular';
src: url('comesinhandy-webfont.eot');
src: url('comesinhandy-webfont.eot?#iefix') format('embedded-opentype'),
url('comesinhandy-webfont.woff') format('woff'),
url('comesinhandy-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
body {
background: url('/static/images/bg.jpg') repeat-x scroll 0 0 #F5F6F7;
padding-top:45px;
}
section {
margin-top:30px;
}
.motto {
color: #999999;
font-size:13px;
text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);
.navbar .brand {
padding: 2px 20px 4px;
}
.logo {
font-family: 'ChristopherhandRegular';
}
.navbar .brand .logo {
height: 34px;
padding-left: 68px;
line-height: 40px;
background: url('/static/images/logo.png') no-repeat 0px -54px;
font-size: 25px;
}
.page-header .logo {
display: inline-block;
height: 54px;
padding-left: 109px;
line-height: 68px;
background: url('/static/images/logo.png') no-repeat 0 0;
font-size: 34px;
color: #0088CC;
}
.navbar .navbar-text {
line-height:19px;
Expand Down Expand Up @@ -51,14 +77,6 @@ form .clearfix {
-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
}
.page-header h1 {
margin-bottom:8px;
line-height: 36px;
}
.page-header h1 small {
line-height: 1;
color: #BFBFBF;
}
input {
margin-bottom: 0;
}
Expand Down Expand Up @@ -175,12 +193,12 @@ input {
display: inline-block;
}
#total-tracks {
float:right;
float: right;
color: #BFBFBF;
margin-top:22px;
margin-top: 34px;
}
#cassette {
margin-top:17px;
margin-top:22px;
height: 137px;
background: url('/static/images/cassette.png') no-repeat 0 0;
}
Expand Down Expand Up @@ -255,7 +273,7 @@ input {
margin-left: 77px;
}
#volume {
height:154px;
height:159px;
}
#volume-button, #volume-slider, #volume-total, #volume-current, #volume-handle {
position: absolute;
Expand Down
Binary file added public/static/images/favicon.ico
Binary file not shown.
Binary file added public/static/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 19 additions & 18 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,26 @@ usersdb.on('error', function(err) {

// Setting up Express
var sessionstore = new redisstore({client:usersdb});
var http = express.createServer();
var app = express.createServer();

// Configuration
http.use(express.static(__dirname + '/public'));
http.use(express.bodyParser());
http.use(express.cookieParser());
http.use(express.session({secret:config.sessionsecret,store:sessionstore}));
http.set("view options", {layout:false});
http.set('view engine', 'jade');
app.use(express.static(__dirname + '/public'), {maxAge: 2592000000});
app.use(express.favicon(__dirname + '/public/static/images/favicon.ico', {maxAge: 2592000000}));
app.use(express.bodyParser());
app.use(express.cookieParser());
app.use(express.session({secret:config.sessionsecret,store:sessionstore}));
app.set("view options", {layout:false});
app.set('view engine', 'jade');

// Routes
http.get("/", function(req, res) {
app.get("/", function(req, res) {
if (req.session.user) {
res.local('loggedin', req.session.user.replace(/&/g, "&"));
}
res.render("index", {rooms:config.rooms});
});

http.get("/signup", function(req, res) {
app.get("/signup", function(req, res) {
var captcha = new Captcha();
req.session.captchacode = captcha.getCode();
res.render("signup", {captchaurl:captcha.toDataURL()});
Expand Down Expand Up @@ -92,7 +93,7 @@ var checkEmailExists = function(req, res, next) {
});
};

http.post("/signup",
app.post("/signup",
form(
form.filter("username").trim().required().not(/binb/, "is reserved")
.is(/^[^\x00-\x1F\x7F]{1,15}$/, "1 to 15 characters required"),
Expand Down Expand Up @@ -142,11 +143,11 @@ http.post("/signup",
}
);

http.get("/login", function(req, res) {
app.get("/login", function(req, res) {
res.render("login");
});

http.post("/login",
app.post("/login",
form(
form.filter("username").trim().required(),
form.filter("password").trim().required()
Expand Down Expand Up @@ -185,7 +186,7 @@ http.post("/login",
}
);

http.get("/logout", function(req, res) {
app.get("/logout", function(req, res) {
req.session.destroy(function() {
res.redirect("/");
});
Expand All @@ -199,7 +200,7 @@ var makeCallBack = function(genre) {
};
};

http.get("/artworks", function(req, res) {
app.get("/artworks", function(req, res) {
var callitems = [];
for (var i=0; i<config.rooms.length; i++) {
for (var j=0; j<6; j++) {
Expand All @@ -216,7 +217,7 @@ http.get("/artworks", function(req, res) {
});
});

http.get("/:room", function(req, res) {
app.get("/:room", function(req, res) {
if (config.rooms.indexOf(req.params.room) !== -1) {
if (req.session.user) {
res.local('loggedin', req.session.user.replace(/&/g, "&amp;"));
Expand All @@ -228,7 +229,7 @@ http.get("/:room", function(req, res) {
}
});

http.get("/user/*", function(req, res) {
app.get("/user/*", function(req, res) {
var key = "user:"+req.params[0];
usersdb.exists(key, function(err, data) {
if (data === 1) {
Expand All @@ -253,10 +254,10 @@ http.get("/user/*", function(req, res) {
});

// Starting HTTP server
http.listen(config.port);
app.listen(config.port);

// Setting up Socket.IO
var io = require("socket.io").listen(http);
var io = require("socket.io").listen(app);

io.enable('browser client minification'); // send minified client
io.enable('browser client etag'); // apply etag caching logic based on version number
Expand Down
4 changes: 2 additions & 2 deletions views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ html
.navbar.navbar-fixed-top
.navbar-inner
.container
a.brand(href="/") binb,
span.motto #{motto}
a.brand(href="/")
.logo #{motto}
ul.nav.pull-right
li.active
a(href="/") Home
Expand Down
4 changes: 2 additions & 2 deletions views/login.jade
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ html
.navbar.navbar-fixed-top
.navbar-inner
.container
a.brand(href="/") binb,
span.motto #{motto}
a.brand(href="/")
.logo #{motto}
ul.nav.pull-right
li
a(href="/") Home
Expand Down
3 changes: 1 addition & 2 deletions views/room.jade
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ html
#volume.relative
.span8
.page-header
h1#app-name binb,
small #{motto}
.logo #{motto}
#total-tracks <span></span> tracks.
#summary.row
.span2
Expand Down
4 changes: 2 additions & 2 deletions views/signup.jade
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ html
.navbar.navbar-fixed-top
.navbar-inner
.container
a.brand(href="/") binb,
span.motto #{motto}
a.brand(href="/")
.logo #{motto}
ul.nav.pull-right
li
a(href="/") Home
Expand Down
4 changes: 2 additions & 2 deletions views/user.jade
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ html
.navbar.navbar-fixed-top
.navbar-inner
.container
a.brand(href="#") binb,
span.motto #{motto}
a.brand(href="#")
.logo #{motto}
.container
section
.row
Expand Down

0 comments on commit 58a19e6

Please sign in to comment.