-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathcontent.lens
282 lines (237 loc) · 8.33 KB
/
content.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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<koken:include file="inc/header.html" />
<!-- Load this template's source data (content) -->
<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="{{ content.title|content.filename strip_html="true" }}" />
<meta property="og:description" content="{{ content.caption strip_html="true" }}" />
<meta property="og:type" content="website" />
<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 }}" />
<meta property="og:url" content="{{ content.url }}" />
<koken:content_image>
<koken:not empty="profile.twitter">
<meta name="twitter:card" content="photo" />
<meta name="twitter:site" content="@{{ profile.twitter }}" />
<meta name="twitter:creator" content="@{{ profile.twitter }}" />
</koken:not>
</koken:content_image>
</koken:head>
<!-- Display breadcrumb navigation -->
<nav id="bread" class="clearfix">
<!-- Display pagination links -->
<div id="content-pag">
<!-- Checks to see if content has a parent album. If so, label pagination links differently -->
<koken:parent>
<koken:variable name="previous_label" value="Previous" />
<koken:variable name="next_label" value="Next" />
<koken:else>
<koken:variable name="previous_label" value="Newer" />
<koken:variable name="next_label" value="Older" />
</koken:parent>
<koken:previous>
<koken:link title="{{ previous_label }}" bind_to_key="left">← {{ previous_label }}</koken:link>
<koken:else>
<!-- display no link -->
</koken:previous>
<!-- Display the context the image/video is being viewed in -->
<koken:context>
<!-- Viewing image/video with contextual criteria -->
<koken:link title="View {{ context.title }}">
{{ context.title }}
</koken:link>
<span>({{ context.position }} of {{ context.total }})</span>
<koken:else>
<!-- Viewing image/video independently -->
<koken:link to="contents" title="{{ labels.content.plural }}">{{ labels.content.plural }}</koken:link>
<span>({{ context.position }} of {{ context.total }})</span>
</koken:context>
<koken:next>
<koken:link title="{{ next_label }}" bind_to_key="right">{{ next_label }} →</koken:link>
<koken:else>
<!-- display no link -->
</koken:next>
</div>
<koken:breadcrumbs />
</nav>
<!-- If image/video visibility is unlisted, show message -->
<koken:unlisted>
<p class="unlisted">
This page is unlisted. Please don't share a link to it.
</p>
</koken:unlisted>
<!-- Displayed if content is an image -->
<koken:content_image>
<!-- Load image in lightbox viewer if clicked -->
<koken:link lightbox="true" bind_to_key="l" title="View in lightbox">
<koken:img />
</koken:link>
</koken:content_image>
<!-- Displayed if content is a video -->
<koken:content_video>
<!-- Load the video -->
<koken:video />
</koken:content_video>
<!-- Display the content title or filename as a backup -->
<h2>
{{ content.title | content.filename }}
</h2>
<!-- Display the content caption -->
{{ content.caption paragraphs="true" }}
<footer>
<ul class="blank">
<!-- Opens the content in the lightbox viewer -->
<li>
<strong>Lightbox:</strong>
<koken:link lightbox="true" class="button" title="View in lightbox">View in lightbox</koken:link>
</li>
<!-- Display the timestamp (date published) -->
<!-- Link to archive.contents.lens to view all content captured the same month -->
<li>
<strong>Published:</strong>
<koken:link to="archive" title="View all {{ labels.content.plural case='lower' }} from this month">
<!-- Publish the date it was captured -->
<koken:time />
</koken:link>
</li>
<!-- Display uploaded date -->
<li>
<strong>Uploaded:</strong> <koken:time data="date_uploaded" />
</li>
<!-- Display duration if an imported video -->
<koken:content_video>
<li>
<strong>Duration:</strong> {{ content.duration }}
</li>
</koken:content_video>
<!-- Display assigned categories -->
<koken:categories>
<li>
<strong>Categories:</strong>
<koken:loop separator=", ">
<!-- Link each to archive.contents.lens to view other images/videos assigned same category -->
<koken:link title="View all {{ labels.content.plural case='lower' }} in {{ category.title }}">
{{ category.title }}
</koken:link>
</koken:loop>
</li>
</koken:categories>
<!-- Display assigned tags -->
<koken:tags>
<li>
<strong>Tags:</strong>
<koken:loop separator=" ">
<!-- Link each to archive.contents.lens to view other images/videos assigned same tag -->
<koken:link title="View all {{ labels.content.plural case='lower' }} in #{{ tag.title }}">
#{{ tag.title }}
</koken:link>
</koken:loop>
</li>
</koken:tags>
<!-- Display EXIF data -->
<koken:exif>
<li class="comma_sep">
<strong>EXIF:</strong>
<koken:not empty="exif.model">
<span>{{ exif.model }}</span>
</koken:not>
<koken:not empty="exif.exposure">
<span>{{ exif.exposure }}</span>
</koken:not>
<koken:not empty="exif.aperture">
<span>{{ exif.aperture }}</span>
</koken:not>
<koken:not empty="exif.focal_length">
<span>{{ exif.focal_length }}</span>
</koken:not>
<koken:not empty="exif.iso_speed_ratings">
<span>{{ exif.iso_speed_ratings }}</span>
</koken:not>
</li>
</koken:exif>
<!-- Display IPTC data -->
<koken:iptc>
<li>
<strong>IPTC:</strong>
<koken:loop separator=" /">
{{ iptc.label }}: {{ iptc.value }}
</koken:loop>
</li>
</koken:iptc>
<!-- Display content license -->
<li>
<strong>License:</strong>
{{ content.license.clean }}
</li>
<!-- If content is an image and allows downloading, show download link -->
<koken:max_download>
<li>
<strong>Download image:</strong>
<koken:link title="Download image">
{{ max_download.label }} ({{ max_download.width }}x{{ max_download.height }})
</koken:link>
</li>
<koken:else>
<li>
<strong>Download image: </strong>User has disabled downloads for this image.
</li>
</koken:max_download>
<!-- If viewing content in the context of an album, display link to parent album -->
<koken:parent>
<li>
<strong>From the album:</strong>
<koken:link title="View {{ album.title }}">
{{ album.title }}
</koken:link>
</li>
</koken:parent>
<!-- If content is included in one or more albums, display links to each album -->
<koken:albums>
<li>
<strong>Albums:</strong>
<koken:loop>
<koken:link title="View {{ album.title }}">
{{ album.title }}
</koken:link>
</koken:loop>
</li>
</koken:albums>
<!-- If content is imported from elsewhere (Vimeo, Instagram), show link to original page -->
<koken:not empty="{{ content.source.title }}">
<li>
<strong>Imported from:</strong>
<a href="{{ content.source.url }}" onclick="return !window.open(this.href);" title="View at {{ content.source.title }}">{{ content.source.title }}</a>
</li>
</koken:not>
<!-- Display a link to Google Maps to show where this photo was taken -->
<koken:geolocation>
<li>
<strong>Geolocation:</strong>
<a href="http://maps.google.com/?q={{ geolocation.latitude }},{{ geolocation.longitude }}" target="_blank">View map</a>
</li>
</koken:geolocation>
<!-- Display social share links if the content has public visibility -->
<koken:public>
<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>
</koken:public>
</ul>
</footer>
<!-- Fallback content if no data was loaded by koken:load -->
<koken:else>
<!-- Display fallback message in Site editor only -->
<koken:note>
No content found
</koken:note>
</koken:load>
<koken:include file="inc/footer.html" />