Show the recent posts section only when there are some
This commit is contained in:
parent
26d1610ef5
commit
701b60f2c9
@ -76,15 +76,6 @@
|
|||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{/match}}
|
{{/match}}
|
||||||
|
|
||||||
{{!-- Recent posts --}}
|
|
||||||
{{#match feed "recent"}}
|
|
||||||
{{#get "posts" include="authors" filter="id:-{{post.id}}" limit="4" as |next|}}
|
|
||||||
{{#foreach next}}
|
|
||||||
{{> "post-card" lazyLoad=true}}
|
|
||||||
{{/foreach}}
|
|
||||||
{{/get}}
|
|
||||||
{{/match}}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
15
post.hbs
15
post.hbs
@ -60,4 +60,17 @@
|
|||||||
|
|
||||||
{{/post}}
|
{{/post}}
|
||||||
|
|
||||||
{{> "components/post-list" feed="recent" postFeedStyle="Grid" title="Read more" showTitle=true showSidebar=false}}
|
{{#get "posts" include="authors" filter="id:-{{post.id}}" limit="4" as |next|}}
|
||||||
|
{{#if next}}
|
||||||
|
<section class="gh-container is-grid gh-outer">
|
||||||
|
<div class="gh-container-inner gh-inner">
|
||||||
|
<h2 class="gh-container-title">Read more</h2>
|
||||||
|
<div class="gh-feed">
|
||||||
|
{{#foreach next}}
|
||||||
|
{{> "post-card" lazyLoad=true}}
|
||||||
|
{{/foreach}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{{/if}}
|
||||||
|
{{/get}}
|
Loading…
Reference in New Issue
Block a user