This file contains hidden or 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
http = require 'http' | |
url = require 'url' | |
fs = require 'fs' | |
path = require 'path' | |
server = http.createServer (req, resp) -> | |
uri = url.parse req.url, yes | |
query = uri.queryString | |
filepath = path.normalize uri.pathname |
This file contains hidden or 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
class FileFactory | |
constructor: (webroot = "webroot") -> | |
@webroot = webroot | |
file: (filepath) -> | |
type = path.extname(filepath).substr 1, path.extname(filepath).length | |
switch type | |
when 'html' then new HtmlFile path.join(@webroot, filepath), 'text/html' | |
else new File path.join(@webroot, filepath), null |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Semantic Markup</title> | |
</head> | |
<body> | |
<section> | |
<article>...</article> | |
<sidebar>...</sidebar> | |
</section> |
This file contains hidden or 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
/* -- variables -- */ | |
var_grid_width = 960px | |
var_grid_gutter = 20px | |
var_grid_columns = 12 | |
/* -- mixins -- */ | |
container() | |
width var_grid_width | |
margin-left auto | |
margin-right auto |
This file contains hidden or 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
/* -- variables -- */ | |
var_grid_width = 960px | |
var_grid_gutter = 20px | |
var_grid_columns = 12 |
This file contains hidden or 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
.grid_1, | |
.grid_2, | |
.grid_3, | |
.grid_4, | |
.grid_5, | |
.grid_6, | |
.grid_7, | |
.grid_8, | |
.grid_9, | |
.grid_10, |