You've already forked Ghost-Theme-Source
Fixed missing posts issue on the homepage
ref DES-221
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1594,7 +1594,7 @@ Search LOGO Login Subscribe
|
||||
grid-column: span 12;
|
||||
}
|
||||
|
||||
.home-template .gh-more {
|
||||
.home-template .gh-feed:has(> :nth-child(12):last-child) ~ .gh-more {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ function pagination(isInfinite = true, done, isMasonry = false) {
|
||||
if (!feedElement) return;
|
||||
|
||||
let loading = false;
|
||||
const target = feedElement.nextElementSibling || document.querySelector('.gh-footer');
|
||||
const target = document.querySelector('.gh-footer');
|
||||
const buttonElement = document.querySelector('.gh-loadmore');
|
||||
|
||||
if (!document.querySelector('link[rel=next]') && buttonElement) {
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"defaults"
|
||||
],
|
||||
"config": {
|
||||
"posts_per_page": 16,
|
||||
"posts_per_page": 12,
|
||||
"image_sizes": {
|
||||
"xs": {
|
||||
"width": 160
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
{{#if @custom.show_featured_posts}}
|
||||
{{#match posts.length ">=" 4}}
|
||||
{{#get "posts" include="authors" limit="16"}}
|
||||
{{#foreach posts from="5" limit="12"}}
|
||||
{{#foreach posts from="5"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
@@ -32,7 +32,7 @@
|
||||
{{else}}
|
||||
{{#match posts.length ">=" 10}}
|
||||
{{#get "posts" include="authors" limit="22"}}
|
||||
{{#foreach posts from="11" limit="12"}}
|
||||
{{#foreach posts from="11"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
@@ -41,7 +41,7 @@
|
||||
{{else match @custom.header_style "Magazine"}}
|
||||
{{#match posts.length ">=" 7}}
|
||||
{{#get "posts" include="authors" limit="19"}}
|
||||
{{#foreach posts from="8" limit="12"}}
|
||||
{{#foreach posts from="8"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
@@ -77,6 +77,12 @@
|
||||
{{/match}}
|
||||
|
||||
</div>
|
||||
|
||||
{{#match pagination.pages ">" 1}}
|
||||
<div class="gh-more is-title">
|
||||
<a href="{{@site.url}}/page/2">See all {{> "icons/arrow"}}</a>
|
||||
</div>
|
||||
{{/match}}
|
||||
</main>
|
||||
|
||||
{{#if showSidebar}}
|
||||
@@ -113,11 +119,5 @@
|
||||
</aside>
|
||||
{{/if}}
|
||||
|
||||
{{#match pagination.pages ">" 1}}
|
||||
<div class="gh-more is-title">
|
||||
<a href="{{@site.url}}/page/2">See all {{> "icons/arrow"}}</a>
|
||||
</div>
|
||||
{{/match}}
|
||||
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user