Skip to content

Commit 701b60f

Browse files
Show the recent posts section only when there are some
1 parent 26d1610 commit 701b60f

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

partials/components/post-list.hbs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@
7676
{{/foreach}}
7777
{{/match}}
7878

79-
{{!-- Recent posts --}}
80-
{{#match feed "recent"}}
81-
{{#get "posts" include="authors" filter="id:-{{post.id}}" limit="4" as |next|}}
82-
{{#foreach next}}
83-
{{> "post-card" lazyLoad=true}}
84-
{{/foreach}}
85-
{{/get}}
86-
{{/match}}
87-
8879
</div>
8980
</main>
9081

post.hbs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,17 @@
6060

6161
{{/post}}
6262

63-
{{> "components/post-list" feed="recent" postFeedStyle="Grid" title="Read more" showTitle=true showSidebar=false}}
63+
{{#get "posts" include="authors" filter="id:-{{post.id}}" limit="4" as |next|}}
64+
{{#if next}}
65+
<section class="gh-container is-grid gh-outer">
66+
<div class="gh-container-inner gh-inner">
67+
<h2 class="gh-container-title">Read more</h2>
68+
<div class="gh-feed">
69+
{{#foreach next}}
70+
{{> "post-card" lazyLoad=true}}
71+
{{/foreach}}
72+
</div>
73+
</div>
74+
</section>
75+
{{/if}}
76+
{{/get}}

0 commit comments

Comments
 (0)