mirror of
				https://github.com/ZetaKebab/kesper.git
				synced 2025-11-04 08:09:49 +00:00 
			
		
		
		
	Show read more wrapper when only there are other recent posts
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										31
									
								
								post.hbs
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								post.hbs
									
									
									
									
									
								
							@@ -102,25 +102,24 @@ into the {body} tag of the default.hbs template --}}
 | 
			
		||||
 | 
			
		||||
{{!-- Read more links, just above the footer --}}
 | 
			
		||||
{{#if @custom.show_recent_posts}}
 | 
			
		||||
<aside class="read-more-wrap">
 | 
			
		||||
    <div class="read-more inner">
 | 
			
		||||
    {{!-- The {#get} helper below fetches some of the latest posts here
 | 
			
		||||
    so that people have something else to read when they finish this one.
 | 
			
		||||
 | 
			
		||||
        {{!-- The {#get} helper below fetches some of the latest posts here
 | 
			
		||||
        so that people have something else to read when they finish this one.
 | 
			
		||||
    This query gets the latest 3 posts on the site, but adds a filter to
 | 
			
		||||
    exclude the post we're currently on from being included. --}}
 | 
			
		||||
    {{#get "posts" filter="id:-{{id}}" include="authors" limit="3" as |more_posts|}}
 | 
			
		||||
 | 
			
		||||
        This query gets the latest 3 posts on the site, but adds a filter to
 | 
			
		||||
        exclude the post we're currently on from being included. --}}
 | 
			
		||||
        {{#if more_posts}}
 | 
			
		||||
            <aside class="read-more-wrap">
 | 
			
		||||
                <div class="read-more inner">
 | 
			
		||||
                    {{#foreach more_posts}}
 | 
			
		||||
                        {{> "post-card"}}
 | 
			
		||||
                    {{/foreach}}
 | 
			
		||||
                </div>
 | 
			
		||||
            </aside>
 | 
			
		||||
        {{/if}}
 | 
			
		||||
 | 
			
		||||
        {{#get "posts" filter="id:-{{id}}" include="authors" limit="3" as |more_posts|}}
 | 
			
		||||
            {{#if more_posts}}
 | 
			
		||||
                {{#foreach more_posts}}
 | 
			
		||||
                    {{> "post-card"}}
 | 
			
		||||
                {{/foreach}}
 | 
			
		||||
            {{/if}}
 | 
			
		||||
        {{/get}}
 | 
			
		||||
 | 
			
		||||
    </div>
 | 
			
		||||
</aside>
 | 
			
		||||
    {{/get}}
 | 
			
		||||
{{/if}}
 | 
			
		||||
 | 
			
		||||
{{/post}}
 | 
			
		||||
		Reference in New Issue
	
	Block a user