forked from nko/website
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ah, back to express, jade, and stylus
- Loading branch information
Visnu Pitiyanuvath
committed
Mar 15, 2011
1 parent
873446d
commit 28c0bd8
Showing
11 changed files
with
153 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.DS_Store | ||
.sass-cache | ||
tmp/* | ||
*.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var express = require('express') | ||
, pub = __dirname + '/public'; | ||
|
||
var app = express.createServer(); | ||
|
||
app.use(require('stylus').middleware(pub)); | ||
app.use(express.static(pub)); | ||
app.use(express.logger()); | ||
app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); | ||
|
||
app.set('views', __dirname + '/views'); | ||
app.set('view engine', 'jade'); | ||
|
||
app.listen(process.env.PORT || 8000); | ||
|
||
app.get('/', function(req, res) { | ||
res.render('index'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "nko", | ||
"description": "node.js knockout: 48-hour node.js hackathon", | ||
"version": "0.0.1", | ||
"homepage": "http://nodeknockout.com", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/nko/website.git" | ||
}, | ||
"author": "NKO Team <all@nodeknockout.com>", | ||
"main": "./app.js", | ||
"directories": { | ||
"lib": "." | ||
}, | ||
"engines": { | ||
"node": "*" | ||
}, | ||
"dependencies": { | ||
"express": ">=2.0.0rc", | ||
"jade": ">=0.8.8", | ||
"stylus": "0.8.0" | ||
}, | ||
"devDependencies": { | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info, log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{}); | ||
|
||
$(function() { | ||
var parts, start; | ||
parts = $('time.start').attr('datetime').split(/[-:TZ]/); | ||
parts[1]--; // js dates :( | ||
start = Date.UTC.apply(null, parts); | ||
|
||
$('#countdown').each(function() { | ||
var $this = $(this); | ||
(function tick() { | ||
$this.html(countdownify((start - (new Date)) / 1000)); | ||
return setTimeout(tick, 1000); | ||
})(); | ||
|
||
function countdownify(secs) { | ||
var names = ['day', 'hour', 'minute', 'second']; | ||
return $.map([secs / 86400, secs % 86400 / 3600, secs % 3600 / 60, secs % 60], function(num, i) { | ||
return [Math.floor(num), pluralize(names[i], num)]; | ||
}).join(' '); | ||
} | ||
|
||
function pluralize(str, count) { | ||
return str + (parseInt(count) !== 1 ? 's' : ''); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
@font-face | ||
font-family "04b_03" | ||
src url(/fonts/04B_03__.TTF) | ||
|
||
header, footer | ||
display block | ||
|
||
body | ||
font-family "04b_03", monospace | ||
text-align center | ||
background hsl(200, 30%, 95%) url('/images/noise.png') repeat | ||
text-shadow 0px 1px 0px hsla(0, 100%, 100%, 0.6) | ||
|
||
a:link, a:visited | ||
color hsl(200, 30%, 60%) | ||
|
||
header | ||
h1 | ||
font-size 72pt | ||
word-spacing -0.5ex | ||
.ko | ||
background-color black | ||
color white | ||
text-shadow 0px 2px 0px hsla(0, 100%, 100%, 0.5) | ||
padding 10px 10px 0 25px | ||
border-radius 2px | ||
border solid 1px hsla(0, 100%, 100%, 0.5) | ||
|
||
h2 | ||
margin 2em | ||
.dates | ||
font-size 32pt | ||
#countdown | ||
margin 0.5em | ||
|
||
footer | ||
margin-top 5em | ||
li | ||
display inline-block | ||
margin 0 1ex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
header | ||
h1 | ||
| node.js | ||
span.ko ko | ||
|
||
h3 | ||
| node.js knockout is a 48-hour coding contest using | ||
a( href: 'http://nodejs.org' ) node.js | ||
|
||
h2 | ||
| node.js knockout 2011 will be | ||
.dates | ||
time.start( datetime: '2011-08-27T00:00:00Z' ) August 27 | ||
| — | ||
time.end( datetime: '2011-08-28T00:00:00Z' ) August 28, 2011 | ||
#countdown | ||
|
||
.now-what | ||
| What do I do until then? | ||
a( href: '#' ) See last year's winners | ||
| or | ||
a( href: '#' ) follow us on Twitter | ||
|
||
footer | ||
ul | ||
li: a( href: 'http://twitter.com/node_knockout' ) @node_knockout | ||
li: a( href: 'mailto:all@nodeknockout.com' ) all@nodeknockout.com | ||
li: a( href: 'http://blog.nodeknockout.com' ) blog | ||
li: a( href: 'http://2010.nodeknockout.com' ) 2010 website | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
!!! 5 | ||
html | ||
head | ||
meta( charset: 'utf-8' ) | ||
meta( http-equiv: 'X-UA-Compatible', content: 'IE=edge,chrome=1' ) | ||
title node.js knockout | ||
link( rel: 'stylesheet', href: '/stylesheets/application.css' ) | ||
body | ||
!= body | ||
script( type: 'text/javascript', src: '//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js' ) | ||
script( type: 'text/javascript', src: '/javascripts/application.js' ) |