From: Neil Smith Date: Sun, 23 Aug 2020 15:59:23 +0000 (+0100) Subject: Added tag page X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=b26b41933237bc40259b6e4751a9ffb26a3551c0;p=editorial.git Added tag page --- diff --git a/default.hbs b/default.hbs index 7bd9528..1330823 100644 --- a/default.hbs +++ b/default.hbs @@ -50,17 +50,8 @@
{{!-- Header --}} - + {{> "header"}} + {{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}} {{{body}}} diff --git a/page-tag.hbs b/page-tag.hbs new file mode 100644 index 0000000..fcd415e --- /dev/null +++ b/page-tag.hbs @@ -0,0 +1,56 @@ +{{!< default}} +{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}} + +{{!-- The big featured header, it uses blog cover image as a BG if available --}} +{{#post}} + +
+ + +
+

{{title}}

+
+ + {{#if feature_image}} +
{{title}}
+ {{/if}} + +
+ {{#get 'tags' limit='all' include='count.posts' order='count.posts desc'}} + {{#foreach tags}} + {{!-- The tag below includes the markup for each tag - partials/tag-card.hbs --}} + {{> "tag-card"}} + {{/foreach}} + {{/get}} +
+ +
+ + + +{{!-- The main content area --}} +{{!-- +
+ +
+
+ {{#get 'tags' limit='all' include='count.posts' order='count.posts desc'}} + {{#foreach tags}} + {{> "tag-card"}} + {{/foreach}} + {{/get}} +
+
+
+--}} +{{/post}} diff --git a/partials/header.hbs b/partials/header.hbs new file mode 100644 index 0000000..42b950e --- /dev/null +++ b/partials/header.hbs @@ -0,0 +1,11 @@ + diff --git a/partials/sidebar.hbs b/partials/sidebar.hbs index b975148..11ad208 100644 --- a/partials/sidebar.hbs +++ b/partials/sidebar.hbs @@ -3,7 +3,7 @@ {{!-- Nav - partials/navigation.hbs --}} {{#if @site.navigation}} - {{navigation}} + {{navigation type="primary"}} {{/if}} {{!-- Recent posts --}} diff --git a/partials/tag-card.hbs b/partials/tag-card.hbs new file mode 100644 index 0000000..5ccfca8 --- /dev/null +++ b/partials/tag-card.hbs @@ -0,0 +1,18 @@ + diff --git a/post.hbs b/post.hbs index a045271..7ab3c18 100644 --- a/post.hbs +++ b/post.hbs @@ -7,8 +7,9 @@ into the {body} of the default.hbs template --}}
- {{date format="MMMM D, YYYY"}} + {{date format="D MMMM YYYY"}} {{tags separator=" , " prefix=" ; tagged in: "}}

{{title}}

+ {{#if custom_excerpt}}

{{custom_excerpt}}

{{/if}} @@ -54,11 +55,29 @@ into the {body} of the default.hbs template --}} - {{!--
- If you want to embed comments, this is a good place to do it! + {{!-- If you want to embed comments, this is a good place to do it! --}} +
+ +
- --}}
{{/post}}