Skip to content

Commit

Permalink
User-defined stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
jdan committed Aug 27, 2013
1 parent d667458 commit 8c7e503
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/cleaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ var helper = require('./helper');
function Cleaver(options) {
if (!options.file) throw "!! Please specify a file with the --file option";

// TODO: user-defined style

// TODO: make these constants?
this.templates = {
main: 'layout.mustache',
Expand All @@ -29,10 +27,10 @@ function Cleaver(options) {
};

this.metadata = null;

// data, empty for now
this.document = null;
this.slides = [];

if (options.style) this.external.style = options.style;
}


Expand Down Expand Up @@ -88,6 +86,7 @@ Cleaver.prototype._renderSlideshow = function () {
// TODO: read --nocontrols from argv
controls: true,
style: this.resources.loaded.style,
externalStyle: this.external.loaded.style,
jquery: this.resources.loaded.jquery,
navigation: this.resources.loaded.navigation
};
Expand Down
1 change: 1 addition & 0 deletions templates/layout.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<title>{{title}}</title>
<style type="text/css">
{{{style}}}
{{{externalStyle}}}
</style>
</head>
<body>
Expand Down

0 comments on commit 8c7e503

Please sign in to comment.