Added descriptive handlebars comments to help new developers
This commit is contained in:
parent
d93a50d48b
commit
2ef2ff68bf
2 changed files with 19 additions and 7 deletions
|
@ -1,5 +1,9 @@
|
||||||
{{!< default}}
|
{{!< 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">
|
<header id="site-head">
|
||||||
<div class="vertical">
|
<div class="vertical">
|
||||||
<div id="site-head-content">
|
<div id="site-head-content">
|
||||||
|
@ -10,8 +14,10 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
{{! The main content area on the homepage }}
|
||||||
<main class="content" role="main">
|
<main class="content" role="main">
|
||||||
|
|
||||||
|
{{! Each post will be output using this markup }}
|
||||||
{{#foreach posts}}
|
{{#foreach posts}}
|
||||||
|
|
||||||
<article class="{{post_class}}">
|
<article class="{{post_class}}">
|
||||||
|
@ -27,5 +33,7 @@
|
||||||
|
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
||||||
|
{{!! After all the posts, we have the previous/next pagination links }}
|
||||||
{{pagination}}
|
{{pagination}}
|
||||||
|
|
||||||
</main>
|
</main>
|
10
post.hbs
10
post.hbs
|
@ -1,20 +1,24 @@
|
||||||
{{!< default}}
|
{{!< 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">
|
<main class="content" role="main">
|
||||||
|
|
||||||
|
{{! Everything inside the #post tags is the template used to ourput the post }}
|
||||||
{{#post}}
|
{{#post}}
|
||||||
|
|
||||||
<article class="{{post_class}}">
|
<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">
|
<header class="post-header">
|
||||||
|
|
||||||
<a id="blog-logo" href="{{../settings.url}}"><img src="assets/img/user.png" alt="" /></a>
|
<a id="blog-logo" href="{{../settings.url}}"><img src="assets/img/user.png" alt="" /></a>
|
||||||
|
|
||||||
</header>
|
</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>
|
<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">
|
<section class="post-content">
|
||||||
{{content}}
|
{{content}}
|
||||||
|
|
Loading…
Reference in a new issue