Permalink
Find file
5993fb9 Nov 13, 2016
executable file 39 lines (33 sloc) 1.65 KB
---
layout: default
---
<div class="main-post-list hidden">
<ol class="post-list">
<!--置顶-->
{% for post in site.posts %}
{% if post.istop %}
{% if paginator.page == 1 %}
<li>
<h2 class="post-list__post-title post-title"><a href="{{ post.url }}" title="访问 {{ post.title }}">[置顶]{{ post.title }}</a></h2>
<p class="excerpt">{{ post.content | strip_html | strip_newlines | truncate: 260 }}&hellip;</p>
<div class="post-list__meta"><time datetime="{{post.date | date: date_to_xmlschema}}" class="post-list__meta--date date">{{ post.date | date: "%F"}}</time> &#8226; <span class="post-list__meta--tags tags">{{ post.category }}</span> <a class="btn-border-small" href={{ post.url }}>继续阅读</a></div>
<hr class="post-list__divider" />
</li>
{% endif %}
{% endif %}
{% endfor %}
<!--普通文档流-->
{% for post in paginator.posts %}
{% if post.hide %}
{% else %}
<li>
<h2 class="post-list__post-title post-title"><a href="{{ post.url }}" title="访问 {{ post.title }}">{{ post.title }}</a></h2>
<p class="excerpt">{{ post.content | strip_html | strip_newlines | truncate: 260 }}&hellip;</p>
<div class="post-list__meta"><time datetime="{{post.date | date: date_to_xmlschema}}" class="post-list__meta--date date">{{ post.date | date: "%F"}}</time> &#8226; <span class="post-list__meta--tags tags">{{ post.category }}</span> <a class="btn-border-small" href={{ post.url }}>继续阅读</a></div>
<hr class="post-list__divider" />
</li>
{% endif %}
{% endfor %}
</ol>
{% include pagination.html %}
</div>