Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote branch 'origin/spike_v1'
- Loading branch information
Showing
6 changed files
with
114 additions
and
9 deletions.
There are no files selected for viewing
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,37 @@ | ||
var | ||
path = require('path'), | ||
http = require('http'), | ||
paperboy = require('paperboy'), | ||
PORT = 80, | ||
WEBROOT = path.join(path.dirname(__filename), 'web'); | ||
|
||
http.createServer(function(req, res) { | ||
var ip = req.connection.remoteAddress; | ||
|
||
paperboy | ||
.deliver(WEBROOT, req, res) | ||
.addHeader('Expires', 300) | ||
.before(function() { | ||
console.log('Received Request'); | ||
}) | ||
.after(function(statCode) { | ||
log(statCode, req.url, ip); | ||
}) | ||
.error(function(statCode, msg) { | ||
res.writeHead(statCode, {'Content-Type': 'text/plain'}); | ||
res.end("Error " + statCode) | ||
log(statCode, req.url, ip, msg) | ||
}) | ||
.otherwise(function(err) { | ||
res.writeHead(404, {'Content-Type': 'text/plain'}); | ||
res.end("Error 404: File not found"); | ||
log(404, req.url, ip, err); | ||
}); | ||
}).listen(PORT); | ||
|
||
function log(statCode, url, ip, err) { | ||
var logStr = statCode + ' _ ' + url + ' - ' + ip; | ||
if (err) | ||
logStr += ' - ' + err; | ||
console.log(logStr); | ||
} |
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,41 @@ | ||
body { | ||
color: #888; | ||
font-family: 'Ubuntu', arial, serif; | ||
text-align: center; | ||
} | ||
|
||
h1, h3 { | ||
text-shadow: 2px 2px 2px #CCC; | ||
color: #555; | ||
} | ||
|
||
h3 { | ||
font-style: italic; | ||
} | ||
|
||
p { | ||
margin-top: 100px; | ||
} | ||
|
||
table.grid { | ||
border: 2px solid #555; | ||
border-collapse: collapse; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
table.grid td { | ||
border: 1px solid #CCC; | ||
height: 100px; | ||
width: 150px; | ||
} | ||
|
||
.block { | ||
height: 100%; | ||
padding: 5px; | ||
text-align: center; | ||
} | ||
|
||
.filled { | ||
background-color: #D3E3D5; | ||
} |
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 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Bacobahnen</title> | ||
<meta charset="utf-8" /> | ||
<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'> | ||
<link rel="stylesheet" href="css/main.css" /> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" charset="utf-8"></script> | ||
<script src="js/main.js" charset="utf-8"></script> | ||
</head> | ||
<body> | ||
<h1>Bacobahnen</h1> | ||
<h3><u>The</u> Digital Whiteboard</h3> | ||
<table id="board" class="grid center"> | ||
<tbody> | ||
<tr><td></td><td></td><td></td><td></td><td></td></tr> | ||
<tr><td></td><td></td><td></td><td></td><td></td></tr> | ||
<tr><td></td><td></td><td></td><td></td><td></td></tr> | ||
<tr><td></td><td></td><td></td><td></td><td></td></tr> | ||
<tr><td></td><td></td><td></td><td></td><td></td></tr> | ||
</tbody> | ||
</table> | ||
<p><a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Bacobahnen</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/benjaminplee/Bacobahnen" property="cc:attributionName" rel="cc:attributionURL">Benjamin Lee & Matt Erker</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="https://github.com/benjaminplee/Bacobahnen" rel="dct:source">github.com</a>.</p> | ||
<a href="https://github.com/benjaminplee/Bacobahnen"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a> | ||
</body> | ||
</html> | ||
|
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,9 @@ | ||
$(function() { | ||
|
||
$('#board td').append("<div class='block' contentEditable='true'></div>") | ||
|
||
$('.block').keyup( function() { | ||
$(this).toggleClass('filled', !!$(this).text().trim()) | ||
}) | ||
|
||
}) |