-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
56 lines (51 loc) · 1.93 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
---
layout: default
---
<header id="index">
<img src="/assets/images/logo.png">
<p class="description">{{ site.description }}</p>
<nav class="pages">
{% for item in site.pages %}
{% if item.title != null and item.layout == "page" %}
<a class="button {% if page.url == item.url %}active{% endif %}" href="{{ item.url }}">{{ item.title }}</a>
{% endif %}
{% endfor %}
<nav>
</header>
<main id="index">
{% for post in paginator.posts %}
<article>
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<section class="excerpt">
{{ post.content }}
</section>
<hr>
<div class="post-meta">
Posted on
<time datetime="{{ post.date | date_to_long_string }}">{{ post.date | date_to_long_string }}</time>
{% for tag in post.tags %}
{% if forloop.index == 1 %}, into
{% elsif forloop.index == forloop.length -1 %}
{% if forloop.index != 2 %},{% endif %} and
{% else %},
{% endif %}
<span><a href="/tag/{{tag | downcase | slugify}}/">{{tag}}</a></span>
{% endfor %}.
</div>
</article>
{% endfor %}
</main>
<nav class="pagination" role="navigation">
{% if paginator.next_page %}
<a class="newer-posts" href="/archive/{{paginator.next_page}}">← Older posts</a>
{% endif %}
<span class="page-number">Page {{ paginator.page }} of {{ paginator.total_pages }}</span>
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<a class="older-posts" href="/">Newer posts →</a>
{% else %}
<a class="older-posts" href="/archive/{{paginator.previous_page}}">Newer posts →</a>
{% endif %}
{% endif %}
</nav>
{% include footer.html %}