@internetarchive/collection-browser 3.3.0 → 3.3.1-alpha3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.editorconfig +29 -29
  2. package/.github/workflows/ci.yml +27 -27
  3. package/.github/workflows/gh-pages-main.yml +39 -39
  4. package/.github/workflows/npm-publish.yml +39 -39
  5. package/.github/workflows/pr-preview.yml +38 -38
  6. package/.husky/pre-commit +4 -4
  7. package/.prettierignore +1 -1
  8. package/LICENSE +661 -661
  9. package/README.md +83 -83
  10. package/dist/src/collection-browser.js +683 -683
  11. package/dist/src/collection-browser.js.map +1 -1
  12. package/dist/src/collection-facets/more-facets-content.js +118 -118
  13. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  14. package/dist/src/collection-facets.js +266 -266
  15. package/dist/src/collection-facets.js.map +1 -1
  16. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  17. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  18. package/dist/src/data-source/models.js.map +1 -1
  19. package/dist/src/tiles/base-tile-component.js.map +1 -1
  20. package/dist/src/tiles/grid/account-tile.js +36 -36
  21. package/dist/src/tiles/grid/account-tile.js.map +1 -1
  22. package/dist/src/tiles/grid/collection-tile.js +77 -77
  23. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  24. package/dist/src/tiles/grid/item-tile.js +137 -137
  25. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  26. package/dist/src/tiles/list/tile-list-compact.js +99 -99
  27. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  28. package/dist/src/tiles/list/tile-list.js +297 -297
  29. package/dist/src/tiles/list/tile-list.js.map +1 -1
  30. package/dist/src/tiles/tile-dispatcher.js +203 -203
  31. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  32. package/dist/src/utils/format-date.js.map +1 -1
  33. package/dist/test/collection-browser.test.js +189 -189
  34. package/dist/test/collection-browser.test.js.map +1 -1
  35. package/dist/test/tiles/grid/item-tile.test.js +77 -77
  36. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  37. package/dist/test/tiles/list/tile-list-compact.test.js +70 -70
  38. package/dist/test/tiles/list/tile-list-compact.test.js.map +1 -1
  39. package/dist/test/tiles/list/tile-list.test.js +126 -126
  40. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  41. package/dist/test/utils/format-date.test.js.map +1 -1
  42. package/eslint.config.mjs +53 -53
  43. package/index.html +24 -24
  44. package/local.archive.org.cert +86 -86
  45. package/local.archive.org.key +27 -27
  46. package/package.json +117 -117
  47. package/renovate.json +6 -6
  48. package/src/collection-browser.ts +2829 -2829
  49. package/src/collection-facets/more-facets-content.ts +639 -639
  50. package/src/collection-facets.ts +995 -995
  51. package/src/data-source/collection-browser-data-source.ts +1401 -1401
  52. package/src/data-source/collection-browser-query-state.ts +65 -65
  53. package/src/data-source/models.ts +43 -43
  54. package/src/tiles/base-tile-component.ts +65 -65
  55. package/src/tiles/grid/account-tile.ts +113 -113
  56. package/src/tiles/grid/collection-tile.ts +163 -163
  57. package/src/tiles/grid/item-tile.ts +340 -340
  58. package/src/tiles/list/tile-list-compact.ts +239 -239
  59. package/src/tiles/list/tile-list.ts +700 -700
  60. package/src/tiles/tile-dispatcher.ts +490 -490
  61. package/src/utils/format-date.ts +62 -62
  62. package/test/collection-browser.test.ts +2403 -2403
  63. package/test/tiles/grid/item-tile.test.ts +520 -520
  64. package/test/tiles/list/tile-list-compact.test.ts +282 -282
  65. package/test/tiles/list/tile-list.test.ts +552 -552
  66. package/test/utils/format-date.test.ts +89 -89
  67. package/tsconfig.json +20 -20
  68. package/web-dev-server.config.mjs +30 -30
  69. package/web-test-runner.config.mjs +41 -41
