Skip to content

Commit

Permalink
Added basic styling based on normalize.css.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikl committed Mar 15, 2012
1 parent e860911 commit 4c72dc7
Show file tree
Hide file tree
Showing 5 changed files with 532 additions and 2 deletions.
12 changes: 11 additions & 1 deletion lib/index.js
Expand Up @@ -12,9 +12,18 @@ var outputData = {};
// Collect static assets and precompile templates.
var prepareOutput = function () {
var mediaPath = path.join(__dirname, '..', 'media'),
templateFile = path.join(mediaPath, 'templates', 'index.jade');
templateFile = path.join(mediaPath, 'templates', 'index.jade'),
monolith = require('monolith').init({
minify: true
});

monolith.addCSSFile(path.join(mediaPath, "css", "normalize.css"));
monolith.addCSSFile(path.join(mediaPath, "css", "razdraz.css"));

outputData.css = monolith.getCSS();
outputData.scripts = monolith.getScript();
outputData.pageTemplate = jade.compile(fs.readFileSync(templateFile, 'utf-8'));

};

// Capitalise a word.
Expand All @@ -29,6 +38,7 @@ module.exports.page = function (words) {
}

return outputData.pageTemplate({
css: outputData.css,
footerContent: app.config.get('text:footer'),
language: app.config.get('text:language'),
message: words.join(" "),
Expand Down

0 comments on commit 4c72dc7

Please sign in to comment.