-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
44 lines (38 loc) · 1.33 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
---
layout: default
title: Home
---
<div class="posts">
{% for post in paginator.posts %}
{% if post.published %}
<div class="post">
<h1 class="post-title">
<a href="{{ post.url }}">
{{ post.title }}
</a>
</h1>
<!-- Calculate read_time and store it in a variable -->
{% assign read_time = post.content | strip_html | number_of_words | divided_by: 90 | divided_by: 2.0 | remove: ".0" %}
<div class="post-subtitle">
<span class="reading-time">⏱ {{ read_time }} min</span>
<span> | </span>
<span class="post-date">{{ post.date | date_to_string }}</span>
</div>
<a href="{{ post.url }}"><img src="{{ post.image }}" alt="splash"></a>
{{ post.summary }}
</div>
{% endif %}
{% endfor %}
</div>
<div class="pagination">
{% if paginator.next_page %}
<a class="pagination-item older" href="{{ paginator.next_page_path | relative_url }}">Older posts</a>
{% else %}
<span class="pagination-item older">Older posts</span>
{% endif %}
{% if paginator.previous_page %}
<a class="pagination-item newer" href="{{ paginator.previous_page_path | prepend: relative_url }}">Newer posts</a>
{% else %}
<span class="pagination-item newer">Newer posts</span>
{% endif %}
</div>