@@ -37,41 +37,41 @@ let TileList = class TileList extends BaseTileComponent {
37
37
  this.collectionLinks = [];
38
38
  }
39
39
  render() {
40
- return html `
41
- <div id="list-line" class="${this.classSize}">
40
+ return html `
41
+ <div id="list-line" class="${this.classSize}">
42
42
  ${this.classSize === 'mobile'
43
43
  ? this.mobileTemplate
44
- : this.desktopTemplate}
45
- </div>
44
+ : this.desktopTemplate}
45
+ </div>
46
46
  `;
47
47
  }
48
48
  /**
49
49
  * Templates
50
50
  */
51
51
  get mobileTemplate() {
52
- return html `
53
- <div id="list-line-top">
54
- <div id="list-line-left">${this.imageBlockTemplate}</div>
55
- <div id="list-line-right">
56
- <div id="title-line">
57
- <div id="title">${this.titleTemplate}</div>
58
- ${this.iconRightTemplate}
59
- </div>
60
- </div>
61
- </div>
62
- <div id="list-line-bottom">${this.detailsTemplate}</div>
52
+ return html `
53
+ <div id="list-line-top">
54
+ <div id="list-line-left">${this.imageBlockTemplate}</div>
55
+ <div id="list-line-right">
56
+ <div id="title-line">
57
+ <div id="title">${this.titleTemplate}</div>
58
+ ${this.iconRightTemplate}
59
+ </div>
60
+ </div>
61
+ </div>
62
+ <div id="list-line-bottom">${this.detailsTemplate}</div>
63
63
  `;
64
64
  }
65
65
  get desktopTemplate() {
66
- return html `
67
- <div id="list-line-left">${this.imageBlockTemplate}</div>
68
- <div id="list-line-right">
69
- <div id="title-line">
70
- <div id="title">${this.titleTemplate}</div>
71
- ${this.iconRightTemplate}
72
- </div>
73
- ${this.detailsTemplate}
74
- </div>
66
+ return html `
67
+ <div id="list-line-left">${this.imageBlockTemplate}</div>
68
+ <div id="list-line-right">
69
+ <div id="title-line">
70
+ <div id="title">${this.titleTemplate}</div>
71
+ ${this.iconRightTemplate}
72
+ </div>
73
+ ${this.detailsTemplate}
74
+ </div>
75
75
  `;
76
76
  }
77
77
  get imageBlockTemplate() {
@@ -80,49 +80,49 @@ let TileList = class TileList extends BaseTileComponent {
80
80
  return nothing;
81
81
  const isCollection = this.model.mediatype === 'collection';
82
82
  const href = this.displayValueProvider.itemPageUrl(this.model.identifier, isCollection);
83
- return html `<a
84
- id="image-link"
85
- title=${msg(str `View ${(_a = this.model) === null || _a === void 0 ? void 0 : _a.title}`)}
86
- href=${href}
87
- >
88
- <image-block
89
- .model=${this.model}
90
- .baseImageUrl=${this.baseImageUrl}
91
- .isCompactTile=${false}
92
- .isListTile=${true}
93
- .viewSize=${this.classSize}
94
- .loggedIn=${this.loggedIn}
95
- .suppressBlurring=${this.suppressBlurring}
96
- >
97
- </image-block>
83
+ return html `<a
84
+ id="image-link"
85
+ title=${msg(str `View ${(_a = this.model) === null || _a === void 0 ? void 0 : _a.title}`)}
86
+ href=${href}
87
+ >
88
+ <image-block
89
+ .model=${this.model}
90
+ .baseImageUrl=${this.baseImageUrl}
91
+ .isCompactTile=${false}
92
+ .isListTile=${true}
93
+ .viewSize=${this.classSize}
94
+ .loggedIn=${this.loggedIn}
95
+ .suppressBlurring=${this.suppressBlurring}
96
+ >
97
+ </image-block>
98
98
  </a> `;
99
99
  }
