-
Notifications
You must be signed in to change notification settings - Fork 28
/
archive.essays.lens
152 lines (123 loc) · 5.23 KB
/
archive.essays.lens
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<koken:include file="inc/header.html" />
<!-- Load this template's source data (essays) and limit for pagination -->
<koken:load limit="20">
<!-- Add Facebook Open Graph tags for nicer sharing -->
<koken:head>
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:description" content="{{ site.description strip_html='true' }}" />
<meta property="og:title" content="{{ labels.essay.plural }}" />
<meta property="og:type" content="blog" />
<meta property="og:url" content="{{ location.site_url }}{{ location.here }}" />
</koken:head>
<!-- Display breadcrumb navigation -->
<div id="bread">
<koken:breadcrumbs />
</div>
<div class="lcol">
<!-- Loop over and display each essay -->
<koken:loop>
<article>
<header>
<h2><koken:link title="Read {{ essay.title }}">{{ essay.title }}</koken:link></h2>
</header>
<!-- Display body of the essay -->
{{ essay.content }}
<!-- Display link to the rest of the essay if a read more break link is inserted -->
<koken:more>
<p>
<koken:link title="{{ essay.title }}" class="btn btn-primary">{{ essay.read_more_label }}</koken:link>
</p>
</koken:more>
<footer>
<ul class="blank">
<li>
<!-- Display the timestamp (date published) -->
<!-- Link to archive.essays.lens to view all essays published the same momth -->
<strong>Published:</strong>
<koken:link to="archive" title="View all {{ labels.essay.plural case='lower' }} from this month">
<koken:time />
</koken:link>
</li>
<li>
<!-- Link to any albums assigned as the essay's topic -->
<koken:topics>
<strong>Topics:</strong>
<koken:loop separator=", ">
<koken:link title="View {{ album.title }}">
{{ album.title }}
</koken:link>
</koken:loop>
</koken:topics>
</li>
<li>
<!-- Publish the essay's categories. Links to archive.essays.lens -->
<koken:categories>
<strong>{{ labels.category.plural }}:</strong>
<koken:loop separator=", ">
<koken:link title="View all {{ labels.essay.plural case='lower' }} in {{ category.title }}">
{{ category.title }}
</koken:link>
</koken:loop>
</koken:categories>
</li>
<li>
<!-- Publish the essays' tags. Links to archive.essays.lens -->
<koken:tags>
<strong>{{ labels.tag.plural }}:</strong>
<koken:loop separator=" ">
<koken:link title="View all {{ labels.essay.plural case='lower' }} in #{{ tag.title }}">
#{{ tag.title }}
</koken:link>
</koken:loop>
</koken:tags>
</li>
</ul>
</footer>
</article>
</koken:loop>
<!-- Display pagination links -->
<koken:include file="inc/pagination.html" />
</div> <!-- close .lcol -->
<div class="rcol">
<aside>
<section>
<!-- Links to view essays by publish date in archive.essays.lens -->
<h5>View {{ labels.essay.plural case="lower" }} by date</h5>
<koken:dates limit_to="essays">
<koken:select label="Select month" />
</koken:dates>
</section>
<section>
<!-- Links to view essays by tag in archive.essays.lens -->
<koken:tags limit_to="essays" order_by="essay_count">
<h5>View {{ labels.essay.plural case="lower" }} by {{ labels.tag.singular case="lower" }}</h5>
<koken:loop>
<koken:link title="View all {{ labels.essay.plural case='lower' }} in {{ tag.title }}">
{{ tag.title }} ({{ tag.counts.total }})
</koken:link>
<br>
</koken:loop>
</koken:tags>
</section>
<section>
<!-- Links to view essays by category in archive.essays.lens -->
<koken:categories limit_to="essays" order_by="essay_count">
<h5>View {{ labels.essay.plural case="lower" }} by {{ labels.category.singular case="lower" }}</h5>
<koken:loop>
<koken:link title="View all {{ labels.essay.plural case='lower' }} in {{ category.title }}">
{{ category.title }} ({{ category.counts.total }})
</koken:link>
<br>
</koken:loop>
</koken:categories>
</section>
</aside>
</div> <!-- close .rcol -->
<!-- Fallback content if no data was loaded by koken:load -->
<koken:else>
<!-- Display fallback message in Site editor only -->
<koken:note>
No essays found
</koken:note>
</koken:load>
<koken:include file="inc/footer.html" />