-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
95 lines (69 loc) · 2.09 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
layout: page
title: SolidInvoice Blog
icon: home
menuTitle: Home
order: 1
---
{% comment %}
Name:
Blog Post list page
Description:
This is a simple list of paginated recent posts.
Example:
You can replace the for-loop with any of the included components:
{% include components/features.html features=paginator.posts %}
{% endcomment %}
<!-- Post list -->
{% for post in site.posts limit:5 %}
<article>
<header>
<h3><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h3>
<p>{{ post.date | date: "%B %-d, %Y" }}</p>
</header>
<div class="row uniform">
<p>
{{ post.excerpt }}
</p>
<div class="12u$">
<ul class="actions">
<li><a href="{{ site.baseurl }}{{ post.url }}" class="button">Read More</a></li>
</ul>
</div>
</div>
</article>
{% unless forloop.last %}
<hr class="major"/>
{% endunless %}
{% endfor %}
<!-- Pagination -->
{% if paginator.total_pages > 1 %}
<hr class="major"/>
<ul class="pagination">
{% if paginator.previous_page %}
<li><a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}"
class="button">Prev</a></li>
{% else %}
<li><span class="button disabled">Prev</span></li>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
{% assign class = 'page active' %}
{% else %}
{% assign class = 'page' %}
{% endif %}
{% if page == 1 %}
{% assign href = site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: '/page:num', '' %}
{% else %}
{% assign href = site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page %}
{% endif %}
<li><a href="{{ href }}" class="{{ class }}">{{ page }}</a></li>
{% endfor %}
{% if paginator.next_page %}
<li><a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="button">Next</a>
</li>
{% else %}
<li><span class="button disabled">Next</span></li>
{% endif %}
</ul>
{% endif %}