From ba881b059f83d8d92231db550f858cbc9147c5c8 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 5 Aug 2014 20:44:31 +0100 Subject: [PATCH] Updating Casper's use of title and author helpers Related to TryGhost/Ghost#3599 and TryGhost/Ghost#3389 - The title helper no longer needs triple-stashes to be safe - The #author can now be used as a context block again --- author.hbs | 44 ++++++++++++++++++++++++-------------------- page.hbs | 3 ++- post.hbs | 14 +++++++------- 3 files changed, 33 insertions(+), 28 deletions(-) diff --git a/author.hbs b/author.hbs index b1356e5..b94cdfb 100644 --- a/author.hbs +++ b/author.hbs @@ -2,27 +2,31 @@ {{! The tag above means - insert everything in this file into the {body} of the default.hbs template }} {{! The big featured header }} -
- -
-
- {{#if author.image}} -
-
-
- {{/if}} -

{{author.name}}

-

{{author.bio}}

-
- {{#if author.location}}{{author.location}}{{/if}} - {{#if author.website}}{{author.website}}{{/if}} - {{plural pagination.total empty='No posts' singular='% post' plural='% posts'}} -
-
+{{! Everything inside the #author tags pulls data from the author }} +{{#author}} +
+ +
+ +
+ {{#if image}} +
+
+
+ {{/if}} +

{{name}}

+

{{bio}}

+
+ {{#if location}}{{location}}{{/if}} + {{#if website}}{{website}}{{/if}} + {{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}} +
+
+{{/author}} {{! The main content area on the homepage }}
diff --git a/page.hbs b/page.hbs index 65cb102..e15d599 100644 --- a/page.hbs +++ b/page.hbs @@ -11,9 +11,10 @@
+ {{! Everything inside the #post tags pulls data from the post }} {{#post}} -

{{{title}}}

+

{{title}}

{{content}} diff --git a/post.hbs b/post.hbs index 1e1610a..3d19770 100644 --- a/post.hbs +++ b/post.hbs @@ -15,9 +15,9 @@ {{#post}}
-

{{{title}}}

+

{{title}}

@@ -26,9 +26,9 @@