Skip to content

Commit

Permalink
reading slideshow's title from JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
jdan committed Oct 7, 2012
1 parent 859b5f6 commit b901f87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 100 deletions.
2 changes: 1 addition & 1 deletion lib/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports.render = function(json, options) {

fs.readFile('templates/layout.mustache', 'utf8', function(err, data) {
if (err) throw err;
var output = mustache.render(data, { slides: renders });
var output = mustache.render(data, { slides: renders, title: json.name });
if (options.debug) {
console.log(output);
} else {
Expand Down
100 changes: 1 addition & 99 deletions templates/layout.mustache
Original file line number Diff line number Diff line change
@@ -1,105 +1,7 @@
<html>
<head>
<title>Test</title>
<title>{{title}}</title>
<style type="text/css">
body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: #444;
background-color: #aaa;
}
#wrapper {
width: 850px;
height: 600px;
overflow: hidden;
margin: 80px auto 0 auto;
box-shadow: 3px 3px 3px #666;
background-color: #eee;
}
section.slide {
width: auto;
height: 540px;
padding: 30px;
}
section.slide.main h1.title {
font-size: 100px;
text-align: center;
margin-top: 150px;
margin-bottom: 30px;
}
section.slide.main h2.subtitle {
font-size: 30px;
text-align: center;
font-weight: 200;
}
section.slide.text h1.title {
font-size: 45px;
border-bottom: 1px solid #aaa;
margin: 0;
padding-bottom: 15px;
}
section.slide.text article.content {
padding-top: 20px;
font-weight: 200;
font-size: 32px;
line-height: 44px;
}
section.slide.list h1.title {
font-size: 45px;
border-bottom: 1px solid #aaa;
margin: 0;
padding-bottom: 15px;
}
section.slide.list ul.items {
padding: 20px 0 0 60px;
font-weight: 200;
font-size: 32px;
line-height: 44px;
}
section.slide.author h1.name {
font-size: 55px;
font-weight: 200px;
text-align: center;
margin-top: 135px;
margin-bottom: 30px;
}
section.slide.author h3 {
font-weight: 100;
text-align: center;
font-size: 30px;
}
a {
text-decoration: none;
color: #44a4dd;
}
a:hover {
color: #66b5ff;
}
pre, code {
background-color: #ccc;
}
pre {
padding: 10px;
font-size: 20px;
line-height: 28px;
}
.hidden {
display: none;
}
</style>
</head>
<body>
Expand Down

0 comments on commit b901f87

Please sign in to comment.