{{!-- Parameters: * feed (index, home, archive, recent) * postFeedStyle (list, grid) * showTitle (true, false) * showSidebar (true, false) --}}
{{#if showTitle}}

{{#unless title}}Latest{{else}}{{title}}{{/unless}}

{{/if}}
{{#match feed "home"}} {{#match @custom.header_style "Highlight"}} {{#match posts.length ">=" 10}} {{#if @custom.highlight_featured_posts}} {{#get "posts" include="authors" limit="16"}} {{#foreach posts from="5" limit="12"}} {{> "post-card"}} {{/foreach}} {{/get}} {{else}} {{#get "posts" include="authors" limit="22"}} {{#foreach posts from="11" limit="12"}} {{> "post-card"}} {{/foreach}} {{/get}} {{/if}} {{else}} {{#get "posts" include="authors" limit="12"}} {{#foreach posts}} {{> "post-card"}} {{/foreach}} {{/get}} {{/match}} {{else match @custom.header_style "Magazine"}} {{#match posts.length ">=" 7}} {{#get "posts" include="authors" limit="19"}} {{#foreach posts from="8" limit="12"}} {{> "post-card"}} {{/foreach}} {{/get}} {{else}} {{#get "posts" include="authors" limit="12"}} {{#foreach posts}} {{> "post-card"}} {{/foreach}} {{/get}} {{/match}} {{else}} {{#get "posts" include="authors" limit="12"}} {{#foreach posts}} {{> "post-card"}} {{/foreach}} {{/get}} {{/match}} {{/match}} {{#match feed "index"}} {{#match pagination.page 2}} {{#get "posts" include="authors" limit=@config.posts_per_page as |recent|}} {{#foreach recent}} {{> "post-card"}} {{/foreach}} {{/get}} {{/match}} {{#foreach posts}} {{> "post-card"}} {{/foreach}} {{/match}} {{#match feed "archive"}} {{#foreach posts}} {{> "post-card"}} {{/foreach}} {{/match}} {{#match feed "recent"}} {{#get "posts" include="authors" filter="id:-{{post.id}}" limit="4" as |next|}} {{#foreach next}} {{> "post-card"}} {{/foreach}} {{/get}} {{/match}}
{{#if showSidebar}} {{/if}} {{#match pagination.pages ">" 1}} {{/match}}