-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·48 lines (38 loc) · 1.53 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
---
layout: default
title: Welcome!
description: This is my index page
---
<!-- This loops through the paginated posts -->
<div class="posts">
{% for post in paginator.posts %}
<a href="{{ post.url }}">
<p class="date">{{ post.date | date: "%B %-d, %Y" }}</p>
<h2>{{ post.title }}</h2>
{% if post.image %}
{% assign imagebase = post.image | split: '.' %}
<figure class="img-class">
<img src="/assets/img-dest/{{imagebase | first}}-640.{{imagebase | last}}" sizes="(min-width: 40rem) 40rem, 100vw" srcset="/assets/img-dest/{{imagebase | first}}-320.{{imagebase | last}} 320w, /assets/img-dest/{{imagebase | first}}-640.{{imagebase | last}} 640w, /assets/img-dest/{{imagebase | first}}-1024.{{imagebase | last}} 1024w, /assets/img-dest/{{imagebase | first}}-2048.{{imagebase | last}} 2048w" alt="{{post.title}}">
</figure>
{% endif %}
<p class="excerpt">
{{ post.excerpt }}
</p>
</a>
<hr class="post-separator">
{% endfor %}
</div>
<!-- Pagination links -->
<div class="pagination">
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}" class="next">Next</a>
{% else %}
<a href="{{ paginator.next_page_path }}" class="next hide">Next</a>
{% endif %}
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path }}" class="previous">Previous</a>
{% else %}
<a href="{{ paginator.previous_page_path }}" class="previous hide">Previous</a>
{% endif %}
<div class="page-number ">Page {{ paginator.page }} of {{ paginator.total_pages }}</div>
</div>