Added descriptive handlebars comments to help new developers

This commit is contained in:
John O'Nolan 2013-09-01 17:02:37 +02:00 committed by Hannah Wolfe
parent d93a50d48b
commit 2ef2ff68bf
2 changed files with 19 additions and 7 deletions

View File

@ -1,5 +1,9 @@
{{!< default}}
{{! The comment above "< default" means - insert everything in this file into
the {body} of the default.hbs template, which contains our header/footer. }}
{{! The big featured header on the homepage, with the site logo and description }}
<header id="site-head">
<div class="vertical">
<div id="site-head-content">
@ -10,8 +14,10 @@
</div>
</header>
{{! The main content area on the homepage }}
<main class="content" role="main">
{{! Each post will be output using this markup }}
{{#foreach posts}}
<article class="{{post_class}}">
@ -27,5 +33,7 @@
{{/foreach}}
{{!! After all the posts, we have the previous/next pagination links }}
{{pagination}}
</main>

View File

@ -1,20 +1,24 @@
{{!< default}}
{{! The comment above "< default" means - insert everything in this file into
the {body} of the default.hbs template, which contains our header/footer. }}
<main class="content" role="main">
{{! Everything inside the #post tags is the template used to ourput the post }}
{{#post}}
<article class="{{post_class}}">
{{! Each post has the blog logo at the top, with a link back to the homage page }}
<header class="post-header">
<a id="blog-logo" href="{{../settings.url}}"><img src="assets/img/user.png" alt="" /></a>
</header>
{{! Everything below outputs content of the the post which has been published }}
<span class="post-meta"><time datetime="{{date published_at format='YYYY-MM-DD'}}">{{date published_at format='DD MMM YYYY'}}</time> on <a href="#">What I Learned Building...</a></span>
<h1 class="post-title">{{title}}</h1>
<h1 class="post-title">{{title}}</h1>
<section class="post-content">
{{content}}