-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
372 lines (326 loc) · 15 KB
/
index.html
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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
<title>Coveo Atomic</title>
<script type="module" src="https://static.cloud.coveo.com/atomic/v1/atomic.esm.js"></script>
<link rel="stylesheet" href="https://static.cloud.coveo.com/atomic/v1/themes/coveo.css"/>
<script type="module" src="index.js"></script>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<atomic-search-interface>
<div class="header-bg"></div>
<atomic-search-box></atomic-search-box>
<div class="this-year-button">Filter for 2022 Content</div>
<atomic-facet-manager>
<atomic-category-facet field="geographicalhierarchy" label="World Atlas" with-search> </atomic-category-facet>
<atomic-facet field="author" label="Authors"></atomic-facet>
<atomic-facet field="language" label="Language"></atomic-facet>
<atomic-facet field="objecttype" label="Type" display-values-as="link"></atomic-facet>
<atomic-numeric-facet field="ytviewcount" label="Youtube Views" with-input="integer"></atomic-numeric-facet>
<atomic-numeric-facet field="ytlikecount" label="Youtube Likes" display-values-as="link">
<atomic-numeric-range start="0" end="1000" label="Unpopular"></atomic-numeric-range>
<atomic-numeric-range start="1000" end="8000" label="Well liked"></atomic-numeric-range>
<atomic-numeric-range start="8000" end="100000" label="Popular"></atomic-numeric-range>
<atomic-numeric-range start="100000" end="999999999" label="Treasured"></atomic-numeric-range>
</atomic-numeric-facet>
<atomic-numeric-facet field="sncost" label="Cost">
<atomic-format-currency currency="CAD"></atomic-format-currency>
</atomic-numeric-facet>
<atomic-rating-facet field="snrating" label="Rating" number-of-intervals="5"> </atomic-rating-facet>
<atomic-rating-range-facet facet-id="snrating_range" field="snrating" label="Rating Range" number-of-intervals="5">
</atomic-rating-range-facet>
<atomic-color-facet field="filetype" label="Files" number-of-values="6" sort-criteria="occurrences"></atomic-color-facet>
</atomic-facet-manager>
<atomic-breadbox></atomic-breadbox>
<div class="topbar">
<atomic-query-summary enable-duration="false"></atomic-query-summary>
<atomic-refine-toggle></atomic-refine-toggle>
<atomic-sort-dropdown>
<atomic-sort-expression label="relevance" expression="relevancy"></atomic-sort-expression>
<atomic-sort-expression label="most-recent" expression="date descending"></atomic-sort-expression>
</atomic-sort-dropdown>
</div>
<div class="results">
<atomic-did-you-mean></atomic-did-you-mean>
<atomic-result-list fields-to-include="snrating,sncost,ytvideoduration,ytthumbnailurl">
<!-- TODO: Task #1 -->
<atomic-result-template must-match-sourcetype="YouTube">
<template>
<style>
.custom-field {
display: inline-flex;
align-items: center;
}
.custom-field-label {
font-weight: bold;
margin-right: 0.25rem;
}
.custom-date-featured{
display: flex;
justify-content: space-between;
margin-bottom: 5px;
}
.custom-template-body{
display: flex;
flex-direction: row;
justify-content: space-between;
}
.custom-visual{
width: 25%;
}
.custom-info{
width: 70%;
display: flex;
flex-direction: column;
justify-content: space-around;
color: var(--atomic-neutral-dark);
}
.custom-info atomic-result-section-title{
font-size: 1.125rem;
}
.custom-visual img {
border-radius: 8%;
object-fit: fill;
}
.length-duration-section atomic-text{
font-weight: 700;
}
@media (max-width: 853px) {
.custom-visual{
width: 30%;
}
.custom-info{
width: 65%;
}
.custom-info .custom-excerpt{
margin-top: 10px;
}
.length-duration-section{
margin-top: 10px;
}
}
@media (max-width: 500px) {
.custom-visual{
width: 100%;
}
.custom-info{
width: 100%;
margin-top: 10px;
}
.custom-template-body{
flex-direction: column-reverse;
}
.custom-info atomic-result-section-title{
font-size: 1rem;
}
}
</style>
<section class="custom-date-featured" role="region" aria-label="Video Details">
<!-- Top Badges -->
<section>
<atomic-result-section-badges>
<atomic-field-condition must-match-is-top-result="true">
<atomic-result-badge label="Top Result"></atomic-result-badge>
</atomic-field-condition>
<atomic-field-condition must-match-is-featured="true">
<atomic-result-badge label="Featured"></atomic-result-badge>
</atomic-field-condition>
</atomic-result-section-badges>
</section>
<!-- Date -->
<span class="custom-field">
<span class="custom-field-label">Date:</span>
<atomic-result-date></atomic-result-date>
</span>
</section>
<section class="custom-template-body" role="main" aria-label="Video Content">
<!-- Title,Excerpt and Duration -->
<section class="custom-info">
<!-- Title -->
<atomic-result-section-title>
<atomic-result-link></atomic-result-link>
</atomic-result-section-title>
<!-- Excerpt -->
<div class="custom-excerpt">
<atomic-result-section-excerpt>
<atomic-result-text field="excerpt"></atomic-result-text>
</atomic-result-section-excerpt>
</div>
<!-- Duration -->
<section class="length-duration-section">
<atomic-result-section-title-metadata>
<!-- <atomic-result-text field="@ytvideoduration"></atomic-result-text> -->
<section class="custom-duration">
<atomic-field-condition class="field" if-defined="ytvideoduration">
<span class="field-label">
<atomic-text value="Length"></atomic-text>:
</span>
<atomic-result-number field="ytvideoduration" unit="second">
<atomic-format-unit unit="second" unit-display="short"></atomic-format-unit>
</atomic-result-number>
</atomic-field-condition>
</section>
<section class="custom-uri">
<atomic-result-printable-uri max-number-of-parts="3"></atomic-result-printable-uri>
</section>
</atomic-result-section-title-metadata>
</section>
</section>
<!-- Thumbnail -->
<div class="custom-visual">
<atomic-result-section-visual >
<atomic-result-image fallback="https://images.clubt.jp/thumbs/39961/448916/1.jpg?v=1685383876.893816"
field="ytthumbnailurl"></atomic-result-image>
</atomic-result-section-visual>
</div>
</section>
</template>
</atomic-result-template>
<atomic-result-template>
<template>
<style>
.field {
display: inline-flex;
align-items: center;
}
.field-label {
font-weight: bold;
margin-right: 0.25rem;
}
.thumbnail {
display: none;
width: 100%;
height: 100%;
}
.icon {
display: none;
}
.result-root.image-small .thumbnail,
.result-root.image-large .thumbnail {
display: inline-block;
}
.result-root.image-icon .icon {
display: inline-block;
}
.result-root.image-small atomic-result-section-visual,
.result-root.image-large atomic-result-section-visual {
border-radius: var(--atomic-border-radius-xl);
}
.salesforce-badge::part(result-badge-element) {
background-color: #44a1da;
color: white;
}
</style>
<atomic-result-section-visual>
<atomic-result-icon class="icon"></atomic-result-icon>
<img src="https://picsum.photos/350" class="thumbnail" />
</atomic-result-section-visual>
<atomic-result-section-badges>
<atomic-field-condition must-match-is-recommendation="true">
<atomic-result-badge label="Recommended"></atomic-result-badge>
</atomic-field-condition>
<atomic-field-condition must-match-is-top-result="true">
<atomic-result-badge label="Top Result"></atomic-result-badge>
</atomic-field-condition>
</atomic-result-section-badges>
<atomic-result-section-title>
<atomic-result-link></atomic-result-link>
</atomic-result-section-title>
<atomic-result-section-title-metadata>
<atomic-field-condition class="field" if-defined="snrating">
<atomic-result-rating field="snrating"></atomic-result-rating>
</atomic-field-condition>
<atomic-field-condition class="field" if-not-defined="snrating">
<atomic-result-printable-uri max-number-of-parts="3"></atomic-result-printable-uri>
</atomic-field-condition>
</atomic-result-section-title-metadata>
<atomic-result-section-excerpt>
<atomic-result-text field="excerpt"></atomic-result-text>
</atomic-result-section-excerpt>
<atomic-result-section-bottom-metadata>
<atomic-result-fields-list>
<atomic-field-condition class="field" if-defined="author">
<span class="field-label">
<atomic-text value="author"></atomic-text>:
</span>
<atomic-result-text field="author"></atomic-result-text>
</atomic-field-condition>
<atomic-field-condition class="field" if-defined="source">
<span class="field-label">
<atomic-text value="source"></atomic-text>:
</span>
<atomic-result-text field="source"></atomic-result-text>
</atomic-field-condition>
<atomic-field-condition class="field" if-defined="language">
<span class="field-label">
<atomic-text value="language"></atomic-text>:
</span>
<atomic-result-multi-value-text field="language"></atomic-result-multi-value-text>
</atomic-field-condition>
<atomic-field-condition class="field" if-defined="filetype">
<span class="field-label">
<atomic-text value="fileType"></atomic-text>:
</span>
<atomic-result-text field="filetype"></atomic-result-text>
</atomic-field-condition>
<atomic-field-condition class="field" if-defined="sncost">
<span class="field-label">Cost:</span>
<atomic-result-number field="sncost">
<atomic-format-currency currency="CAD"></atomic-format-currency>
</atomic-result-number>
</atomic-field-condition>
<span class="field">
<span class="field-label">Date:</span>
<atomic-result-date></atomic-result-date>
</span>
</atomic-result-fields-list>
</atomic-result-section-bottom-metadata>
<atomic-table-element label="Description">
<atomic-result-section-title>
<atomic-result-link></atomic-result-link>
</atomic-result-section-title>
<atomic-result-section-title-metadata>
<atomic-field-condition class="field" if-defined="snrating">
<atomic-result-rating field="snrating"></atomic-result-rating>
</atomic-field-condition>
<atomic-field-condition class="field" if-not-defined="snrating">
<atomic-result-printable-uri max-number-of-parts="3"></atomic-result-printable-uri>
</atomic-field-condition>
</atomic-result-section-title-metadata>
<atomic-result-section-excerpt>
<atomic-result-text field="excerpt"></atomic-result-text>
</atomic-result-section-excerpt>
</atomic-table-element>
<atomic-table-element label="author">
<atomic-result-text field="author"></atomic-result-text>
</atomic-table-element>
<atomic-table-element label="source">
<atomic-result-text field="source"></atomic-result-text>
</atomic-table-element>
<atomic-table-element label="language">
<atomic-result-text field="language"></atomic-result-text>
</atomic-table-element>
<atomic-table-element label="file-type">
<atomic-result-text field="filetype"></atomic-result-text>
</atomic-table-element>
</template>
</atomic-result-template>
</atomic-result-list>
</div>
<div class="pagination">
<atomic-load-more-results></atomic-load-more-results>
<!-- Alternative pagination
<atomic-pager></atomic-pager>
<atomic-results-per-page></atomic-results-per-page>
-->
</div>
<div class="status">
<atomic-query-error></atomic-query-error>
<atomic-no-results></atomic-no-results>
</div>
</atomic-search-interface>
</body>
</html>