-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontents.lens
117 lines (87 loc) · 2.81 KB
/
contents.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
<koken:include file="inc/header.html" />
<div id="content">
<!-- Load this template's source data (contents) and limit for pagination -->
<koken:load limit="50">
<div class="lcol">
<!-- Loop over all public content, display info about each, link to content.lens -->
<koken:loop>
<!-- wrapper used for keyboard navigation targetting -->
<div class="item">
<h2>
<koken:link title="View {{ content.filename }}">
{{ content.title | content.filename }}
</koken:link>
</h2>
<!-- Displayed if the asset is an image -->
<koken:content_image>
<!-- Display image title, fallback to file name if empty, link to content.lens -->
<koken:link title="View {{ content.filename }}">
<koken:img />
</koken:link>
</koken:content_image>
<!-- Displayed if the asset is a video -->
<koken:content_video>
<!-- Load the video -->
<koken:video />
</koken:content_video>
<p>
{{ content.caption }}
</p>
<p>
<strong>Uploaded:</strong> {{ content.uploaded_on }}
</p>
</div>
</koken:loop>
<!-- Display pagination links -->
<p>
<koken:include file="inc/pagination.html" />
</p>
</div> <!-- close .lcol -->
<div class="rcol">
<!-- Links to content archived by date -->
<koken:load source="archives" summary="true" limit_to="content">
<h3>View content by date</h3>
<koken:loop>
<koken:link to="archive_contents">
{{ title }} ({{ counts.content }})
</koken:link>
<br>
</koken:loop>
</koken:load>
<!-- Links to content archived by category -->
<koken:load source="categories" summary="true" limit_to="content" order_by="content_count">
<h3>View content by category</h3>
<koken:loop>
<koken:link to="archive_contents">
{{ title }} ({{ counts.content }})
</koken:link>
<br>
</koken:loop>
</koken:load>
<!-- Links to content archived by tag -->
<koken:load source="tags" summary="true" limit_to="content" order_by="content_count">
<h3>View content by tag</h3>
<koken:loop>
<koken:link to="archive_contents">
{{ title }} ({{ counts.content }})
</koken:link>
<br>
</koken:loop>
</koken:load>
<!-- Display a link to the "All uploads" RSS feed -->
<h3>RSS</h3>
<p>
<a href="{{ rss.contents }}">Subscribe to latest uploads</a>
</p>
</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 uploads found. Upload some to the Library.
</koken:note>
</koken:load>
</div> <!-- close #content -->
<!-- Turn on keyboard scrolling (left/right arrow keys) for items -->
<koken:keyboard_scroll element="div.item" />
<koken:include file="inc/footer.html" />