-
Notifications
You must be signed in to change notification settings - Fork 28
/
archive.albums.lens
176 lines (144 loc) · 5.24 KB
/
archive.albums.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
<koken:include file="inc/header.html" />
<!-- Add Facebook Open Graph and Twitter Cards metadata for nicer sharing -->
<!-- Using a separate koken:load for this so it doesn't conflict with page data -->
<koken:load limit="4">
<koken:head>
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:title" content="{{ labels.album.plural }}" />
<meta property="og:description" content="{{ site.description strip_html='true' }}" />
<meta property="og:type" content="website" />
<koken:first>
<koken:covers>
<koken:first>
<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:first>
</koken:covers>
</koken:first>
<meta property="og:url" content="{{ location.site_url }}{{ location.here }}" />
<koken:not empty="profile.twitter">
<meta name="twitter:card" content="gallery" />
<meta name="twitter:site" content="@{{ profile.twitter }}" />
<meta name="twitter:creator" content="@{{ profile.twitter }}" />
<koken:loop>
<koken:covers>
<koken:shift>
<meta name="twitter:image{{ index }}" content="{{ content.presets.medium_large.cropped.url }}">
</koken:shift>
</koken:covers>
</koken:loop>
</koken:not>
</koken:head>
</koken:load>
<!-- Load this template's source data (albums) and limit for pagination -->
<koken:load limit="20">
<!-- Display breadcrumb navigation -->
<nav id="bread">
<koken:breadcrumbs />
</nav>
<div class="lcol">
<!-- Loop over all albums, render each with the following -->
<koken:loop>
<!-- wrapper used for keyboard navigation targetting -->
<section class="item">
<!-- Display each album's first album cover, link to album.lens -->
<koken:link title="View {{ album.title }}">
<koken:img />
</koken:link>
<!-- To display all covers, use koken:covers -->
<!--
<koken:covers>
<koken:loop>
<koken:link title="View {{ album.title }}">
<koken:img size="1:1" />
</koken:link>
</koken:loop>
</koken:covers>
-->
<!-- Display each album's title, link to album.lens -->
<h2><koken:link title="View {{ album.title }}">{{ album.title }}</koken:link></h2>
<!-- Display the album's summary (shorter than description) -->
{{ album.summary paragraphs="true" }}
<footer>
<ul class="blank">
<!-- Display the timestamp -->
<li>
<strong>Published:</strong>
<!-- Link to view all albums published the same month -->
<koken:link to="archive" title="View all albums published this month">
<koken:time />
</koken:link>
</li>
<!-- Display album categories, link each to archive.albums.lens -->
<koken:categories>
<li>
<strong>{{ labels.category.plural }}:</strong>
<koken:loop separator=", ">
<koken:link title="View all {{ labels.album.plural case='lower' }} in {{ category.title }}">
{{ category.title }}
</koken:link>
</koken:loop>
</li>
</koken:categories>
<!-- Display album tags, link each to archive.albums.lens -->
<koken:tags>
<li>
<strong>{{ labels.tag.plural }}:</strong>
<koken:loop separator=" ">
<koken:link title="View all {{ labels.album.plural case='lower' }} in #{{ tag.title }}">
#{{ tag.title }}
</koken:link>
</koken:loop>
</li>
</koken:tags>
</ul>
</footer>
</section>
</koken:loop>
<!-- Display pagination links -->
<koken:include file="inc/pagination.html" />
</div> <!-- close .lcol -->
<div class="rcol">
<aside>
<section>
<!-- Links to view albums by publish date in archive.albums.lens -->
<h5>View {{ labels.album.plural case="lower" }} by date</h5>
<koken:dates limit_to="albums">
<koken:select label="Select month" />
</koken:dates>
</section>
<section>
<!-- Links to view albums by category in archive.albums.lens -->
<koken:categories limit_to="albums" order_by="album_count">
<h5>View {{ labels.album.plural case="lower" }} by {{ labels.category.singular case="lower" }}</h5>
<koken:loop>
<koken:link title="View all {{ labels.album.plural case='lower' }} in {{ category.title }}">
{{ category.title }} ({{ category.counts.total }})
</koken:link>
<br>
</koken:loop>
</koken:categories>
</section>
<section>
<!-- Links to view albums by tag in archive.albums.lens -->
<koken:tags limit_to="albums" order_by="album_count">
<h5>View {{ labels.album.plural case="lower" }} by {{ labels.tag.singular case="lower" }}</h5>
<koken:loop>
<koken:link title="View all {{ labels.album.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 albums found
</koken:note>
</koken:load>
<koken:include file="inc/footer.html" />