[Documentation] Add styling

This commit is contained in:
Victor Woeltjen 2015-10-29 12:30:13 -07:00
parent df3b0bd6fb
commit dd83662e0f
3 changed files with 23 additions and 5 deletions

9
docs/footer.html Normal file
View File

@ -0,0 +1,9 @@
<hr>
<cite>
This document is styled using
<a href="https://github.com/jasonm23/markdown-css-themes">
https://github.com/jasonm23/markdown-css-themes
</a>.
</cite>
</body>
</html>

View File

@ -20,7 +20,7 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global require,process,GLOBAL*/
/*global require,process,__dirname,GLOBAL*/
/*jslint nomen: false */
@ -47,6 +47,8 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
nomnoml = require('nomnoml'),
toc = require("markdown-toc"),
Canvas = require('canvas'),
header = fs.readFileSync(path.resolve(__dirname, 'header.html')),
footer = fs.readFileSync(path.resolve(__dirname, 'footer.html')),
options = require("minimist")(process.argv.slice(2));
// Convert from nomnoml source to a target PNG file.
@ -115,9 +117,9 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
// Prepend table of contents
markdown =
[ TOC_HEAD, toc(markdown).content, "", markdown ].join("\n");
this.push("<html><body>\n");
this.push(header);
this.push(marked(markdown));
this.push("\n</body></html>\n");
this.push(footer);
done();
};
return transform;

7
docs/header.html Normal file
View File

@ -0,0 +1,7 @@
<html>
<head>
<link rel="stylesheet"
href="http://jasonm23.github.io/markdown-css-themes/avenir-white.css">
</head>
<body>