Updated number of posts to show on the homepage

This commit is contained in:
Sodbileg Gansukh
2023-09-11 15:16:34 +08:00
parent 4ca2598046
commit 912961abc5
5 changed files with 34 additions and 22 deletions

View File

@@ -22,33 +22,45 @@
{{#match @custom.header_style "Highlight"}}
{{#match posts.length ">=" 10}}
{{#if @custom.highlight_featured_posts}}
{{#foreach posts from="5" limit="12"}}
{{> "post-card"}}
{{/foreach}}
{{#get "posts" limit="16"}}
{{#foreach posts from="5" limit="12"}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
{{else}}
{{#foreach posts from="11" limit="12"}}
{{> "post-card"}}
{{/foreach}}
{{#get "posts" limit="22"}}
{{#foreach posts from="11" limit="12"}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
{{/if}}
{{else}}
{{#foreach posts limit="12"}}
{{> "post-card"}}
{{/foreach}}
{{#get "posts" limit="12"}}
{{#foreach posts}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
{{/match}}
{{else match @custom.header_style "Magazine"}}
{{#match posts.length ">=" 7}}
{{#foreach posts from="8" limit="12"}}
{{> "post-card"}}
{{/foreach}}
{{#get "posts" limit="19"}}
{{#foreach posts from="8" limit="12"}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
{{else}}
{{#foreach posts limit="12"}}
{{> "post-card"}}
{{/foreach}}
{{#get "posts" limit="12"}}
{{#foreach posts}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
{{/match}}
{{else}}
{{#foreach posts limit="12"}}
{{> "post-card"}}
{{/foreach}}
{{#get "posts" limit="12"}}
{{#foreach posts}}
{{> "post-card"}}
{{/foreach}}
{{/get}}
{{/match}}
{{/match}}