-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (56 loc) · 1.74 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
---
layout: default
---
<div class="topbar">
</div>
<header class="blog-header">
{% if site.logo %}
<a class="blog-logo" href="{{site.url}}" style="background-image: url('{{ site.author_image }}')">{{ site.title }}</a>
{% endif %}
<h1>{{ site.title }}</h1>
<h2>{{ site.description }}</h2>
<nav>
{% for social in site.social %}
{% if social.url %}
<a class="icon-{{ social.icon }}" href="{{ social.url }}">
<i class="fa fa-{{ social.icon }}"></i>
</a>
{% endif %}
{% endfor %}
{% for page in site.pages %}
{% if page.title %}
<a href="{{page.url}}">{{page.title}}</a>
{% endif %}
{% endfor %}
</nav>
</header>
<main class="content">
<section id="entries">
{% for post in paginator.posts %}
<article class="post">
<header>
<a href="{{ post.url }}">
<h2>{{ post.title }}</h2>
</a>
<time datetime="{{ post.date | date: "%Y-%m-%d" }}">{{ post.date | date: "%B %-d, %Y" }}</time>
</header>
<section class="post-content">
<p>{{ post.content | strip_html | truncatewords: 50 }}</p>
</section>
</article>
{% endfor %}
</section>
<nav class="pagination">
{% if paginator.next_page %}
<a class="newer-posts" href="/page{{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="/page{{paginator.previous_page}}">Newer posts →</a>
{% endif %}
{% endif %}
</nav>
</main>