Add tag mgmt support to Casper

This commit is contained in:
John O'Nolan 2014-12-23 13:50:59 +02:00
parent dbaaf955af
commit 969a20ef6d
2 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,4 @@
{
"name": "Casper",
"version": "1.1.3"
"version": "1.1.4"
}

13
tag.hbs
View File

@ -1,8 +1,8 @@
{{!< default}}
{{! The tag above means - insert everything in this file into the {body} of the default.hbs template }}
{{! The big featured header }}
<header class="main-header tag-head {{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}">
{{! If we have a tag cover, display that - else blog cover - else nothing }}
<header class="main-header tag-head {{#if tag.image}}" style="background-image: url({{tag.image}}){{else}}{{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}{{/if}}">
<nav class="main-nav overlay clearfix">
<a class="back-button icon-arrow-left" href="{{@blog.url}}">Home</a>
<a class="subscribe-button icon-feed" href="{{@blog.url}}/tag/{{tag.slug}}/rss/">{{tag.name}}</a>
@ -10,7 +10,12 @@
<div class="vertical">
<div class="main-header-content inner">
<h1 class="page-title">{{tag.name}}</h1>
<h2 class="page-description">A {{pagination.total}}-post collection</h2>
<h2 class="page-description">
{{#if tag.description}}
{{tag.description}}
{{else}}
A {{pagination.total}}-post collection</h2>
{{/if}}
</div>
</div>
</header>
@ -21,4 +26,4 @@
{{! The tag below includes the post loop - partials/loop.hbs }}
{{> "loop"}}
</main>
</main>