diff options
-rw-r--r-- | _layouts/post.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/_layouts/post.html b/_layouts/post.html index bd1f93d..ed045ec 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -13,12 +13,15 @@ sidebar: {%- include functions.html func='get_value' -%} {%- assign banner = return -%} - {%- if banner == nil -%} + {%- assign result = page.hidden | where_exp: "item", "item == 'header'" -%} + {%- if banner == nil and result.size == 0 -%} {%- include views/post-header.html -%} {%- endif -%} {%- include views/article.html -%} + {%- assign result = page.hidden | where_exp: "item", "item == 'navigator'" -%} + {%- if result.size == 0 -%} <div class="post-nav"> {%- if page.previous -%} <a class="previous" href="{{ page.previous.url }}" title="{{ @@ -33,7 +36,10 @@ sidebar: <span></span> {%- endif -%} </div> + {%- endif -%} + {%- assign result = page.hidden | where_exp: "item", "item == 'related_posts'" -%} + {%- if result.size == 0 -%} <div class="post-related"> <div>Related Articles</div> <ul> @@ -43,7 +49,10 @@ sidebar: {%- endfor -%} </ul> </div> + {%- endif -%} + {%- assign result = page.hidden | where_exp: "item", "item == 'comments'" -%} + {%- if result.size == 0 -%} <div class="post-comments"> {%- if page.comments != false -%} @@ -57,6 +66,7 @@ sidebar: {%- endif -%} </div> + {%- endif -%} </section> </div> |