100
100
  get detailsTemplate() {
101
- return html `
102
- ${this.itemLineTemplate} ${this.creatorTemplate}
103
- <div id="dates-line">
104
- ${this.datePublishedTemplate} ${this.dateSortByTemplate}
105
- ${this.webArchivesCaptureDatesTemplate}
106
- </div>
107
- <div id="views-line">
108
- ${this.viewsTemplate} ${this.ratingTemplate} ${this.reviewsTemplate}
109
- </div>
110
- ${this.topicsTemplate} ${this.collectionsTemplate}
111
- ${this.descriptionTemplate} ${this.textSnippetsTemplate}
112
- ${this.reviewBlockTemplate}
101
+ return html `
102
+ ${this.itemLineTemplate} ${this.creatorTemplate}
103
+ <div id="dates-line">
104
+ ${this.datePublishedTemplate} ${this.dateSortByTemplate}
105
+ ${this.webArchivesCaptureDatesTemplate}
106
+ </div>
107
+ <div id="views-line">
108
+ ${this.viewsTemplate} ${this.ratingTemplate} ${this.reviewsTemplate}
109
+ </div>
110
+ ${this.topicsTemplate} ${this.collectionsTemplate}
111
+ ${this.descriptionTemplate} ${this.textSnippetsTemplate}
112
+ ${this.reviewBlockTemplate}
113
113
  `;
114
114
  }
115
115
  // Data templates
116
116
  get iconRightTemplate() {
117
117
  var _a;
118
- return html `
119
- <a
120
- id="icon-right"
121
- href=${this.mediatypeURL}
122
- title=${msg(str `See more: ${(_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype}`)}
123
- >
124
- <tile-mediatype-icon .model=${this.model}> </tile-mediatype-icon>
125
- </a>
118
+ return html `
119
+ <a
120
+ id="icon-right"
121
+ href=${this.mediatypeURL}
122
+ title=${msg(str `See more: ${(_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype}`)}
123
+ >
124
+ <tile-mediatype-icon .model=${this.model}> </tile-mediatype-icon>
125
+ </a>
126
126
  `;
127
127
  }
128
128
  get titleTemplate() {
@@ -133,8 +133,8 @@ let TileList = class TileList extends BaseTileComponent {
133
133
  // If the model has a server-specified href, use it
134
134
  // Otherwise construct a details link using the identifier
135
135
  return ((_b = this.model) === null || _b === void 0 ? void 0 : _b.href)
136
- ? html `<a href="${this.baseNavigationUrl}${this.model.href}"
137
- >${(_c = this.model.title) !== null && _c !== void 0 ? _c : this.model.identifier}</a
136
+ ? html `<a href="${this.baseNavigationUrl}${this.model.href}"
137
+ >${(_c = this.model.title) !== null && _c !== void 0 ? _c : this.model.identifier}</a
138
138
  >`
139
139
  : this.detailsLink(this.model.identifier, this.model.title, this.model.mediatype === 'collection');
140
140
  }
@@ -152,11 +152,11 @@ let TileList = class TileList extends BaseTileComponent {
152
152
  if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.source)) {
153
153
  return nothing;
154
154
  }
155
- return html `
156
- <div id="source" class="metadata">
157
- ${this.labelTemplate(msg('Source'))}
158
- ${this.searchLink('source', this.model.source)}
159
- </div>
155
+ return html `
156
+ <div id="source" class="metadata">
157
+ ${this.labelTemplate(msg('Source'))}
158
+ ${this.searchLink('source', this.model.source)}
159
+ </div>
160
160
  `;
161
161
  }
162
162
  get volumeTemplate() {
@@ -171,23 +171,23 @@ let TileList = class TileList extends BaseTileComponent {
171
171
  var _a, _b, _c;
172
172
  // "Archivist since" if account
173
173
  if (((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'account') {
174
- return html `
175
- <div id="creator" class="metadata">
176
- <span class="label"
177
- >${(_b = this.displayValueProvider.accountLabel) !== null && _b !== void 0 ? _b : nothing}</span
178
- >
179
- </div>
174
+ return html `
175
+ <div id="creator" class="metadata">
176
+ <span class="label"
177
+ >${(_b = this.displayValueProvider.accountLabel) !== null && _b !== void 0 ? _b : nothing}</span
178
+ >
179
+ </div>
180
180
  `;
181
181
  }
182
182
  // "Creator" if not account tile
183
183
  if (!((_c = this.model) === null || _c === void 0 ? void 0 : _c.creators) || this.model.creators.length === 0) {
184
184
  return nothing;
185
185
  }
186
- return html `
187
- <div id="creator" class="metadata">
188
- ${this.labelTemplate(msg('By'))}
189
- ${join(map(this.model.creators, id => this.searchLink('creator', id)), ', ')}
190
- </div>
186
+ return html `
187
+ <div id="creator" class="metadata">
188
+ ${this.labelTemplate(msg('By'))}
189
+ ${join(map(this.model.creators, id => this.searchLink('creator', id)), ', ')}
190
+ </div>
191
191
  `;
192
192
  }
193
193
  get datePublishedTemplate() {
@@ -239,22 +239,22 @@ let TileList = class TileList extends BaseTileComponent {
239
239
  if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.subjects) || this.model.subjects.length === 0) {
240
240
  return nothing;
241
241
  }
242
- return html `
243
- <div id="topics" class="metadata">
244
- ${this.labelTemplate(msg('Topics'))}
245
- ${join(map(this.model.subjects, id => this.searchLink('subject', id)), ', ')}
246
- </div>
242
+ return html `
243
+ <div id="topics" class="metadata">
244
+ ${this.labelTemplate(msg('Topics'))}
245
+ ${join(map(this.model.subjects, id => this.searchLink('subject', id)), ', ')}
246
+ </div>
247
247
  `;
248
248
  }
249
249
  get collectionsTemplate() {
250
250
  if (!this.collectionLinks || this.collectionLinks.length === 0) {
251
251
  return nothing;
252
252
  }
253
- return html `
254
- <div id="collections" class="metadata">
255
- ${this.labelTemplate(msg('Collections'))}
256
- ${join(this.collectionLinks, ', ')}
257
- </div>
253
+ return html `
254
+ <div id="collections" class="metadata">
255
+ ${this.labelTemplate(msg('Collections'))}
256
+ ${join(this.collectionLinks, ', ')}
257
+ </div>
258
258
  `;
259
259
  }
260
260
  get descriptionTemplate() {
@@ -268,23 +268,23 @@ let TileList = class TileList extends BaseTileComponent {
268
268
  if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.review))
269
269
  return nothing;
270
270
  const { reviewtitle, reviewbody, stars } = this.model.review;
271
- return html `
272
- <review-block
273
- viewsize="list"
274
- title=${ifDefined(reviewtitle)}
275
- body=${ifDefined(reviewbody)}
276
- starRating=${ifDefined(stars)}
277
- >
278
- </review-block>
271
+ return html `
272
+ <review-block
273
+ viewsize="list"
274
+ title=${ifDefined(reviewtitle)}
275
+ body=${ifDefined(reviewbody)}
276
+ starRating=${ifDefined(stars)}
277
+ >
278
+ </review-block>
279
279
  `;
280
280
  }
281
281
  get textSnippetsTemplate() {
282
282
  var _a;
283
283
  if (!this.hasSnippets)
284
284
  return nothing;
285
- return html `<text-snippet-block
286
- viewsize="list"
287
- .snippets=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets}
285
+ return html `<text-snippet-block
286
+ viewsize="list"
287
+ .snippets=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets}
288
288
  ></text-snippet-block>`;
289
289
  }
290
290
  get hasSnippets() {
@@ -295,12 +295,12 @@ let TileList = class TileList extends BaseTileComponent {
295
295
  var _a;
296
296
  if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.captureDates) || !this.model.title)
297
297
  return nothing;
298
- return html `
299
- <ul class="capture-dates">
300
- ${map(this.model.captureDates, date => html `<li>
301
- ${this.displayValueProvider.webArchivesCaptureLink(this.model.title, date)}
302
- </li>`)}
303
- </ul>
298
+ return html `
299
+ <ul class="capture-dates">
300
+ ${map(this.model.captureDates, date => html `<li>
301
+ ${this.displayValueProvider.webArchivesCaptureLink(this.model.title, date)}
302
+ </li>`)}
303
+ </ul>
304
304
  `;
305
305
  }
306
306
  // Utility functions
@@ -308,10 +308,10 @@ let TileList = class TileList extends BaseTileComponent {
308
308
  metadataTemplate(text, label = '', id) {
309
309
  if (!text)
310
310
  return nothing;
311
- return html `
312
- <div id=${ifDefined(id)} class="metadata">
313
- ${this.labelTemplate(label)} ${text}
314
- </div>
311
+ return html `
312
+ <div id=${ifDefined(id)} class="metadata">
313
+ ${this.labelTemplate(label)} ${text}
314
+ </div>
315
315
  `;
316
316
  }
317
317
  labelTemplate(label) {
@@ -326,11 +326,11 @@ let TileList = class TileList extends BaseTileComponent {
326
326
  const query = encodeURIComponent(`${field}:"${searchTerm}"`);
327
327
  // No whitespace after closing tag
328
328
  // Note: single ' for href='' to wrap " in query var gets changed back by yarn format
329
- return html `<a
330
- href="${this.baseNavigationUrl}/search?query=${query}"
331
- rel="nofollow"
332
- >
333
- ${DOMPurify.sanitize(searchTerm)}</a
329
+ return html `<a
330
+ href="${this.baseNavigationUrl}/search?query=${query}"
331
+ rel="nofollow"
332
+ >
333
+ ${DOMPurify.sanitize(searchTerm)}</a
334
334
  >`;
335
335
  }
336
336
  detailsLink(identifier, text, isCollection = false) {
@@ -421,190 +421,190 @@ let TileList = class TileList extends BaseTileComponent {
421
421
  return 'long';
422
422
  }
423
423
  static get styles() {
424
- return css `
425
- html {
426
- font-size: unset;
427
- }
428
-
429
- div {
430
- font-size: 14px;
431
- }
432
-
433
- div a {
434
- text-decoration: none;
435
- }
436
-
437
- div a:link {
438
- color: var(--ia-theme-link-color, #4b64ff);
439
- }
440
-
441
- .label {
442
- font-weight: bold;
443
- }
444
-
445
- #list-line.mobile {
446
- --infiniteScrollerRowGap: 20px;
447
- --infiniteScrollerRowHeight: auto;
448
- }
449
-
450
- #list-line.desktop {
451
- --infiniteScrollerRowGap: 30px;
452
- --infiniteScrollerRowHeight: auto;
453
- }
454
-
455
- /* fields */
456
- #icon-right {
457
- width: 20px;
458
- padding-top: 5px;
459
- --iconHeight: 20px;
460
- --iconWidth: 20px;
461
- --iconTextAlign: right;
462
- margin-top: -8px;
463
- text-align: right;
464
- }
465
-
466
- #title {
467
- color: #4b64ff;
468
- text-decoration: none;
469
- font-size: 22px;
470
- font-weight: bold;
471
- /* align top of text with image */
472
- line-height: 25px;
473
- margin-top: -4px;
474
- padding-bottom: 2px;
475
- flex-grow: 1;
476
-
477
- display: -webkit-box;
478
- -webkit-box-orient: vertical;
479
- -webkit-line-clamp: 3;
480
- overflow: hidden;
481
- overflow-wrap: anywhere;
482
- }
483
-
484
- .metadata {
485
- line-height: 20px;
486
- }
487
-
488
- #description,
489
- #creator,
490
- #topics,
491
- #source {
492
- text-align: left;
493
- overflow: hidden;
494
- text-overflow: ellipsis;
495
- -webkit-box-orient: vertical;
496
- display: -webkit-box;
497
- word-break: break-word;
498
- -webkit-line-clamp: 3; /* number of lines to show */
499
- line-clamp: 3;
500
-
501
- /*
502
- * Safari doesn't always respect the line-clamping rules above,
503
- * so we add this to ensure these fields still get truncated
504
- */
505
- max-height: 60px;
506
- }
507
-
508
- #collections {
509
- display: -webkit-box;
510
- -webkit-box-orient: vertical;
511
- -webkit-line-clamp: 3;
512
- overflow: hidden;
513
- overflow-wrap: anywhere;
514
- }
515
-
516
- #collections > a {
517
- display: inline-block;
518
- }
519
-
520
- #icon {
521
- padding-top: 5px;
522
- }
523
-
524
- #description {
525
- padding-top: 10px;
526
- }
527
-
528
- /* Top level container */
529
- #list-line {
530
- display: flex;
531
- }
532
-
533
- #list-line.mobile {
534
- flex-direction: column;
535
- }
536
-
537
- #list-line.desktop {
538
- column-gap: 10px;
539
- }
540
-
541
- #list-line-top {
542
- display: flex;
543
- column-gap: 7px;
544
- }
545
-
546
- #list-line-bottom {
547
- padding-top: 4px;
548
- }
549
-
550
- #list-line-right,
551
- #list-line-top,
552
- #list-line-bottom {
553
- width: 100%;
554
- }
555
-
556
- /*
557
- * If the container becomes very tiny, don't let the thumbnail side take
558
- * up too much space. Shouldn't make a difference on ordinary viewport sizes.
559
- */
560
- #list-line-left {
561
- max-width: 25%;
562
-
563
- display: flex;
564
- flex-direction: column;
565
- row-gap: 5px;
566
- }
567
-
568
- div a:hover {
569
- text-decoration: underline;
570
- }
571
-
572
- /* Lines containing multiple div as row */
573
- #item-line,
574
- #dates-line,
575
- #views-line,
576
- #title-line {
577
- display: flex;
578
- flex-direction: row;
579
- column-gap: 10px;
580
- }
581
-
582
- /*
583
- * With the exception of the title line, allow these to wrap if
584
- * the space becomes too small to accommodate them together.
585
- *
586
- * The title line is excluded because it contains the mediatype icon
587
- * which we don't want to wrap.
588
- */
589
- #item-line,
590
- #dates-line,
591
- #views-line {
592
- flex-wrap: wrap;
593
- }
594
-
595
- .capture-dates {
596
- margin: 0;
597
- padding: 0;
598
- list-style-type: none;
599
- }
600
-
601
- .capture-dates a:link {
602
- text-decoration: none;
603
- color: var(--ia-theme-link-color, #4b64ff);
604
- }
605
- .capture-dates a:hover {
606
- text-decoration: underline;
607
- }
424
+ return css `
425
+ html {
426
+ font-size: unset;
427
+ }
428
+
429
+ div {
430
+ font-size: 14px;
431
+ }
432
+
433
+ div a {
434
+ text-decoration: none;
435
+ }
436
+
437
+ div a:link {
438
+ color: var(--ia-theme-link-color, #4b64ff);
439
+ }
440
+
441
+ .label {
442
+ font-weight: bold;
443
+ }
444
+
445
+ #list-line.mobile {
446
+ --infiniteScrollerRowGap: 20px;
447
+ --infiniteScrollerRowHeight: auto;
448
+ }
449
+
450
+ #list-line.desktop {
451
+ --infiniteScrollerRowGap: 30px;
452
+ --infiniteScrollerRowHeight: auto;
453
+ }
454
+
455
+ /* fields */
456
+ #icon-right {
457
+ width: 20px;
458
+ padding-top: 5px;
459
+ --iconHeight: 20px;
460
+ --iconWidth: 20px;
461
+ --iconTextAlign: right;
462
+ margin-top: -8px;
463
+ text-align: right;
464
+ }
465
+
466
+ #title {
467
+ color: #4b64ff;
468
+ text-decoration: none;
469
+ font-size: 22px;
470
+ font-weight: bold;
471
+ /* align top of text with image */
472
+ line-height: 25px;
473
+ margin-top: -4px;
474
+ padding-bottom: 2px;
475
+ flex-grow: 1;
476
+
477
+ display: -webkit-box;
478
+ -webkit-box-orient: vertical;
479
+ -webkit-line-clamp: 3;
480
+ overflow: hidden;
481
+ overflow-wrap: anywhere;
482
+ }
483
+
484
+ .metadata {
485
+ line-height: 20px;
486
+ }
487
+
488
+ #description,
489
+ #creator,
490
+ #topics,
491
+ #source {
492
+ text-align: left;
493
+ overflow: hidden;
494
+ text-overflow: ellipsis;
495
+ -webkit-box-orient: vertical;
496
+ display: -webkit-box;
497
+ word-break: break-word;
498
+ -webkit-line-clamp: 3; /* number of lines to show */
499
+ line-clamp: 3;
500
+
501
+ /*
502
+ * Safari doesn't always respect the line-clamping rules above,
503
+ * so we add this to ensure these fields still get truncated
504
+ */
505
+ max-height: 60px;
506
+ }
507
+
508
+ #collections {
509
+ display: -webkit-box;
510
+ -webkit-box-orient: vertical;
511
+ -webkit-line-clamp: 3;
512
+ overflow: hidden;
513
+ overflow-wrap: anywhere;
514
+ }
515
+
516
+ #collections > a {
517
+ display: inline-block;
518
+ }
519
+
520
+ #icon {
521
+ padding-top: 5px;
522
+ }
523
+
524
+ #description {
525
+ padding-top: 10px;
526
+ }
527
+
528
+ /* Top level container */
529
+ #list-line {
530
+ display: flex;
531
+ }
532
+
533
+ #list-line.mobile {
534
+ flex-direction: column;
535
+ }
536
+
537
+ #list-line.desktop {
538
+ column-gap: 10px;
539
+ }
540
+
541
+ #list-line-top {
542
+ display: flex;
543
+ column-gap: 7px;
544
+ }
545
+
546
+ #list-line-bottom {
547
+ padding-top: 4px;
548
+ }
549
+
550
+ #list-line-right,
551
+ #list-line-top,
552
+ #list-line-bottom {
553
+ width: 100%;
554
+ }
555
+
556
+ /*
557
+ * If the container becomes very tiny, don't let the thumbnail side take
558
+ * up too much space. Shouldn't make a difference on ordinary viewport sizes.
559
+ */
560
+ #list-line-left {
561
+ max-width: 25%;
562
+
563
+ display: flex;
564
+ flex-direction: column;
565
+ row-gap: 5px;
566
+ }
567
+
568
+ div a:hover {
569
+ text-decoration: underline;
570
+ }
571
+
572
+ /* Lines containing multiple div as row */
573
+ #item-line,
574
+ #dates-line,
575
+ #views-line,
576
+ #title-line {
577
+ display: flex;
578
+ flex-direction: row;
579
+ column-gap: 10px;
580
+ }
581
+
582
+ /*
583
+ * With the exception of the title line, allow these to wrap if
584
+ * the space becomes too small to accommodate them together.
585
+ *
586
+ * The title line is excluded because it contains the mediatype icon
587
+ * which we don't want to wrap.
588
+ */
589
+ #item-line,
590
+ #dates-line,
591
+ #views-line {
592
+ flex-wrap: wrap;
593
+ }
594
+
595
+ .capture-dates {
596
+ margin: 0;
597
+ padding: 0;
598
+ list-style-type: none;
599
+ }
600
+
601
+ .capture-dates a:link {
602
+ text-decoration: none;
603
+ color: var(--ia-theme-link-color, #4b64ff);
604
+ }
605
+ .capture-dates a:hover {
606
+ text-decoration: underline;
607
+ }
608
608
  `;
609
609
  }
610
610
  };