Whatever pass I lost count

This commit is contained in:
John O'Nolan
2017-06-12 10:01:00 +01:00
parent d55446f2ca
commit 55f35da8e9
12 changed files with 121 additions and 125 deletions

View File

@ -9,6 +9,8 @@ into the {body} of the default.hbs template --}}
<div class="site-nav-left">
{{#if @blog.logo}}
<a class="site-nav-logo" href="{{@blog.url}}"><img src="{{@blog.logo}}" alt="{{@blog.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{@blog.url}}">{{@blog.title}}</a>
{{/if}}
{{#if @blog.navigation}}
{{!-- The blog navigation links from /ghost/settings/design --}}
@ -137,77 +139,36 @@ into the {body} of the default.hbs template --}}
<div class="read-next-feed">
{{#get "posts" filter="tags:{{tags.[0].slug}}+id:-{{id}}" limit="3"}}
<article class="read-next-card"
{{#if ../tags.[0].feature_image}}
style="background-image: url({{../tags.[0].feature_image}})"
{{else}}
{{#if @blog.cover_image}}
style="background-image: url({{@blog.cover_image}})"{{/if}}
{{/if}}
>
<header class="read-next-card-header">
<h3 class="read-next-card-header-title">Read more posts like this</h3>
</header>
<div class="read-next-card-content">
<ol>
{{#foreach posts}}
<li><a href="{{url}}">{{title}}</a></li>
{{/foreach}}
</ol>
</div>
</article>
<article class="read-next-card"
{{#if ../tags.[0].feature_image}}
style="background-image: url({{../tags.[0].feature_image}})"
{{else}}
{{#if @blog.cover_image}}
style="background-image: url({{@blog.cover_image}})"{{/if}}
{{/if}}
>
<header class="read-next-card-header">
<h3 class="read-next-card-header-title">Read more posts like this</h3>
</header>
<div class="read-next-divider">{{> "icons/infinity"}}</div>
<div class="read-next-card-content">
<ol>
{{#foreach posts}}
<li><a href="{{url}}">{{title}}</a></li>
{{/foreach}}
</ol>
</div>
</article>
{{/get}}
{{!-- If there's a next post, display it using the same markup included from - partials/post-card.hbs --}}
{{#next_post}}
<article class="post-card {{post_class}}">
{{#if feature_image}}
<a class="post-card-image-link" href="{{url}}">
<div class="post-card-image" style="background-image: url({{feature_image}})"></div>
</a>
{{/if}}
<div class="post-card-content">
<a class="post-card-content-link" href="{{url}}">
<header class="post-card-header">
<h2 class="post-card-title">{{title}}</h2>
</header>
<section class="post-card-excerpt">
<p>{{excerpt words="28"}}</p>
</section>
</a>
<footer class="post-card-meta">
{{#if author_image}}<img class="author-thumb" src="{{author_image}}" alt="{{author.name}}" nopin="nopin" />{{/if}}
{{author}}
{{tags prefix=" on "}}
<time class="post-card-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMMM YYYY"}}</time>
</footer>
</div>
</article>
{{> "post-card"}}
{{/next_post}}
{{!-- If there's a previous post, display it using the same markup included from - partials/post-card.hbs --}}
{{#prev_post}}
<article class="post-card {{post_class}}">
{{#if feature_image}}
<a class="post-card-image-link" href="{{url}}">
<div class="post-card-image" style="background-image: url({{feature_image}})"></div>
</a>
{{/if}}
<div class="post-card-content">
<a class="post-card-content-link" href="{{url}}">
<header class="post-card-header">
<h2 class="post-card-title">{{title}}</h2>
</header>
<section class="post-card-excerpt">
<p>{{excerpt words="28"}}</p>
</section>
</a>
<footer class="post-card-meta">
{{#if author_image}}<img class="author-thumb" src="{{author_image}}" alt="{{author.name}}" nopin="nopin" />{{/if}}
{{author}}
{{tags prefix=" on "}}
<time class="post-card-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMMM YYYY"}}</time>
</footer>
</div>
</article>
{{> "post-card"}}
{{/prev_post}}
</div>