/
articles.html
32 lines (29 loc) · 1.01 KB
/
articles.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<div class="page-header">
<h2>{{ include.title | default: "Articles" }}</h2>
</div>
<ul class="posts list-unstyled">
{% assign posts_limit = include.limit | default: 5 %}
{% for post in site.categories[include.category] limit: posts_limit %}
{% if forloop.index == 1 %}
<li class="item">
<div class="media">
<a class="pull-left" href="{{post.url}}">
<img class="media-object" src="{{post.thumbnail}}" width="120" alt="">
</a>
<div class="media-body">
<h6 class="media-heading"><a href="{{post.url}}">{{post.title}}</a></h6>
<small>{{ post.date | date_to_string }}</small>
<p>
{{post.description}}
</p>
</div>
</div>
</li>
{% else %}
<li><h6><a href="{{ post.url }}">{{ post.title }}</a> <small>| {{ post.date | date_to_string }}</small></h6></li>
{% endif %}
{% endfor %}
</ul>
<div class="more text-center">
<a href="/articles/" class="btn btn-primary btn-sm">more »</a>
</div>