forked from cody1991/cody1991.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (44 loc) · 1.66 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
---
layout: default
---
<div class="home">
<ul class="post-list">
{% for post in paginator.posts %}
<li>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">
{{ post.title }}
</a>
</h2>
<span class="post-meta">
{{ post.date | date: "%B %-d, %Y" }}
</span>
<a class="preview" href="{{ post.url | prepend: site.baseurl }}">
{{ post.content | strip_html | strip_newlines | truncate: 320 }}
</a>
<a class="read-more" href="{{ post.url | prepend: site.baseurl }}">
Read More
</a>
</li>
{% endfor %}
</ul>
{% if paginator.total_pages > 1 %}
<div class="page clearfix">
{% if paginator.previous_page %}
<a class="prev" href="{{ paginator.previous_page_path | prepend: site.baseurl }}"></a>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="pageNum active">{{ page }}</span>
{% elsif page == 1 %}
<a class="pageNum" href="{{ '/index.html' | prepend: site.baseurl}}">{{ page }}</a>
{% else %}
<a class="pageNum" href="{{ site.paginate_path | prepend: site.baseurl | replace: ':num', page }}/index.html">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a class="next" href="{{ paginator.next_page_path | prepend: site.baseurl }}"></a>
{% endif %}
</div>
{% endif %}
</div>