-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (74 loc) · 3.9 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
---
layout: default
---
<div class="container pt-5">
<div class="row">
<main class="col-9">
<section>
<h3>Articles</h3>
{% if paginator %}
{% for post in paginator.posts %}
<article>
{% assign date_format = site.date_format | default: "%b %-d, %Y" %}
<h2><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h2>
<span class="lead">Publish date: {{ post.date | date: date_format }} · Author: {{ post.author }} · Categories: {{ post.categories }}</span>
<p>{{ post.excerpt }}</p>
<a class="btn btn-info float-right" href="{{ post.url | relative_url }}">Read more</a>
</article>
<hr>
{% endfor %}
{% if paginator.total_pages > 1 %}
<nav aria-label="Page navigation">
<ul class="pagination justify-content-center">
{% if paginator.next_page %}
<li class="page-item">
<a class="page-link" href="{{ paginator.next_page_path | prepend: site.baseurl }}">« Newer posts</a>
</li>
{% else %}
<li class="page-item">
<span class="page-link disabled">« Newer posts</span>
</li>
{% endif %}
{% if paginator.page_trail %}
{% for trail in paginator.page_trail %}
<li class="page-item {% if page.url == trail.path %}active{% endif %}">
<a class="page-link" href="{{ trail.path | prepend: site.baseurl }}" title="{{trail.title}}">{{ trail.num }}</a>
</li>
{% endfor %}
{% endif %}
{% if paginator.previous_page %}
<li class="page-item">
<a class="page-link" href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Later posts »</a>
</li>
{% else %}
<li class="page-item">
<span class="page-link disabled">Later posts »</span>
</li>
{% endif %}
</ul>
{% endif %}
</nav>
{% else %}
{% for post in site.posts %}
<article>
{% assign date_format = site.date_format | default: "%b %-d, %Y" %}
<h2><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h2>
<span class="lead">Publish date: {{ post.date | date: date_format }}{% if post.author %} · Author: {{ post.author }}{% endif %}{% if post.categories %} · Categories: {{ post.categories }}{% endif %}</span>
{{ post.excerpt}}
<a class="btn btn-outline-primary btn-lg btn-block" href="{{ post.url | relative_url }}">Read more</a>
</article>
<hr>
{% endfor %}
<p>No more posts available now on this website :)<p>
{% endif %}
</section>
</main>
<section class="col-3">
<ul class="nav flex-column">
{% for post in site.posts %}
<li class="nav-item"><a class="nav-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></li>
{% endfor %}
</ul>
</section>
</div>
</div>