Minor improvements

This commit is contained in:
Sodbileg Gansukh
2023-09-15 16:43:18 +08:00
parent 041cc53595
commit a28a0ae11a
7 changed files with 14 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
{{#match @custom.header_style "!=" "Landing"}}
{{#match @custom.header_style "!=" "Search"}}
{{#match @custom.header_style "!=" "Off"}}
{{#match posts.length ">=" 7}}
<section class="gh-cta gh-outer">
<div class="gh-cta-inner gh-inner">
<div class="gh-cta-content">
@@ -19,5 +20,6 @@
{{/match}}
{{/match}}
{{/match}}
{{/match}}
{{/unless}}
{{/if}}

View File

@@ -1,7 +1,7 @@
{{#match headerStyle "!=" "Off"}}
{{#match headerStyle "Highlight"}}
{{#match posts.length ">=" 10}}
{{#match posts.length ">=" 7}}
{{> "components/header-content"}}
{{/match}}
{{else match headerStyle "Magazine"}}

View File

@@ -18,9 +18,10 @@
<main class="gh-main">
<div class="gh-feed">
{{!-- Homepage --}}
{{#match feed "home"}}
{{#match @custom.header_style "Highlight"}}
{{#match posts.length ">=" 10}}
{{#match posts.length ">=" 7}}
{{#if @custom.highlight_featured_posts}}
{{#get "posts" include="authors" limit="16"}}
{{#foreach posts from="5" limit="12"}}
@@ -64,6 +65,7 @@
{{/match}}
{{/match}}
{{!-- All posts --}}
{{#match feed "index"}}
{{#match pagination.page 2}}
{{#get "posts" include="authors" limit=@config.posts_per_page as |recent|}}
@@ -77,12 +79,14 @@
{{/foreach}}
{{/match}}
{{!-- Tag and author pages --}}
{{#match feed "archive"}}
{{#foreach posts}}
{{> "post-card"}}
{{/foreach}}
{{/match}}
{{!-- Recent posts --}}
{{#match feed "recent"}}
{{#get "posts" include="authors" filter="id:-{{post.id}}" limit="4" as |next|}}
{{#foreach next}}