|
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html dir="ltr" lang="en"> |
3 | 3 | <head> |
4 | | - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
5 | | - <meta charset="utf-8" /> |
6 | | - <meta |
7 | | - name="viewport" |
8 | | - content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" |
9 | | - /> |
| 4 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0"> |
10 | 7 | <title>Coveo Atomic</title> |
11 | 8 |
|
12 | | - <script |
13 | | - type="module" |
14 | | - src="https://static.cloud.coveo.com/atomic/v1/atomic.esm.js" |
15 | | - ></script> |
16 | | - <link |
17 | | - rel="stylesheet" |
18 | | - href="https://static.cloud.coveo.com/atomic/v1/themes/coveo.css" |
19 | | - /> |
| 9 | + <script type="module" src="https://static.cloud.coveo.com/atomic/v2.0/atomic.esm.js"></script> |
| 10 | + <link rel="stylesheet" href="https://static.cloud.coveo.com/atomic/2.0/themes/coveo.css"> |
20 | 11 | <script> |
21 | 12 | (async () => { |
22 | 13 | await customElements.whenDefined("atomic-search-interface"); |
|
130 | 121 |
|
131 | 122 | <body> |
132 | 123 | <atomic-aria-live></atomic-aria-live> |
133 | | - <atomic-search-interface fields-to-include="snrating,sncost"> |
| 124 | + <atomic-search-interface fields-to-include='["snrating","sncost"]'> |
134 | 125 | <atomic-search-layout> |
135 | 126 | <div class="header-bg"></div> |
136 | 127 | <atomic-layout-section section="search"> |
137 | 128 | <atomic-search-box></atomic-search-box> |
138 | 129 | </atomic-layout-section> |
139 | 130 | <atomic-layout-section section="facets"> |
140 | 131 | <atomic-facet-manager> |
141 | | - <atomic-category-facet |
142 | | - field="geographicalhierarchy" |
143 | | - label="World Atlas" |
144 | | - with-search |
145 | | - > |
| 132 | + <atomic-category-facet field="geographicalhierarchy" label="World Atlas" with-search> |
146 | 133 | </atomic-category-facet> |
147 | 134 | <atomic-facet field="author" label="Authors"></atomic-facet> |
148 | 135 | <atomic-facet field="language" label="Language"></atomic-facet> |
149 | | - <atomic-facet |
150 | | - field="objecttype" |
151 | | - label="Type" |
152 | | - display-values-as="link" |
153 | | - ></atomic-facet> |
154 | | - <atomic-facet |
155 | | - field="year" |
156 | | - label="Year" |
157 | | - display-values-as="box" |
158 | | - ></atomic-facet> |
159 | | - <atomic-numeric-facet |
160 | | - field="ytviewcount" |
161 | | - label="Youtube Views" |
162 | | - with-input="integer" |
163 | | - ></atomic-numeric-facet> |
164 | | - <atomic-numeric-facet |
165 | | - field="ytlikecount" |
166 | | - label="Youtube Likes" |
167 | | - display-values-as="link" |
168 | | - > |
169 | | - <atomic-numeric-range |
170 | | - start="0" |
171 | | - end="1000" |
172 | | - label="Unpopular" |
173 | | - ></atomic-numeric-range> |
174 | | - <atomic-numeric-range |
175 | | - start="1000" |
176 | | - end="8000" |
177 | | - label="Well liked" |
178 | | - ></atomic-numeric-range> |
179 | | - <atomic-numeric-range |
180 | | - start="8000" |
181 | | - end="100000" |
182 | | - label="Popular" |
183 | | - ></atomic-numeric-range> |
184 | | - <atomic-numeric-range |
185 | | - start="100000" |
186 | | - end="999999999" |
187 | | - label="Treasured" |
188 | | - ></atomic-numeric-range> |
| 136 | + <atomic-facet field="objecttype" label="Type" display-values-as="link"></atomic-facet> |
| 137 | + <atomic-facet field="year" label="Year" display-values-as="box"></atomic-facet> |
| 138 | + <atomic-numeric-facet field="ytviewcount" label="Youtube Views" with-input="integer"></atomic-numeric-facet> |
| 139 | + <atomic-numeric-facet field="ytlikecount" label="Youtube Likes" display-values-as="link"> |
| 140 | + <atomic-numeric-range start="0" end="1000" label="Unpopular"></atomic-numeric-range> |
| 141 | + <atomic-numeric-range start="1000" end="8000" label="Well liked"></atomic-numeric-range> |
| 142 | + <atomic-numeric-range start="8000" end="100000" label="Popular"></atomic-numeric-range> |
| 143 | + <atomic-numeric-range start="100000" end="999999999" label="Treasured"></atomic-numeric-range> |
189 | 144 | </atomic-numeric-facet> |
190 | 145 | <atomic-numeric-facet field="sncost" label="Cost"> |
191 | 146 | <atomic-format-currency currency="CAD"></atomic-format-currency> |
|
198 | 153 | <atomic-timeframe unit="quarter"></atomic-timeframe> |
199 | 154 | <atomic-timeframe unit="year"></atomic-timeframe> |
200 | 155 | </atomic-timeframe-facet> |
201 | | - <atomic-rating-facet |
202 | | - field="snrating" |
203 | | - label="Rating" |
204 | | - number-of-intervals="5" |
205 | | - > |
| 156 | + <atomic-rating-facet field="snrating" label="Rating" number-of-intervals="5"> |
206 | 157 | </atomic-rating-facet> |
207 | | - <atomic-rating-range-facet |
208 | | - facet-id="snrating_range" |
209 | | - field="snrating" |
210 | | - label="Rating Range" |
211 | | - number-of-intervals="5" |
212 | | - > |
| 158 | + <atomic-rating-range-facet facet-id="snrating_range" field="snrating" label="Rating Range" number-of-intervals="5"> |
213 | 159 | </atomic-rating-range-facet> |
214 | | - <atomic-color-facet |
215 | | - field="filetype" |
216 | | - label="Files" |
217 | | - number-of-values="6" |
218 | | - sort-criteria="occurrences" |
219 | | - ></atomic-color-facet> |
| 160 | + <atomic-color-facet field="filetype" label="Files" number-of-values="6" sort-criteria="occurrences"></atomic-color-facet> |
220 | 161 | </atomic-facet-manager> |
221 | 162 | </atomic-layout-section> |
222 | 163 | <atomic-layout-section section="main"> |
|
225 | 166 | <atomic-query-summary></atomic-query-summary> |
226 | 167 | <atomic-refine-toggle></atomic-refine-toggle> |
227 | 168 | <atomic-sort-dropdown> |
228 | | - <atomic-sort-expression |
229 | | - label="relevance" |
230 | | - expression="relevancy" |
231 | | - ></atomic-sort-expression> |
232 | | - <atomic-sort-expression |
233 | | - label="most-recent" |
234 | | - expression="date descending" |
235 | | - ></atomic-sort-expression> |
| 169 | + <atomic-sort-expression label="relevance" expression="relevancy"></atomic-sort-expression> |
| 170 | + <atomic-sort-expression label="most-recent" expression="date descending"></atomic-sort-expression> |
236 | 171 | </atomic-sort-dropdown> |
237 | 172 | <atomic-did-you-mean></atomic-did-you-mean> |
238 | 173 | </atomic-layout-section> |
|
287 | 222 | </style> |
288 | 223 | <atomic-result-section-visual> |
289 | 224 | <atomic-result-icon class="icon"></atomic-result-icon> |
290 | | - <img src="https://picsum.photos/350" class="thumbnail" /> |
| 225 | + <img src="https://picsum.photos/350" class="thumbnail"> |
291 | 226 | </atomic-result-section-visual> |
292 | 227 | <atomic-result-section-badges> |
293 | 228 | <atomic-field-condition must-match-sourcetype="Salesforce"> |
294 | | - <atomic-result-badge |
295 | | - label="Salesforce" |
296 | | - class="salesforce-badge" |
297 | | - ></atomic-result-badge> |
| 229 | + <atomic-result-badge label="Salesforce" class="salesforce-badge"></atomic-result-badge> |
298 | 230 | </atomic-field-condition> |
299 | | - <atomic-result-badge |
300 | | - field="language" |
301 | | - icon="https://raw.githubusercontent.com/Rush/Font-Awesome-SVG-PNG/master/black/svg/language.svg" |
302 | | - ></atomic-result-badge> |
| 231 | + <atomic-result-badge field="language" icon="https://raw.githubusercontent.com/Rush/Font-Awesome-SVG-PNG/master/black/svg/language.svg"></atomic-result-badge> |
303 | 232 | </atomic-result-section-badges> |
304 | | - <atomic-result-section-title |
305 | | - ><atomic-result-link></atomic-result-link |
306 | | - ></atomic-result-section-title> |
| 233 | + <atomic-result-section-title><atomic-result-link></atomic-result-link></atomic-result-section-title> |
307 | 234 | <atomic-result-section-title-metadata> |
308 | 235 | <atomic-field-condition class="field" if-defined="snrating"> |
309 | | - <atomic-result-rating |
310 | | - field="snrating" |
311 | | - ></atomic-result-rating> |
| 236 | + <atomic-result-rating field="snrating"></atomic-result-rating> |
312 | 237 | </atomic-field-condition> |
313 | | - <atomic-field-condition |
314 | | - class="field" |
315 | | - if-not-defined="snrating" |
316 | | - > |
317 | | - <atomic-result-printable-uri |
318 | | - max-number-of-parts="3" |
319 | | - ></atomic-result-printable-uri> |
| 238 | + <atomic-field-condition class="field" if-not-defined="snrating"> |
| 239 | + <atomic-result-printable-uri max-number-of-parts="3"></atomic-result-printable-uri> |
320 | 240 | </atomic-field-condition> |
321 | 241 | </atomic-result-section-title-metadata> |
322 | | - <atomic-result-section-excerpt |
323 | | - ><atomic-result-text field="excerpt"></atomic-result-text |
324 | | - ></atomic-result-section-excerpt> |
| 242 | + <atomic-result-section-excerpt><atomic-result-text field="excerpt"></atomic-result-text></atomic-result-section-excerpt> |
325 | 243 | <atomic-result-section-bottom-metadata> |
326 | 244 | <atomic-result-fields-list> |
327 | 245 | <atomic-field-condition class="field" if-defined="author"> |
328 | | - <span class="field-label" |
329 | | - ><atomic-text value="author"></atomic-text>:</span |
330 | | - > |
| 246 | + <span class="field-label"><atomic-text value="author"></atomic-text>:</span> |
331 | 247 | <atomic-result-text field="author"></atomic-result-text> |
332 | 248 | </atomic-field-condition> |
333 | 249 |
|
334 | 250 | <atomic-field-condition class="field" if-defined="source"> |
335 | | - <span class="field-label" |
336 | | - ><atomic-text value="source"></atomic-text>:</span |
337 | | - > |
| 251 | + <span class="field-label"><atomic-text value="source"></atomic-text>:</span> |
338 | 252 | <atomic-result-text field="source"></atomic-result-text> |
339 | 253 | </atomic-field-condition> |
340 | 254 |
|
341 | | - <atomic-field-condition |
342 | | - class="field" |
343 | | - if-defined="language" |
344 | | - > |
345 | | - <span class="field-label" |
346 | | - ><atomic-text value="language"></atomic-text>:</span |
347 | | - > |
348 | | - <atomic-result-multi-value-text |
349 | | - field="language" |
350 | | - ></atomic-result-multi-value-text> |
| 255 | + <atomic-field-condition class="field" if-defined="language"> |
| 256 | + <span class="field-label"><atomic-text value="language"></atomic-text>:</span> |
| 257 | + <atomic-result-multi-value-text field="language"></atomic-result-multi-value-text> |
351 | 258 | </atomic-field-condition> |
352 | 259 |
|
353 | | - <atomic-field-condition |
354 | | - class="field" |
355 | | - if-defined="filetype" |
356 | | - > |
357 | | - <span class="field-label" |
358 | | - ><atomic-text value="fileType"></atomic-text>:</span |
359 | | - > |
360 | | - <atomic-result-text |
361 | | - field="filetype" |
362 | | - ></atomic-result-text> |
| 260 | + <atomic-field-condition class="field" if-defined="filetype"> |
| 261 | + <span class="field-label"><atomic-text value="fileType"></atomic-text>:</span> |
| 262 | + <atomic-result-text field="filetype"></atomic-result-text> |
363 | 263 | </atomic-field-condition> |
364 | 264 |
|
365 | 265 | <atomic-field-condition class="field" if-defined="sncost"> |
366 | 266 | <span class="field-label">Cost:</span> |
367 | 267 | <atomic-result-number field="sncost"> |
368 | | - <atomic-format-currency |
369 | | - currency="CAD" |
370 | | - ></atomic-format-currency> |
| 268 | + <atomic-format-currency currency="CAD"></atomic-format-currency> |
371 | 269 | </atomic-result-number> |
372 | 270 | </atomic-field-condition> |
373 | 271 |
|
|
0 commit comments