Permalink
Browse files

Added basic posts list template and static data.

chapter3-1
  • Loading branch information...
tmeasday committed Apr 7, 2013
1 parent ba7d4cd commit 9ceb5f871f230f7527d38e7d3043aa3fe836bf3b
View
@@ -0,0 +1,15 @@
<head>
<title>Microscope</title>
</head>
<body>
<div class="container">
<header class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="/">Microscope</a>
</div>
</header>
<div id="main">
{{> postsList}}
</div>
</div>
</body>
@@ -0,0 +1,7 @@
<template name="postItem">
<div class="post">
<div class="post-content">
<h3><a href="{{url}}">{{title}}</a><span>{{domain}}</span></h3>
</div>
</div>
</template>
@@ -0,0 +1,7 @@
<template name="postsList">
<div class="posts page">
{{#each posts}}
{{> postItem}}
{{/each}}
</div>
</template>
@@ -0,0 +1,17 @@
var postsData = [
{
title: 'Introducing Telescope',
url: 'http://sachagreif.com/introducing-telescope/'
},
{
title: 'Meteor',
url: 'http://meteor.com'
},
{
title: 'The Meteor Book',
url: 'http://themeteorbook.com'
}
];
Template.postsList.helpers({
posts: postsData
});

0 comments on commit 9ceb5f8

Please sign in to comment.