blog/_layouts/post.html

78 lines
2.2 KiB
HTML
Raw Normal View History

2019-08-03 11:14:05 +02:00
---
2019-09-11 06:19:34 +02:00
layout: framework
2020-07-12 10:23:23 +02:00
banner:
2019-09-11 06:19:34 +02:00
banner_html: post-header.html
hidden: []
2019-09-11 06:19:34 +02:00
sidebar:
- article-menu
2019-08-03 11:14:05 +02:00
---
2019-09-11 06:19:34 +02:00
<div class="post">
<section>
2019-09-11 06:19:34 +02:00
{%- assign name = 'banner' -%}
{%- include functions.html func='get_value' -%}
{%- assign banner = return -%}
2019-09-11 06:19:34 +02:00
2020-08-25 08:41:46 +02:00
{%- assign name = 'hidden' -%}
{%- include functions.html func='get_value' -%}
{%- assign hidden = return -%}
{%- assign result = hidden | where_exp: "item", "item == 'header'" -%}
{%- if banner == nil and result.size == 0 -%}
{%- include views/post-header.html -%}
{%- endif -%}
2019-09-11 06:19:34 +02:00
{%- include views/article.html -%}
2019-09-11 06:19:34 +02:00
2020-08-25 08:41:46 +02:00
{%- assign result = hidden | where_exp: "item", "item == 'navigator'" -%}
{%- if result.size == 0 -%}
<div class="post-nav">
{%- if page.previous -%}
<a class="previous" href="{{ page.previous.url | relative_url }}" title="{{
page.previous.title | escape }}">{{ page.previous.title | escape | truncatewords: 6 }}</a>
{%- else -%}
<span></span>
{%- endif -%}
2019-09-11 06:19:34 +02:00
{%- if page.next -%}
<a class="next" href="{{ page.next.url | relative_url }}" title="{{ page.next.title | escape }}">{{ page.next.title | escape | truncatewords: 6 }}</a>
{%- else -%}
<span></span>
{%- endif -%}
</div>
{%- endif -%}
2019-09-11 06:19:34 +02:00
2020-08-25 08:41:46 +02:00
{%- assign result = hidden | where_exp: "item", "item == 'related_posts'" -%}
{%- if result.size == 0 -%}
2020-07-12 10:23:23 +02:00
<div class="post-related">
<div>Related Articles</div>
<ul>
{% assign posts = site[page.collection] | sample:4 %}
{%- for post in posts -%}
<li><a class="post-link" href="{{post.url | relative_url}}" title="{{ page.next.title | escape }}">{{ post.title | escape | truncatewords: 12 }}</a></li>
2020-07-12 10:23:23 +02:00
{%- endfor -%}
</ul>
</div>
{%- endif -%}
2020-07-12 10:23:23 +02:00
2020-08-25 08:41:46 +02:00
{%- assign result = hidden | where_exp: "item", "item == 'comments'" -%}
{%- if result.size == 0 -%}
<div class="post-comments">
{%- if page.comments != false -%}
2019-09-11 06:19:34 +02:00
{%- if site.disqus.shortname -%}
{%- include extensions/comments/disqus.html -%}
{%- endif -%}
2019-09-11 06:19:34 +02:00
2022-05-05 17:36:54 +02:00
{%- if site.utterances.repo -%}
{%- include extensions/comments/utterances.html -%}
{%- endif -%}
{%- endif -%}
</div>
{%- endif -%}
2019-09-11 06:19:34 +02:00
</section>
2019-09-11 06:19:34 +02:00
</div>