-
Notifications
You must be signed in to change notification settings - Fork 28
/
index.html
52 lines (50 loc) · 1.59 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
---
layout: default
title: A JavaScript Blog
---
<div class="posts">
{% for post in paginator.posts %}
<div class="post-inner">
<h2 class="post"><a href="{{ post.url }}">{% if post.display-title %}{{ post.display-title }} {% else %}{{ post.title }}{% endif %}</a></h2>
<div class="meta">
<span class="date">{{ post.date | date_to_string }}</span>
| <span class="author">By {{ post.author }}</span>
| <span class="comments"><a href="{{ post.url }}/#disqus_thread">Comments</a></span>
| <span class="tags">
<img alt="Tags" class="icon" src="/images/tag.gif" />
{% for category in post.categories %}
<a href="/tags.html#{{ category }}">{{ category }}</a>
{% endfor %}
</span>
</div>
<div class="preview">
{{ post.content }}
</div>
</div>
{% endfor %}
</div>
{% if paginator.previous_page %}
<div class="prev_next">
{% if paginator.previous_page == 1 %}
← <a class="previous" href="/">previous</a>
{% else %}
← <a class="previous" href="/page{{ paginator.previous_page}}">previous</a>
{% endif %}
</div>
{% endif %}
{% if paginator.total_pages > 1 %}
<div class="prev_next">
{% for i in (1..paginator.total_pages) %}
{% if i == paginator.page %}
<strong>{{ i }}</strong>
{% elsif i != 1 %}
<a href="/page{{ i }}">{{ i }}</a>
{% else %}
<a href="/">1</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a class="next" href="/page{{ paginator.next_page}}">next</a> →
{% endif %}
</div>
{% endif %}