From fbfec0cde1c7f84fe138662345863444e72ac437 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Sun, 14 Apr 2019 20:41:25 +0200 Subject: [PATCH] Code documented --- author.hbs | 12 +++++++++++- default.hbs | 4 ++++ error-404.hbs | 7 +++++++ index.hbs | 13 ++++++++++++- page-authors.hbs | 10 +++++++++- page.hbs | 11 ++++++++++- partials/footer.hbs | 4 ++++ partials/header.hbs | 4 ++++ partials/hero.hbs | 5 +++++ partials/loop.hbs | 2 ++ partials/navigation.hbs | 5 +++++ partials/pagination.hbs | 4 ++++ partials/search.hbs | 6 ++++++ partials/subscribe_form.hbs | 5 +++++ post.hbs | 16 +++++++++++++++- subscribe.hbs | 6 ++++++ tag.hbs | 12 +++++++++++- 17 files changed, 120 insertions(+), 6 deletions(-) diff --git a/author.hbs b/author.hbs index 099dc47..ccd88bd 100644 --- a/author.hbs +++ b/author.hbs @@ -1,9 +1,17 @@ +{{!-- +This template is used for the author page. +--}} + +{{!-- The tag below means: insert everything in this file +into the {body} of the default.hbs template --}} {{!< default}}
+ {{!-- Everything inside the #author tags pulls data from the author --}} {{#author}} + {{!--Special header.hbs partial to generate the
tag--}} {{> header background=cover_image}} - + {{!-- Inject styles of the hero image to make it responsive --}} {{> hero background=cover_image}}
{{#if profile_image}} @@ -59,9 +67,11 @@
+ {{!-- The tag below iterates over all the posts --}} {{> "loop"}}
+ {{!-- Links to Previous/Next posts --}} {{pagination}}
diff --git a/default.hbs b/default.hbs index ea0b5ef..05fafdc 100644 --- a/default.hbs +++ b/default.hbs @@ -13,15 +13,19 @@ {{!-- Styles'n'Scripts --}} + {{!-- This #block helper will pull data from the hero partial + to inject styles of the hero image to make it responsive --}} {{{block "herobackground"}}} {{!-- This tag outputs SEO meta+structured data and other important settings --}} {{ghost_head}} + {{!-- This variable is used to make the search form work --}} + {{!-- This script loads the Google fornt asynchronously --}} {{/contentFor}} diff --git a/page-authors.hbs b/page-authors.hbs index 92d6faf..179feca 100644 --- a/page-authors.hbs +++ b/page-authors.hbs @@ -1,9 +1,17 @@ +{{!-- +This template is used for the authors page. +You must first create a page called Authors in the dashboard to enable it. +--}} + +{{!-- The tag below means: insert everything in this file +into the {body} of the default.hbs template --}} {{!< default}} {{#post}}
+ {{!--Special header.hbs partial to generate the
tag--}} {{> header background=feature_image}} - + {{!-- Inject styles of the hero image to make it responsive --}} {{> hero background=feature_image}}

{{title}}

diff --git a/page.hbs b/page.hbs index 8e30a87..c0fb93d 100644 --- a/page.hbs +++ b/page.hbs @@ -1,9 +1,17 @@ +{{!-- +This template is used for the posts that are marked as pages. +--}} + +{{!-- The tag below means: insert everything in this file +into the {body} of the default.hbs template --}} {{!< default}} +{{!-- Everything inside the #post tags pulls data from the post --}} {{#post}}
+ {{!--Special header.hbs partial to generate the
tag--}} {{> header background=feature_image}} - + {{!-- Inject styles of the hero image to make it responsive --}} {{> hero background=feature_image}}

{{title}}

@@ -28,6 +36,7 @@
{{/post}} +{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}} {{#contentFor "scripts"}} {{/contentFor}} diff --git a/partials/footer.hbs b/partials/footer.hbs index 95c14f4..7302b59 100644 --- a/partials/footer.hbs +++ b/partials/footer.hbs @@ -1,3 +1,7 @@ +{{!-- +This footer template is shared across all the pages. +--}} +