-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (55 loc) · 1.71 KB
/
index.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
layout: default
title: Home
---
<div class="posts">
{% for post in paginator.posts %}
<article class="post">
<h1 class="post-title">
<a href="{{ site.baseurl }}{{ post.url }}">
{{ post.title }}
</a>
</h1>
<!-- <time datetime="{{ post.date | date_to_xmlschema }}" class="post-date">{{ post.date | date: "%Y-%m-%d" }}</time> -->
<small>
{{ post.date | date: "%Y-%m-%d" }}
{% include categoriesforpost.html categories=post.categories %}
{% include tagsforpost.html tags=post.tags %}
</small><br>
{{ post.excerpt }}
{% capture content_words %}
{{ post.content | number_of_words }}
{% endcapture %}
{% capture excerpt_words %}
{{ post.excerpt | number_of_words }}
{% endcapture %}
{% if excerpt_words != content_words %}
<p><a class="btn btn-sm btn-primary" href="{{site.baseurl}}{{ post.url }}/#read-more" role="button">Read more <i class="fa fa-arrow-circle-right"></i></a>
</p>
{% endif %}
</article>
{% endfor %}
</div>
<!-- jekyll-paginate -->
{% if include.paginator %}
{% assign paginator = include.paginator %}
{% endif %}
{% if paginator.posts.size > 0 %}
<div class="paginator">
<span class="previous">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | relative_url }}">Prev</a>
{% else %}
<span>Prev</span>
{% endif %}
</span>
<span class="indicator"> {{ paginator.page }}/{{ paginator.total_pages }}</span>
<span class="next">
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | relative_url }}">Next</a>
{% else %}
<span>Next</span>
{% endif %}
</span>
</div>
{% endif %}