Permalink
Browse files

Implemented 'talk asset' support.

  • Loading branch information...
1 parent f818c4b commit c19498a882f424ed6e76af94bd815a1389ed4208 @akoenig akoenig committed May 17, 2012
View
@@ -40,12 +40,14 @@ var CHAPTER_ROOT = process.env.CHAPTERS || process.cwd(),
repo = new Repository(CHAPTER_ROOT);
// Configuration
+console.log(CHAPTER_ROOT);
app.configure(function(){
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(__dirname + '/app/public'));
+ app.use(express.static(CHAPTER_ROOT));
});
app.configure('development', function(){
@@ -21,6 +21,16 @@ <h2><%= topic.type%></h2>
</header>
<p><%= topic.description %></p>
+
+ <% if (topic.assets) { %>
+ <ul class="assets">
+ <% topic.assets.forEach(function(asset) { %>
+ <li class="<%= asset.type %>">
+ <a href="<%= asset.url %>"><%= asset.name %></a>
+ </li>
+ <% }); %>
+ </ul>
+ <% } %>
</section>
<% }); %>
</div>
Oops, something went wrong.

0 comments on commit c19498a

Please sign in to comment.