From: Luigi Pinca Date: Sat, 19 May 2012 09:38:20 +0000 (+0200) Subject: added logo and favicon X-Git-Url: https://git.saalbach.dev/?a=commitdiff_plain;h=58a19e601fc22df88ca02e14582878084868ebb8;p=binbsis50.git added logo and favicon --- diff --git a/README.md b/README.md index 11a9e71..dc63a82 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/package.json b/package.json index d025014..9e62d98 100644 --- a/package.json +++ b/package.json @@ -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" }, @@ -18,5 +18,5 @@ "engines": { "node": "0.6.x" }, - "version": "0.3.0-10" + "version": "0.3.0-12" } \ No newline at end of file diff --git a/public/static/css/comesinhandy-webfont.eot b/public/static/css/comesinhandy-webfont.eot new file mode 100644 index 0000000..141dbae Binary files /dev/null and b/public/static/css/comesinhandy-webfont.eot differ diff --git a/public/static/css/comesinhandy-webfont.ttf b/public/static/css/comesinhandy-webfont.ttf new file mode 100644 index 0000000..27941ac Binary files /dev/null and b/public/static/css/comesinhandy-webfont.ttf differ diff --git a/public/static/css/comesinhandy-webfont.woff b/public/static/css/comesinhandy-webfont.woff new file mode 100644 index 0000000..4bcdefa Binary files /dev/null and b/public/static/css/comesinhandy-webfont.woff differ diff --git a/public/static/css/style.css b/public/static/css/style.css index ed69b9b..348a550 100644 --- a/public/static/css/style.css +++ b/public/static/css/style.css @@ -1,3 +1,12 @@ +@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; @@ -5,10 +14,27 @@ body { 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; @@ -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; } @@ -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; } @@ -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; diff --git a/public/static/images/favicon.ico b/public/static/images/favicon.ico new file mode 100644 index 0000000..c3d1965 Binary files /dev/null and b/public/static/images/favicon.ico differ diff --git a/public/static/images/logo.png b/public/static/images/logo.png new file mode 100644 index 0000000..2159e70 Binary files /dev/null and b/public/static/images/logo.png differ diff --git a/server.js b/server.js index e008524..2b9a85b 100644 --- a/server.js +++ b/server.js @@ -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()}); @@ -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"), @@ -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() @@ -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("/"); }); @@ -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 tracks. #summary.row .span2 diff --git a/views/signup.jade b/views/signup.jade index c82727f..7303bb1 100644 --- a/views/signup.jade +++ b/views/signup.jade @@ -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 diff --git a/views/user.jade b/views/user.jade index cbe03c6..5942e3b 100644 --- a/views/user.jade +++ b/views/user.jade @@ -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