2023-08-16 07:48:18 +01:00
|
|
|
{{!--
|
|
|
|
Parameters:
|
|
|
|
* feed (index, home, archive, recent)
|
|
|
|
* postFeedStyle (list, grid)
|
|
|
|
* showTitle (true, false)
|
|
|
|
* showSidebar (true, false)
|
|
|
|
--}}
|
|
|
|
|
|
|
|
<section class="gh-container is-{{#match postFeedStyle "List"}}list{{else}}grid{{/match}}{{#if showSidebar}} has-sidebar{{/if}}{{#unless @custom.show_images_in_feed}} no-image{{/unless}} gh-outer">
|
2023-07-10 04:58:34 +01:00
|
|
|
<div class="gh-container-inner gh-inner">
|
2023-07-12 11:50:08 +01:00
|
|
|
|
2023-08-16 07:48:18 +01:00
|
|
|
{{#if showTitle}}
|
|
|
|
<h2 class="gh-container-title">
|
|
|
|
{{#unless title}}Latest{{else}}{{title}}{{/unless}}
|
|
|
|
</h2>
|
|
|
|
{{/if}}
|
2023-07-10 05:17:54 +01:00
|
|
|
|
2023-07-10 04:58:34 +01:00
|
|
|
<main class="gh-main">
|
|
|
|
<div class="gh-feed">
|
2023-08-16 07:48:18 +01:00
|
|
|
|
2023-09-15 09:43:18 +01:00
|
|
|
{{!-- Homepage --}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{#match feed "home"}}
|
|
|
|
{{#match @custom.header_style "Highlight"}}
|
2023-09-15 09:43:18 +01:00
|
|
|
{{#match posts.length ">=" 7}}
|
2023-08-16 13:36:05 +01:00
|
|
|
{{#if @custom.highlight_featured_posts}}
|
2023-09-12 15:03:52 +01:00
|
|
|
{{#get "posts" include="authors" limit="16"}}
|
2023-09-11 08:16:34 +01:00
|
|
|
{{#foreach posts from="5" limit="12"}}
|
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/get}}
|
2023-08-16 13:36:05 +01:00
|
|
|
{{else}}
|
2023-09-12 15:03:52 +01:00
|
|
|
{{#get "posts" include="authors" limit="22"}}
|
2023-09-11 08:16:34 +01:00
|
|
|
{{#foreach posts from="11" limit="12"}}
|
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/get}}
|
2023-08-16 13:36:05 +01:00
|
|
|
{{/if}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{else}}
|
2023-09-12 15:03:52 +01:00
|
|
|
{{#get "posts" include="authors" limit="12"}}
|
2023-09-11 08:16:34 +01:00
|
|
|
{{#foreach posts}}
|
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/get}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{/match}}
|
|
|
|
{{else match @custom.header_style "Magazine"}}
|
|
|
|
{{#match posts.length ">=" 7}}
|
2023-09-12 15:03:52 +01:00
|
|
|
{{#get "posts" include="authors" limit="19"}}
|
2023-09-11 08:16:34 +01:00
|
|
|
{{#foreach posts from="8" limit="12"}}
|
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/get}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{else}}
|
2023-09-12 15:03:52 +01:00
|
|
|
{{#get "posts" include="authors" limit="12"}}
|
2023-09-11 08:16:34 +01:00
|
|
|
{{#foreach posts}}
|
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/get}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{/match}}
|
2023-08-08 16:42:11 +01:00
|
|
|
{{else}}
|
2023-09-12 15:03:52 +01:00
|
|
|
{{#get "posts" include="authors" limit="12"}}
|
2023-09-11 08:16:34 +01:00
|
|
|
{{#foreach posts}}
|
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/get}}
|
2023-08-08 16:42:11 +01:00
|
|
|
{{/match}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{/match}}
|
|
|
|
|
2023-09-15 09:43:18 +01:00
|
|
|
{{!-- All posts --}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{#match feed "index"}}
|
|
|
|
{{#match pagination.page 2}}
|
|
|
|
{{#get "posts" include="authors" limit=@config.posts_per_page as |recent|}}
|
|
|
|
{{#foreach recent}}
|
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/get}}
|
2023-08-08 16:42:11 +01:00
|
|
|
{{/match}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{#foreach posts}}
|
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/match}}
|
|
|
|
|
2023-09-15 09:43:18 +01:00
|
|
|
{{!-- Tag and author pages --}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{#match feed "archive"}}
|
|
|
|
{{#foreach posts}}
|
2023-07-31 10:26:56 +01:00
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/match}}
|
2023-08-16 07:48:18 +01:00
|
|
|
|
2023-09-15 09:43:18 +01:00
|
|
|
{{!-- Recent posts --}}
|
2023-08-16 07:48:18 +01:00
|
|
|
{{#match feed "recent"}}
|
|
|
|
{{#get "posts" include="authors" filter="id:-{{post.id}}" limit="4" as |next|}}
|
|
|
|
{{#foreach next}}
|
|
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
|
|
{{/get}}
|
|
|
|
{{/match}}
|
|
|
|
|
2023-07-10 04:58:34 +01:00
|
|
|
</div>
|
|
|
|
</main>
|
2023-07-10 05:17:54 +01:00
|
|
|
|
2023-08-16 07:48:18 +01:00
|
|
|
{{#if showSidebar}}
|
2023-07-10 05:17:54 +01:00
|
|
|
<aside class="gh-sidebar">
|
|
|
|
<section class="gh-about">
|
|
|
|
{{#if @site.icon}}
|
|
|
|
<img class="gh-about-icon" src="{{@site.icon}}" alt="{{@site.title}}">
|
|
|
|
{{/if}}
|
2023-07-17 00:36:13 +01:00
|
|
|
<h3 class="gh-about-title is-title">{{@site.title}}</h3>
|
2023-07-10 05:17:54 +01:00
|
|
|
{{#if @site.description}}
|
2023-07-17 00:36:13 +01:00
|
|
|
<p class="gh-about-description is-body">{{@site.description}}</p>
|
2023-07-10 05:17:54 +01:00
|
|
|
{{/if}}
|
|
|
|
{{#if @site.members_enabled}}
|
|
|
|
{{#unless @member}}
|
2023-08-14 02:10:22 +01:00
|
|
|
<button class="gh-button" data-portal="signup">Subscribe</button>
|
|
|
|
{{else}}
|
|
|
|
{{#if @site.paid_members_enabled}}
|
|
|
|
{{#unless @member.paid}}
|
2023-08-24 13:26:18 +01:00
|
|
|
<button class="gh-button" data-portal="upgrade">Upgrade</button>
|
2023-08-14 02:10:22 +01:00
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
2023-07-10 05:17:54 +01:00
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
|
|
|
</section>
|
|
|
|
</aside>
|
|
|
|
{{/if}}
|
|
|
|
|
2023-08-07 12:58:36 +01:00
|
|
|
{{#match pagination.pages ">" 1}}
|
|
|
|
<div class="gh-more is-title">
|
2023-08-28 05:18:34 +01:00
|
|
|
<a href="/page/2">See all {{> "icons/arrow"}}</a>
|
2023-08-07 12:58:36 +01:00
|
|
|
</div>
|
|
|
|
{{/match}}
|
2023-07-31 10:26:56 +01:00
|
|
|
|
2023-07-10 04:58:34 +01:00
|
|
|
</div>
|
|
|
|
</section>
|