Archive page

This commit is contained in:
Sodbileg Gansukh
2023-07-31 17:26:56 +08:00
parent c5a6870fcf
commit be114956d9
8 changed files with 150 additions and 123 deletions

View File

@@ -1,12 +1,48 @@
{{!< default}}
{{!-- The tag above means: insert everything in this file into the body of the default.hbs template --}}
{{> "components/header" headerStyle=@custom.header_style}}
<main class="gh-main gh-outer">
{{#match @custom.header_style "!=" "Highlight"}}
{{> "components/featured" showFeatured=@custom.show_featured limit=4}}
{{/match}}
<section class="gh-container is-{{#match @custom.post_list_style "List"}}list{{else}}grid{{/match}}{{#if @custom.show_sidebar}} has-sidebar{{/if}}{{#if @custom.hide_images}} no-image{{/if}}">
<div class="gh-container-inner gh-inner">
{{> "components/cta"}}
<h2 class="gh-container-title">Latest</h2>
<main class="gh-main">
<div class="gh-feed">
{{#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}}
</div>
</main>
{{> "components/post-list" postListStyle=@custom.post_list_style}}
{{#if @custom.show_sidebar}}
<aside class="gh-sidebar">
<section class="gh-about">
{{#if @site.icon}}
<img class="gh-about-icon" src="{{@site.icon}}" alt="{{@site.title}}">
{{/if}}
<h3 class="gh-about-title is-title">{{@site.title}}</h3>
{{#if @site.description}}
<p class="gh-about-description is-body">{{@site.description}}</p>
{{/if}}
{{#if @site.members_enabled}}
{{#unless @member}}
<button class="gh-button">Subscribe</button>
{{/unless}}
{{/if}}
</section>
</aside>
{{/if}}
</div>
</section>
</main>