-
Notifications
You must be signed in to change notification settings - Fork 0
/
blog.html
60 lines (50 loc) · 1.69 KB
/
blog.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
---
layout: default
title: Quels articles que j'ai écrit | My corner of the web
---
<h2> </h2>
<hr/>
{% for post in site.posts %}
<div class="list-item">
<h3 class="list-post-title">
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h3>
<div class="list-post-date">
<time>{{ post.date | date_to_long_string }}</time>
<!-- Estimated reading time -->
{% assign words = post.content | number_of_words %}
{% assign quotient = words | divided_by:180 %}
{% assign remainder = words | modulo:180 %}
{% if remainder >= 108 %}
{% assign remainder = 1 %}
{% else %}
{% assign remainder = 0 %}
{% endif %}
{% if quotient >= 1 %}
{% assign reading_time = quotient | plus:remainder | append:" min" %}
{% else %}
{% assign reading_time = "1 min" %}
{% endif %}
|
{{ reading_time }} read
</div>
<p>
{{ post.excerpt | remove: '<p>' | remove: '</p>'}}<br>
<a href="{{ post.url }}">Lire la suite ...</a>
</p>
</div>
{% endfor %}
<!-- Pagination links -->
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path }}" class="previous">Previous</a>
{% else %}
<span class="previous">Previous</span>
{% endif %}
<span class="page_number ">Page: {{ paginator.page }} of {{ paginator.total_pages }}</span>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}" class="next">Next</a>
{% else %}
<span class="next ">Next</span>
{% endif %}
</div>