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

{{#unless title}} {{#match feed "agenda"}} {{t "Agenda"}} {{else}} {{t "Latest"}} {{/match}} {{else}} {{title}} {{/unless}}

{{/if}}
{{!-- Homepage --}} {{#match feed "home"}} {{#match @custom.header_style "Highlight"}} {{#if @custom.show_featured_posts}} {{#match posts.length ">=" 4}} {{#get "posts" include="authors" filter="featured:false" limit="16"}} {{#foreach posts from="5"}} {{> "post-card" lazyLoad=true}} {{/foreach}} {{/get}} {{/match}} {{else}} {{#match posts.length ">=" 10}} {{#get "posts" include="authors" limit="22"}} {{#foreach posts from="11"}} {{> "post-card" lazyLoad=true}} {{/foreach}} {{/get}} {{/match}} {{/if}} {{else match @custom.header_style "Magazine"}} {{#match posts.length ">=" 7}} {{#get "posts" include="authors" limit="19"}} {{#foreach posts from="8"}} {{> "post-card" lazyLoad=true}} {{/foreach}} {{/get}} {{/match}} {{else}} {{#if @custom.show_featured_posts}} {{#get "posts" include="authors" filter="featured:false+tag:-hash-agenda" limit=@config.posts_per_page}} {{#foreach posts}} {{> "post-card" lazyLoad=true}} {{/foreach}} {{/get}} {{else}} {{#get "posts" include="authors" filter="tag:-hash-agenda" limit=@config.posts_per_page}} {{#foreach posts}} {{> "post-card" lazyLoad=true}} {{/foreach}} {{/get}} {{/if}} {{/match}} {{!-- All posts --}} {{else match feed "index"}} {{#foreach posts}} {{> "post-card" lazyLoad=true}} {{/foreach}} {{!-- Agenda items --}} {{else match feed "agenda"}} {{#foreach posts}} {{> "post-card" lazyLoad=true}} {{/foreach}} {{!-- Tag and author pages --}} {{else match feed "archive"}} {{#foreach posts}} {{> "post-card" lazyLoad=true}} {{/foreach}} {{/match}}
{{#match feed "home"}} {{#match pagination.pages ">" 1}} {{/match}} {{else match feed "agenda"}} {{#match pagination.pages ">" 1}} {{/match}} {{/match}}
{{#if showSidebar}} {{/if}}