-
Notifications
You must be signed in to change notification settings - Fork 2
/
archive.html
90 lines (77 loc) · 3.04 KB
/
archive.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
layout: default
title: article archive
---
<div id="home">
<!-- This loops through the paginated posts -->
{% for post in site.categories.sticky %}
{% assign job = false %}
{% for cat in post.categories %}
{% if cat == 'jobs' %}
{% assign job = true %}
{% endif %}
{% endfor %}
{% unless job %}
<div class="node-sticky">
{% if post.avatar %}
<img class="portrait" src="{{ post.avatar }}" alt="Picture of {{ post.user }}" />
{% endif %}
<div class="postinfo">{{ post.date | date_to_long_string }}</div>
<div class="postinfo">
{% for category in post.categories %}
{% unless category == 'sticky' %}
<a href="/categories/{{ category | replace: ' &','' | replace: ' ','-' | replace: '/', '-' }}">
{{ category }}
</a>
{% endunless %}
{% endfor %}
| {{ post.real_name }}
</div>
<h2><a href="{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<div class="node-summary">
{{ post.excerpt }}
<a href="{{ post.url }}">Read more »</a>
</div>
</div>
{% endunless %}
{% endfor %}
{% for post in site.posts %}
{% assign sticky = false %}
{% for cat in post.categories %} <!-- roll through this pages categories to find if it is sticky -->
{% if cat == 'sticky' or cat == 'jobs' %}
{% assign sticky = true %}
{% endif %}
{% endfor %}
{% unless sticky %} <!-- only show the article if it is NOT sticky -->
<div class="node">
<div class="postinfo">{{ post.date | date_to_long_string }}, in
{% for category in post.categories %}
{% unless category == 'sticky' %}
<a href="/categories/{{ category | replace: ' &','' | replace: ' ','-' }}">
{{ category }}
</a>
{% endunless %}
{% endfor %}
</div>
<h2><a href="{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h2>
<div class="node-summary">by {{ post.user }} | {{ post.excerpt }} <a href="{{ post.url }}">Read more »</a></div>
</div>
{% endunless %}
{% endfor %}
<!-- <div id="pager" class="container-inline">
{% if paginator.previous_page %}
<div class="pager-first"><a href="/">first page</a></div>
<div class="pager-previous">
<div class="pager-first"><a href="/page{{ paginator.previous_page }}">previous page</a></div>
</div>
{% endif %}
<div class="pager-list">
<div class="pager-previous">
<div class="pager-first">Page: {{ paginator.page }} of {{ paginator.total_pages }}</div>
</div>
</div>
{% if paginator.next_page %}
<div class="pager-next"><a href="/page{{ paginator.next_page }}">next page</a></div>
{% endif %}
</div> -->
</div>