Skip to content

Commit 4af7426

Browse files
Fixed missing posts issue on the homepage
ref DES-221
1 parent d09d421 commit 4af7426

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

assets/built/screen.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/screen.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/source.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/source.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/screen.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ Search LOGO Login Subscribe
15941594
grid-column: span 12;
15951595
}
15961596

1597-
.home-template .gh-more {
1597+
.home-template .gh-feed:has(> :nth-child(12):last-child) ~ .gh-more {
15981598
display: block;
15991599
}
16001600

assets/js/pagination.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function pagination(isInfinite = true, done, isMasonry = false) {
33
if (!feedElement) return;
44

55
let loading = false;
6-
const target = feedElement.nextElementSibling || document.querySelector('.gh-footer');
6+
const target = document.querySelector('.gh-footer');
77
const buttonElement = document.querySelector('.gh-loadmore');
88

99
if (!document.querySelector('link[rel=next]') && buttonElement) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"defaults"
6262
],
6363
"config": {
64-
"posts_per_page": 16,
64+
"posts_per_page": 12,
6565
"image_sizes": {
6666
"xs": {
6767
"width": 160

partials/components/post-list.hbs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
{{#if @custom.show_featured_posts}}
2525
{{#match posts.length ">=" 4}}
2626
{{#get "posts" include="authors" limit="16"}}
27-
{{#foreach posts from="5" limit="12"}}
27+
{{#foreach posts from="5"}}
2828
{{> "post-card" lazyLoad=true}}
2929
{{/foreach}}
3030
{{/get}}
3131
{{/match}}
3232
{{else}}
3333
{{#match posts.length ">=" 10}}
3434
{{#get "posts" include="authors" limit="22"}}
35-
{{#foreach posts from="11" limit="12"}}
35+
{{#foreach posts from="11"}}
3636
{{> "post-card" lazyLoad=true}}
3737
{{/foreach}}
3838
{{/get}}
@@ -41,7 +41,7 @@
4141
{{else match @custom.header_style "Magazine"}}
4242
{{#match posts.length ">=" 7}}
4343
{{#get "posts" include="authors" limit="19"}}
44-
{{#foreach posts from="8" limit="12"}}
44+
{{#foreach posts from="8"}}
4545
{{> "post-card" lazyLoad=true}}
4646
{{/foreach}}
4747
{{/get}}
@@ -77,6 +77,12 @@
7777
{{/match}}
7878

7979
</div>
80+
81+
{{#match pagination.pages ">" 1}}
82+
<div class="gh-more is-title">
83+
<a href="{{@site.url}}/page/2">See all {{> "icons/arrow"}}</a>
84+
</div>
85+
{{/match}}
8086
</main>
8187

8288
{{#if showSidebar}}
@@ -113,11 +119,5 @@
113119
</aside>
114120
{{/if}}
115121

116-
{{#match pagination.pages ">" 1}}
117-
<div class="gh-more is-title">
118-
<a href="{{@site.url}}/page/2">See all {{> "icons/arrow"}}</a>
119-
</div>
120-
{{/match}}
121-
122122
</div>
123123
</section>

0 commit comments

Comments
 (0)