Added descriptive handlebars comments to help new developers
This commit is contained in:
parent
d93a50d48b
commit
2ef2ff68bf
12
index.hbs
12
index.hbs
|
@ -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,10 +14,12 @@
|
|||
</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}}">
|
||||
<header class="post-header">
|
||||
<span class="post-meta"><time datetime="{{date published_at format='YYYY-MM-DD'}}">{{date published_at format='DD MMM YYYY'}}</time> in <a href="#">What I Learned Building...</a></span>
|
||||
|
@ -26,6 +32,8 @@
|
|||
</article>
|
||||
|
||||
{{/foreach}}
|
||||
|
||||
|
||||
{{!! After all the posts, we have the previous/next pagination links }}
|
||||
{{pagination}}
|
||||
|
||||
</main>
|
14
post.hbs
14
post.hbs
|
@ -1,20 +1,24 @@
|
|||
{{!< default}}
|
||||
|
||||
<main class="content" role="main">
|
||||
{{! 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>
|
||||
|
||||
|
||||
<section class="post-content">
|
||||
{{content}}
|
||||
|
|
Loading…
Reference in New Issue