blog/_layouts/post.html
2020-07-12 16:23:23 +08:00

61 lines
1.4 KiB
HTML

---
layout: framework
banner:
banner_html: post-header.html
sidebar:
- article-menu
---
<div class="post">
<section>
{%- assign name = 'banner' -%}
{%- include functions.html func='get_value' -%}
{%- assign banner = return -%}
{%- if banner == nil -%}
{%- include views/post-header.html -%}
{%- endif -%}
{%- include views/article.html -%}
<div class="post-nav">
{%- if page.previous -%}
<a class="previous" href="{{ page.previous.url }}" title="{{ page.previous.title | escape }}">{{ page.previous.title | escape }}</a>
{%- else -%}
<span></span>
{%- endif -%}
{%- if page.next -%}
<a class="next" href="{{ page.next.url }}" title="{{ page.next.title | escape }}">{{ page.next.title | escape }}</a>
{%- else -%}
<span></span>
{%- endif -%}
</div>
<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}}">{{post.title}}</a></li>
{%- endfor -%}
</ul>
</div>
{%- if page.comments != false -%}
{%- if site.disqus.shortname -%}
{%- include extensions/comments/disqus.html -%}
{%- endif -%}
{%- if site.gitment.username -%}
{%- include extensions/comments/gitment.html -%}
{%- endif -%}
{%- endif -%}
</section>
</div>