-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.html
More file actions
81 lines (80 loc) · 3.22 KB
/
blog.html
File metadata and controls
81 lines (80 loc) · 3.22 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
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
---
layout: default
pagination:
enabled: true
hero_title: "Tech Blog"
hero_subtitle: "Latest posts and articles"
---
{% for post in paginator.posts %}
<div class="card post-card">
{% if post.thumbnail %}
<div class="card-image">
<figure class="image">
<a href="{{ site.baseurl }}{{ post.url }}" title="{{ post.title }}">
<img src="{{ post.thumbnail | prepend: site.baseurl }}" alt="{{ post.title }}">
</a>
</figure>
</div>
{% endif %}
<div class="card-content">
<h3 class="post-title"><a href="{{ site.baseurl }}{{ post.url }}" title="{{ post.title }}">{{ post.title
}}</a></h3>
<p class="post-categories">
{% for category in post.categories %}
<a href="/{{ category | prepend: site.baseurl }}"
class="tag {% if site.data.category[category].color %} is-{{ site.data.category[category].color }} {% endif %}">{{
category }}</a>
{% endfor %}
</p>
{% if post.description %}
<p>{{ post.description }}</p>
{% else %}
{{ post.excerpt }}
{% endif %}
<p><small> {{ post.display-date }} </small></p>
</div>
</div>
<br>
{% endfor %}
{% if paginator.total_pages > 1 %}
<nav class="pagination is-centered">
<a
{% if paginator.previous_page %}
href="{{ paginator.previous_page_path | prepend: site.baseurl }}"
{% endif %}
class="pagination-previous {% if paginator.previous_page %}{% else %} is-disabled {% endif %}">
prev
page
</a>
<a
{% if paginator.next_page %}
href="..{{ paginator.next_page_path | prepend: site.baseurl }}"
{% endif %}
class="pagination-next {% if paginator.next_page %}{% else %} is-disabled {% endif %}">
next page
</a>
<ul class="pagination-list">
{% for page in (1..paginator.total_pages) %}
<li>
<a
{% if page==paginator.page %}
{% else %}
href=
"{% if page == 1 %}
../../
{% else %}
{% if paginator.page == 1 %}
./page/{{ page }}
{% else %}
{{ page }}
{% endif %}
{% endif %}"
{% endif %}
class="pagination-link {% if page == paginator.page %} is-current {% endif %}">
{{ page }}
</a>
</li>
{% endfor %}
</ul>
</nav>
{% endif %}