Skip to content

Commit

Permalink
Consolidated loaded styles into a single template field
Browse files Browse the repository at this point in the history
  • Loading branch information
jdan committed Oct 12, 2013
1 parent e3ea4d5 commit 305e780
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 6 additions & 3 deletions lib/cleaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,17 @@ Cleaver.prototype._renderSlideshow = function () {
// TODO: handle defaults gracefully
var title = this.metadata.title || 'Untitled';
var encoding = this.metadata.encoding || 'utf-8';
var style = [
this.resources.loaded.style,
this.resources.loaded.githubStyle,
this.external.loaded.style
].join('\n');

var layoutData = {
slideshow: slideshow,
title: title,
encoding: encoding,
style: this.resources.loaded.style,
githubStyle: this.resources.loaded.githubStyle,
externalStyle: this.external.loaded.style
style: style
};

// Render the main layout
Expand Down
2 changes: 0 additions & 2 deletions templates/layout.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
<title>{{title}}</title>
<style type="text/css">
{{{style}}}
{{{githubStyle}}}
{{{externalStyle}}}
</style>
</head>
<body>
Expand Down

0 comments on commit 305e780

Please sign in to comment.