-
Notifications
You must be signed in to change notification settings - Fork 28
/
essay.lens
210 lines (168 loc) · 5.96 KB
/
essay.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<koken:include file="inc/header.html" />
<!-- Load this template's source data (essay) -->
<koken:load>
<!-- Add Facebook Open Graph and Twitter Cards metadata for nicer sharing -->
<koken:head>
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:title" content="{{ essay.title strip_html='true' }}" />
<meta property="og:description" content="{{ essay.excerpt strip_html='true' }}" />
<meta property="og:url" content="{{ essay.url }}" />
<meta property="og:type" content="website" />
<koken:featured_image>
<meta property="og:image" content="{{ content.presets.medium_large.url }}" />
<meta property="og:image:width" content="{{ content.presets.medium_large.width }}" />
<meta property="og:image:height" content="{{ content.presets.medium_large.height }}" />
</koken:featured_image>
<meta name="medium" content="article" />
<koken:not empty="profile.twitter">
<koken:featured_image>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@{{ profile.twitter }}" />
<meta name="twitter:creator" content="@{{ profile.twitter }}" />
<meta name="twitter:image" content="{{ content.presets.medium_large.url }}" />
</koken:featured_image>
</koken:not>
</koken:head>
<div class="lcol">
<!-- Display breadcrumb navigation -->
<nav id="bread">
<!-- Pagination to view neighboring essays -->
<div id="content-pag">
<koken:next>
<koken:link title="Read {{ essay.title }}" bind_to_key="left">← {{ essay.title }}</koken:link>
</koken:next>
<koken:previous>
<koken:link title="Read {{ essay.title }}" bind_to_key="right">{{ essay.title }} → </koken:link>
</koken:previous>
</div>
<koken:breadcrumbs />
</nav>
<article>
<header>
<h2>{{ essay.title }}</h2>
</header>
<!-- Display body of the essay -->
{{ essay.content }}
<footer>
<ul class="blank">
<!-- Publishes the link for this essay -->
<li>
<strong>Permalink:</strong>
<koken:link title="{{ essay.title }}">Link</koken:link>
</li>
<!-- Publish the essay's categories. Links to archive.essays.lens -->
<koken:categories>
<li>
<strong>Category:</strong>
<koken:loop separator=", ">
<koken:link title="View all {{ labels.essay.plural case='lower' }} in {{ category.title }}">
{{ category.title }}
</koken:link>
</koken:loop>
</li>
</koken:categories>
<!-- Publish the essays' tags. Links to archive.essays.lens -->
<koken:tags>
<li>
<strong>Tags:</strong>
<koken:loop separator=", ">
<koken:link title="View all {{ labels.essay.plural case='lower' }} in {{ tag.title }}">
{{ tag.title }}
</koken:link>
</koken:loop>
</li>
</koken:tags>
<!-- Display social share links -->
<li>
<strong>Share:</strong>
<koken:link share="twitter">Twitter</koken:link>
<koken:link share="facebook">Facebook</koken:link>
<koken:link share="pinterest">Pinterest</koken:link>
<koken:link share="tumblr">Tumblr</koken:link>
<koken:link share="google-plus">Google+</koken:link>
</li>
<!-- Display image and info about album assigned as essay topic -->
<koken:topics>
<li>
<strong>Related content:</strong>
<br>
<koken:loop>
<koken:link title="View {{ album.title }}">
<koken:img preset="small" />
</koken:link>
<br>
<koken:link title="View {{ album.title }}">
{{ album.title }}
</koken:link>
({{ album.counts.total }} images)
</koken:loop>
</li>
</koken:topics>
</ul>
</footer>
<!-- Display discussions or other data if enabled via a plugin (eg, our Disqus plugin) -->
<koken:discussion>
<h5>Comments</h5>
{{ discussion }}
</koken:discussion>
</article>
</div> <!-- close .lcol -->
<div class="rcol">
<aside>
<!-- Display links to other essays in this category -->
<koken:categories>
<koken:loop>
<section>
<h5>Other {{ labels.essay.plural case="lower" }} in {{ category.title }}</h5>
<koken:load source="essays" filter:category="{{ category.id }}">
<koken:loop>
<koken:link title="Read {{ essay.title }}">
{{ essay.title }}
</koken:link>
<br>
</koken:loop>
</koken:load>
</section>
</koken:loop>
</koken:categories>
<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 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="title="View all {{ labels.essay.plural case='lower' }} in {{ category.title }}"">
{{ category.title }} ({{ category.counts.total }})
</koken:link>
<br>
</koken:loop>
</koken:categories>
</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>
</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 essay found. Create one in Text.
</koken:note>
</koken:load>
<koken:include file="inc/footer.html" />