-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (50 loc) · 1.78 KB
/
Copy pathindex.html
File metadata and controls
56 lines (50 loc) · 1.78 KB
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
---
layout: barebones
---
<div class="blog-posts-title">
</div>
<div class="docs blog-posts">
<div class="grid docs-content">
<div class="col-1-1">
{% for post in paginator.posts %}
{% assign author = site.authors[post.author] %}
<div class="post-preview">
<a href="{{ post.url }}">
<div class="post-header">
<h2>{{ post.title }}</h2>
<div class="post-meta">{{ post.date | date_to_long_string }}{% if author %} • {{author.display_name}}{% endif %}</div>
</div>
<div class="post-content">
{{ post.excerpt| strip_html }}
</div>
</a>
</div>
{% endfor %}
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page == 1 %}
<a href="/blog">←</a>
{% elsif paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">←</a>
{% else %}
<span>←</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
{{ page }}
{% elsif page == 1 %}
<a href="/blog">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">→</a>
{% else %}
<span>→</span>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>