@internetarchive/collection-browser 2.22.1-webdev-7936.0 → 3.0.0
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.
- package/.editorconfig +29 -29
- package/.github/workflows/ci.yml +27 -27
- package/.github/workflows/gh-pages-main.yml +39 -39
- package/.github/workflows/npm-publish.yml +39 -39
- package/.github/workflows/pr-preview.yml +38 -38
- package/.husky/pre-commit +4 -4
- package/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/src/collection-browser.d.ts +5 -2
- package/dist/src/collection-browser.js +699 -690
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facet-row.js +130 -130
- package/dist/src/collection-facets/facet-row.js.map +1 -1
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +75 -75
- package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
- package/dist/src/collection-facets.js +263 -264
- package/dist/src/collection-facets.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
- package/dist/src/data-source/models.js.map +1 -1
- package/dist/src/models.js.map +1 -1
- package/dist/src/restoration-state-handler.js.map +1 -1
- package/dist/src/tiles/base-tile-component.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +2 -3
- package/dist/src/tiles/grid/collection-tile.js.map +1 -1
- package/dist/src/tiles/grid/item-tile.js +139 -139
- package/dist/src/tiles/grid/item-tile.js.map +1 -1
- package/dist/src/tiles/grid/search-tile.js +2 -3
- package/dist/src/tiles/grid/search-tile.js.map +1 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +1 -2
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js.map +1 -1
- package/dist/src/tiles/hover/hover-pane-controller.js +21 -21
- package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
- package/dist/src/tiles/hover/tile-hover-pane.js +108 -108
- package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact-header.js +45 -45
- package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
- package/dist/src/tiles/list/tile-list-compact.js +97 -97
- package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
- package/dist/src/tiles/list/tile-list.js +289 -295
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/src/tiles/tile-dispatcher.js +200 -200
- package/dist/src/tiles/tile-dispatcher.js.map +1 -1
- package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
- package/dist/test/collection-browser.test.js +183 -197
- package/dist/test/collection-browser.test.js.map +1 -1
- package/dist/test/restoration-state-handler.test.js.map +1 -1
- package/dist/test/tiles/list/tile-list.test.js +0 -1
- package/dist/test/tiles/list/tile-list.test.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +117 -117
- package/renovate.json +6 -6
- package/src/collection-browser.ts +2775 -2756
- package/src/collection-facets/facet-row.ts +282 -282
- package/src/collection-facets/smart-facets/smart-facet-bar.ts +437 -437
- package/src/collection-facets.ts +990 -991
- package/src/data-source/collection-browser-data-source.ts +1390 -1390
- package/src/data-source/collection-browser-query-state.ts +63 -63
- package/src/data-source/models.ts +43 -43
- package/src/models.ts +870 -870
- package/src/restoration-state-handler.ts +544 -544
- package/src/tiles/base-tile-component.ts +53 -53
- package/src/tiles/grid/collection-tile.ts +2 -3
- package/src/tiles/grid/item-tile.ts +339 -339
- package/src/tiles/grid/search-tile.ts +2 -3
- package/src/tiles/grid/styles/tile-grid-shared-styles.ts +1 -2
- package/src/tiles/hover/hover-pane-controller.ts +517 -517
- package/src/tiles/hover/tile-hover-pane.ts +180 -180
- package/src/tiles/list/tile-list-compact-header.ts +86 -86
- package/src/tiles/list/tile-list-compact.ts +236 -236
- package/src/tiles/list/tile-list.ts +688 -692
- package/src/tiles/tile-dispatcher.ts +486 -486
- package/src/tiles/tile-display-value-provider.ts +124 -124
- package/test/collection-browser.test.ts +2340 -2359
- package/test/restoration-state-handler.test.ts +510 -510
- package/test/tiles/list/tile-list.test.ts +0 -1
- package/tsconfig.json +20 -20
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
|
@@ -37,88 +37,82 @@ 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() {
|
|
78
|
-
var _a;
|
|
79
78
|
if (!this.model)
|
|
80
79
|
return nothing;
|
|
81
80
|
const isCollection = this.model.mediatype === 'collection';
|
|
82
81
|
const href = this.displayValueProvider.itemPageUrl(this.model.identifier, isCollection);
|
|
83
|
-
return html `<a
|
|
84
|
-
<image-block
|
|
85
|
-
.model=${this.model}
|
|
86
|
-
.baseImageUrl=${this.baseImageUrl}
|
|
87
|
-
.isCompactTile=${false}
|
|
88
|
-
.isListTile=${true}
|
|
89
|
-
.viewSize=${this.classSize}
|
|
90
|
-
.loggedIn=${this.loggedIn}
|
|
91
|
-
.suppressBlurring=${this.suppressBlurring}
|
|
92
|
-
>
|
|
93
|
-
</image-block>
|
|
82
|
+
return html `<a href=${href}>
|
|
83
|
+
<image-block
|
|
84
|
+
.model=${this.model}
|
|
85
|
+
.baseImageUrl=${this.baseImageUrl}
|
|
86
|
+
.isCompactTile=${false}
|
|
87
|
+
.isListTile=${true}
|
|
88
|
+
.viewSize=${this.classSize}
|
|
89
|
+
.loggedIn=${this.loggedIn}
|
|
90
|
+
.suppressBlurring=${this.suppressBlurring}
|
|
91
|
+
>
|
|
92
|
+
</image-block>
|
|
94
93
|
</a> `;
|
|
95
94
|
}
|
|
96
95
|
get detailsTemplate() {
|
|
97
|
-
return html `
|
|
98
|
-
${this.itemLineTemplate} ${this.creatorTemplate}
|
|
99
|
-
<div id="dates-line">
|
|
100
|
-
${this.datePublishedTemplate} ${this.dateSortByTemplate}
|
|
101
|
-
${this.webArchivesCaptureDatesTemplate}
|
|
102
|
-
</div>
|
|
103
|
-
<div id="views-line">
|
|
104
|
-
${this.viewsTemplate} ${this.ratingTemplate} ${this.reviewsTemplate}
|
|
105
|
-
</div>
|
|
106
|
-
${this.topicsTemplate} ${this.collectionsTemplate}
|
|
107
|
-
${this.descriptionTemplate} ${this.textSnippetsTemplate}
|
|
108
|
-
${this.reviewBlockTemplate}
|
|
96
|
+
return html `
|
|
97
|
+
${this.itemLineTemplate} ${this.creatorTemplate}
|
|
98
|
+
<div id="dates-line">
|
|
99
|
+
${this.datePublishedTemplate} ${this.dateSortByTemplate}
|
|
100
|
+
${this.webArchivesCaptureDatesTemplate}
|
|
101
|
+
</div>
|
|
102
|
+
<div id="views-line">
|
|
103
|
+
${this.viewsTemplate} ${this.ratingTemplate} ${this.reviewsTemplate}
|
|
104
|
+
</div>
|
|
105
|
+
${this.topicsTemplate} ${this.collectionsTemplate}
|
|
106
|
+
${this.descriptionTemplate} ${this.textSnippetsTemplate}
|
|
107
|
+
${this.reviewBlockTemplate}
|
|
109
108
|
`;
|
|
110
109
|
}
|
|
111
110
|
// Data templates
|
|
112
111
|
get iconRightTemplate() {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
href=${this.mediatypeURL}
|
|
118
|
-
title=${msg('See more: ' + ((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype))}
|
|
119
|
-
>
|
|
120
|
-
<tile-mediatype-icon .model=${this.model}> </tile-mediatype-icon>
|
|
121
|
-
</a>
|
|
112
|
+
return html `
|
|
113
|
+
<a id="icon-right" href=${this.mediatypeURL}>
|
|
114
|
+
<tile-mediatype-icon .model=${this.model}> </tile-mediatype-icon>
|
|
115
|
+
</a>
|
|
122
116
|
`;
|
|
123
117
|
}
|
|
124
118
|
get titleTemplate() {
|
|
@@ -129,8 +123,8 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
129
123
|
// If the model has a server-specified href, use it
|
|
130
124
|
// Otherwise construct a details link using the identifier
|
|
131
125
|
return ((_b = this.model) === null || _b === void 0 ? void 0 : _b.href)
|
|
132
|
-
? html `<a href="${this.baseNavigationUrl}${this.model.href}"
|
|
133
|
-
>${(_c = this.model.title) !== null && _c !== void 0 ? _c : this.model.identifier}</a
|
|
126
|
+
? html `<a href="${this.baseNavigationUrl}${this.model.href}"
|
|
127
|
+
>${(_c = this.model.title) !== null && _c !== void 0 ? _c : this.model.identifier}</a
|
|
134
128
|
>`
|
|
135
129
|
: this.detailsLink(this.model.identifier, this.model.title, this.model.mediatype === 'collection');
|
|
136
130
|
}
|
|
@@ -148,11 +142,11 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
148
142
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.source)) {
|
|
149
143
|
return nothing;
|
|
150
144
|
}
|
|
151
|
-
return html `
|
|
152
|
-
<div id="source" class="metadata">
|
|
153
|
-
${this.labelTemplate(msg('Source'))}
|
|
154
|
-
${this.searchLink('source', this.model.source)}
|
|
155
|
-
</div>
|
|
145
|
+
return html `
|
|
146
|
+
<div id="source" class="metadata">
|
|
147
|
+
${this.labelTemplate(msg('Source'))}
|
|
148
|
+
${this.searchLink('source', this.model.source)}
|
|
149
|
+
</div>
|
|
156
150
|
`;
|
|
157
151
|
}
|
|
158
152
|
get volumeTemplate() {
|
|
@@ -167,23 +161,23 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
167
161
|
var _a, _b, _c;
|
|
168
162
|
// "Archivist since" if account
|
|
169
163
|
if (((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'account') {
|
|
170
|
-
return html `
|
|
171
|
-
<div id="creator" class="metadata">
|
|
172
|
-
<span class="label"
|
|
173
|
-
>${(_b = this.displayValueProvider.accountLabel) !== null && _b !== void 0 ? _b : nothing}</span
|
|
174
|
-
>
|
|
175
|
-
</div>
|
|
164
|
+
return html `
|
|
165
|
+
<div id="creator" class="metadata">
|
|
166
|
+
<span class="label"
|
|
167
|
+
>${(_b = this.displayValueProvider.accountLabel) !== null && _b !== void 0 ? _b : nothing}</span
|
|
168
|
+
>
|
|
169
|
+
</div>
|
|
176
170
|
`;
|
|
177
171
|
}
|
|
178
172
|
// "Creator" if not account tile
|
|
179
173
|
if (!((_c = this.model) === null || _c === void 0 ? void 0 : _c.creators) || this.model.creators.length === 0) {
|
|
180
174
|
return nothing;
|
|
181
175
|
}
|
|
182
|
-
return html `
|
|
183
|
-
<div id="creator" class="metadata">
|
|
184
|
-
${this.labelTemplate(msg('By'))}
|
|
185
|
-
${join(map(this.model.creators, id => this.searchLink('creator', id)), ', ')}
|
|
186
|
-
</div>
|
|
176
|
+
return html `
|
|
177
|
+
<div id="creator" class="metadata">
|
|
178
|
+
${this.labelTemplate(msg('By'))}
|
|
179
|
+
${join(map(this.model.creators, id => this.searchLink('creator', id)), ', ')}
|
|
180
|
+
</div>
|
|
187
181
|
`;
|
|
188
182
|
}
|
|
189
183
|
get datePublishedTemplate() {
|
|
@@ -235,22 +229,22 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
235
229
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.subjects) || this.model.subjects.length === 0) {
|
|
236
230
|
return nothing;
|
|
237
231
|
}
|
|
238
|
-
return html `
|
|
239
|
-
<div id="topics" class="metadata">
|
|
240
|
-
${this.labelTemplate(msg('Topics'))}
|
|
241
|
-
${join(map(this.model.subjects, id => this.searchLink('subject', id)), ', ')}
|
|
242
|
-
</div>
|
|
232
|
+
return html `
|
|
233
|
+
<div id="topics" class="metadata">
|
|
234
|
+
${this.labelTemplate(msg('Topics'))}
|
|
235
|
+
${join(map(this.model.subjects, id => this.searchLink('subject', id)), ', ')}
|
|
236
|
+
</div>
|
|
243
237
|
`;
|
|
244
238
|
}
|
|
245
239
|
get collectionsTemplate() {
|
|
246
240
|
if (!this.collectionLinks || this.collectionLinks.length === 0) {
|
|
247
241
|
return nothing;
|
|
248
242
|
}
|
|
249
|
-
return html `
|
|
250
|
-
<div id="collections" class="metadata">
|
|
251
|
-
${this.labelTemplate(msg('Collections'))}
|
|
252
|
-
${join(this.collectionLinks, ', ')}
|
|
253
|
-
</div>
|
|
243
|
+
return html `
|
|
244
|
+
<div id="collections" class="metadata">
|
|
245
|
+
${this.labelTemplate(msg('Collections'))}
|
|
246
|
+
${join(this.collectionLinks, ', ')}
|
|
247
|
+
</div>
|
|
254
248
|
`;
|
|
255
249
|
}
|
|
256
250
|
get descriptionTemplate() {
|
|
@@ -264,23 +258,23 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
264
258
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.review))
|
|
265
259
|
return nothing;
|
|
266
260
|
const { reviewtitle, reviewbody, stars } = this.model.review;
|
|
267
|
-
return html `
|
|
268
|
-
<review-block
|
|
269
|
-
viewsize="list"
|
|
270
|
-
title=${ifDefined(reviewtitle)}
|
|
271
|
-
body=${ifDefined(reviewbody)}
|
|
272
|
-
starRating=${ifDefined(stars)}
|
|
273
|
-
>
|
|
274
|
-
</review-block>
|
|
261
|
+
return html `
|
|
262
|
+
<review-block
|
|
263
|
+
viewsize="list"
|
|
264
|
+
title=${ifDefined(reviewtitle)}
|
|
265
|
+
body=${ifDefined(reviewbody)}
|
|
266
|
+
starRating=${ifDefined(stars)}
|
|
267
|
+
>
|
|
268
|
+
</review-block>
|
|
275
269
|
`;
|
|
276
270
|
}
|
|
277
271
|
get textSnippetsTemplate() {
|
|
278
272
|
var _a;
|
|
279
273
|
if (!this.hasSnippets)
|
|
280
274
|
return nothing;
|
|
281
|
-
return html `<text-snippet-block
|
|
282
|
-
viewsize="list"
|
|
283
|
-
.snippets=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets}
|
|
275
|
+
return html `<text-snippet-block
|
|
276
|
+
viewsize="list"
|
|
277
|
+
.snippets=${(_a = this.model) === null || _a === void 0 ? void 0 : _a.snippets}
|
|
284
278
|
></text-snippet-block>`;
|
|
285
279
|
}
|
|
286
280
|
get hasSnippets() {
|
|
@@ -291,12 +285,12 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
291
285
|
var _a;
|
|
292
286
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.captureDates) || !this.model.title)
|
|
293
287
|
return nothing;
|
|
294
|
-
return html `
|
|
295
|
-
<ul class="capture-dates">
|
|
296
|
-
${map(this.model.captureDates, date => html `<li>
|
|
297
|
-
${this.displayValueProvider.webArchivesCaptureLink(this.model.title, date)}
|
|
298
|
-
</li>`)}
|
|
299
|
-
</ul>
|
|
288
|
+
return html `
|
|
289
|
+
<ul class="capture-dates">
|
|
290
|
+
${map(this.model.captureDates, date => html `<li>
|
|
291
|
+
${this.displayValueProvider.webArchivesCaptureLink(this.model.title, date)}
|
|
292
|
+
</li>`)}
|
|
293
|
+
</ul>
|
|
300
294
|
`;
|
|
301
295
|
}
|
|
302
296
|
// Utility functions
|
|
@@ -304,10 +298,10 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
304
298
|
metadataTemplate(text, label = '', id) {
|
|
305
299
|
if (!text)
|
|
306
300
|
return nothing;
|
|
307
|
-
return html `
|
|
308
|
-
<div id=${ifDefined(id)} class="metadata">
|
|
309
|
-
${this.labelTemplate(label)} ${text}
|
|
310
|
-
</div>
|
|
301
|
+
return html `
|
|
302
|
+
<div id=${ifDefined(id)} class="metadata">
|
|
303
|
+
${this.labelTemplate(label)} ${text}
|
|
304
|
+
</div>
|
|
311
305
|
`;
|
|
312
306
|
}
|
|
313
307
|
labelTemplate(label) {
|
|
@@ -322,11 +316,11 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
322
316
|
const query = encodeURIComponent(`${field}:"${searchTerm}"`);
|
|
323
317
|
// No whitespace after closing tag
|
|
324
318
|
// Note: single ' for href='' to wrap " in query var gets changed back by yarn format
|
|
325
|
-
return html `<a
|
|
326
|
-
href="${this.baseNavigationUrl}/search?query=${query}"
|
|
327
|
-
rel="nofollow"
|
|
328
|
-
>
|
|
329
|
-
${DOMPurify.sanitize(searchTerm)}</a
|
|
319
|
+
return html `<a
|
|
320
|
+
href="${this.baseNavigationUrl}/search?query=${query}"
|
|
321
|
+
rel="nofollow"
|
|
322
|
+
>
|
|
323
|
+
${DOMPurify.sanitize(searchTerm)}</a
|
|
330
324
|
>`;
|
|
331
325
|
}
|
|
332
326
|
detailsLink(identifier, text, isCollection = false) {
|
|
@@ -417,190 +411,190 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
417
411
|
return 'long';
|
|
418
412
|
}
|
|
419
413
|
static get styles() {
|
|
420
|
-
return css `
|
|
421
|
-
html {
|
|
422
|
-
font-size: unset;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
div {
|
|
426
|
-
font-size: 14px;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
div a {
|
|
430
|
-
text-decoration: none;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
div a:link {
|
|
434
|
-
color: var(--ia-theme-link-color, #4b64ff);
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.label {
|
|
438
|
-
font-weight: bold;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
#list-line.mobile {
|
|
442
|
-
--infiniteScrollerRowGap: 20px;
|
|
443
|
-
--infiniteScrollerRowHeight: auto;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
#list-line.desktop {
|
|
447
|
-
--infiniteScrollerRowGap: 30px;
|
|
448
|
-
--infiniteScrollerRowHeight: auto;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/* fields */
|
|
452
|
-
#icon-right {
|
|
453
|
-
width: 20px;
|
|
454
|
-
padding-top: 5px;
|
|
455
|
-
--iconHeight: 20px;
|
|
456
|
-
--iconWidth: 20px;
|
|
457
|
-
--iconTextAlign: right;
|
|
458
|
-
margin-top: -8px;
|
|
459
|
-
text-align: right;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
#title {
|
|
463
|
-
color: #4b64ff;
|
|
464
|
-
text-decoration: none;
|
|
465
|
-
font-size: 22px;
|
|
466
|
-
font-weight: bold;
|
|
467
|
-
/* align top of text with image */
|
|
468
|
-
line-height: 25px;
|
|
469
|
-
margin-top: -4px;
|
|
470
|
-
padding-bottom: 2px;
|
|
471
|
-
flex-grow: 1;
|
|
472
|
-
|
|
473
|
-
display: -webkit-box;
|
|
474
|
-
-webkit-box-orient: vertical;
|
|
475
|
-
-webkit-line-clamp: 3;
|
|
476
|
-
overflow: hidden;
|
|
477
|
-
overflow-wrap: anywhere;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
.metadata {
|
|
481
|
-
line-height: 20px;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
#description,
|
|
485
|
-
#creator,
|
|
486
|
-
#topics,
|
|
487
|
-
#source {
|
|
488
|
-
text-align: left;
|
|
489
|
-
overflow: hidden;
|
|
490
|
-
text-overflow: ellipsis;
|
|
491
|
-
-webkit-box-orient: vertical;
|
|
492
|
-
display: -webkit-box;
|
|
493
|
-
word-break: break-word;
|
|
494
|
-
-webkit-line-clamp: 3; /* number of lines to show */
|
|
495
|
-
line-clamp: 3;
|
|
496
|
-
|
|
497
|
-
/*
|
|
498
|
-
* Safari doesn't always respect the line-clamping rules above,
|
|
499
|
-
* so we add this to ensure these fields still get truncated
|
|
500
|
-
*/
|
|
501
|
-
max-height: 60px;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
#collections {
|
|
505
|
-
display: -webkit-box;
|
|
506
|
-
-webkit-box-orient: vertical;
|
|
507
|
-
-webkit-line-clamp: 3;
|
|
508
|
-
overflow: hidden;
|
|
509
|
-
overflow-wrap: anywhere;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
#collections > a {
|
|
513
|
-
display: inline-block;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
#icon {
|
|
517
|
-
padding-top: 5px;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
#description {
|
|
521
|
-
padding-top: 10px;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/* Top level container */
|
|
525
|
-
#list-line {
|
|
526
|
-
display: flex;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
#list-line.mobile {
|
|
530
|
-
flex-direction: column;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
#list-line.desktop {
|
|
534
|
-
column-gap: 10px;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
#list-line-top {
|
|
538
|
-
display: flex;
|
|
539
|
-
column-gap: 7px;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
#list-line-bottom {
|
|
543
|
-
padding-top: 4px;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
#list-line-right,
|
|
547
|
-
#list-line-top,
|
|
548
|
-
#list-line-bottom {
|
|
549
|
-
width: 100%;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
/*
|
|
553
|
-
* If the container becomes very tiny, don't let the thumbnail side take
|
|
554
|
-
* up too much space. Shouldn't make a difference on ordinary viewport sizes.
|
|
555
|
-
*/
|
|
556
|
-
#list-line-left {
|
|
557
|
-
max-width: 25%;
|
|
558
|
-
|
|
559
|
-
display: flex;
|
|
560
|
-
flex-direction: column;
|
|
561
|
-
row-gap: 5px;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
div a:hover {
|
|
565
|
-
text-decoration: underline;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
/* Lines containing multiple div as row */
|
|
569
|
-
#item-line,
|
|
570
|
-
#dates-line,
|
|
571
|
-
#views-line,
|
|
572
|
-
#title-line {
|
|
573
|
-
display: flex;
|
|
574
|
-
flex-direction: row;
|
|
575
|
-
column-gap: 10px;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
/*
|
|
579
|
-
* With the exception of the title line, allow these to wrap if
|
|
580
|
-
* the space becomes too small to accommodate them together.
|
|
581
|
-
*
|
|
582
|
-
* The title line is excluded because it contains the mediatype icon
|
|
583
|
-
* which we don't want to wrap.
|
|
584
|
-
*/
|
|
585
|
-
#item-line,
|
|
586
|
-
#dates-line,
|
|
587
|
-
#views-line {
|
|
588
|
-
flex-wrap: wrap;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
.capture-dates {
|
|
592
|
-
margin: 0;
|
|
593
|
-
padding: 0;
|
|
594
|
-
list-style-type: none;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
.capture-dates a:link {
|
|
598
|
-
text-decoration: none;
|
|
599
|
-
color: var(--ia-theme-link-color, #4b64ff);
|
|
600
|
-
}
|
|
601
|
-
.capture-dates a:hover {
|
|
602
|
-
text-decoration: underline;
|
|
603
|
-
}
|
|
414
|
+
return css `
|
|
415
|
+
html {
|
|
416
|
+
font-size: unset;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
div {
|
|
420
|
+
font-size: 14px;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
div a {
|
|
424
|
+
text-decoration: none;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
div a:link {
|
|
428
|
+
color: var(--ia-theme-link-color, #4b64ff);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.label {
|
|
432
|
+
font-weight: bold;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
#list-line.mobile {
|
|
436
|
+
--infiniteScrollerRowGap: 20px;
|
|
437
|
+
--infiniteScrollerRowHeight: auto;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
#list-line.desktop {
|
|
441
|
+
--infiniteScrollerRowGap: 30px;
|
|
442
|
+
--infiniteScrollerRowHeight: auto;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* fields */
|
|
446
|
+
#icon-right {
|
|
447
|
+
width: 20px;
|
|
448
|
+
padding-top: 5px;
|
|
449
|
+
--iconHeight: 20px;
|
|
450
|
+
--iconWidth: 20px;
|
|
451
|
+
--iconTextAlign: right;
|
|
452
|
+
margin-top: -8px;
|
|
453
|
+
text-align: right;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
#title {
|
|
457
|
+
color: #4b64ff;
|
|
458
|
+
text-decoration: none;
|
|
459
|
+
font-size: 22px;
|
|
460
|
+
font-weight: bold;
|
|
461
|
+
/* align top of text with image */
|
|
462
|
+
line-height: 25px;
|
|
463
|
+
margin-top: -4px;
|
|
464
|
+
padding-bottom: 2px;
|
|
465
|
+
flex-grow: 1;
|
|
466
|
+
|
|
467
|
+
display: -webkit-box;
|
|
468
|
+
-webkit-box-orient: vertical;
|
|
469
|
+
-webkit-line-clamp: 3;
|
|
470
|
+
overflow: hidden;
|
|
471
|
+
overflow-wrap: anywhere;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.metadata {
|
|
475
|
+
line-height: 20px;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
#description,
|
|
479
|
+
#creator,
|
|
480
|
+
#topics,
|
|
481
|
+
#source {
|
|
482
|
+
text-align: left;
|
|
483
|
+
overflow: hidden;
|
|
484
|
+
text-overflow: ellipsis;
|
|
485
|
+
-webkit-box-orient: vertical;
|
|
486
|
+
display: -webkit-box;
|
|
487
|
+
word-break: break-word;
|
|
488
|
+
-webkit-line-clamp: 3; /* number of lines to show */
|
|
489
|
+
line-clamp: 3;
|
|
490
|
+
|
|
491
|
+
/*
|
|
492
|
+
* Safari doesn't always respect the line-clamping rules above,
|
|
493
|
+
* so we add this to ensure these fields still get truncated
|
|
494
|
+
*/
|
|
495
|
+
max-height: 60px;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
#collections {
|
|
499
|
+
display: -webkit-box;
|
|
500
|
+
-webkit-box-orient: vertical;
|
|
501
|
+
-webkit-line-clamp: 3;
|
|
502
|
+
overflow: hidden;
|
|
503
|
+
overflow-wrap: anywhere;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
#collections > a {
|
|
507
|
+
display: inline-block;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
#icon {
|
|
511
|
+
padding-top: 5px;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
#description {
|
|
515
|
+
padding-top: 10px;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/* Top level container */
|
|
519
|
+
#list-line {
|
|
520
|
+
display: flex;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
#list-line.mobile {
|
|
524
|
+
flex-direction: column;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
#list-line.desktop {
|
|
528
|
+
column-gap: 10px;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
#list-line-top {
|
|
532
|
+
display: flex;
|
|
533
|
+
column-gap: 7px;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
#list-line-bottom {
|
|
537
|
+
padding-top: 4px;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
#list-line-right,
|
|
541
|
+
#list-line-top,
|
|
542
|
+
#list-line-bottom {
|
|
543
|
+
width: 100%;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/*
|
|
547
|
+
* If the container becomes very tiny, don't let the thumbnail side take
|
|
548
|
+
* up too much space. Shouldn't make a difference on ordinary viewport sizes.
|
|
549
|
+
*/
|
|
550
|
+
#list-line-left {
|
|
551
|
+
max-width: 25%;
|
|
552
|
+
|
|
553
|
+
display: flex;
|
|
554
|
+
flex-direction: column;
|
|
555
|
+
row-gap: 5px;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
div a:hover {
|
|
559
|
+
text-decoration: underline;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/* Lines containing multiple div as row */
|
|
563
|
+
#item-line,
|
|
564
|
+
#dates-line,
|
|
565
|
+
#views-line,
|
|
566
|
+
#title-line {
|
|
567
|
+
display: flex;
|
|
568
|
+
flex-direction: row;
|
|
569
|
+
column-gap: 10px;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/*
|
|
573
|
+
* With the exception of the title line, allow these to wrap if
|
|
574
|
+
* the space becomes too small to accommodate them together.
|
|
575
|
+
*
|
|
576
|
+
* The title line is excluded because it contains the mediatype icon
|
|
577
|
+
* which we don't want to wrap.
|
|
578
|
+
*/
|
|
579
|
+
#item-line,
|
|
580
|
+
#dates-line,
|
|
581
|
+
#views-line {
|
|
582
|
+
flex-wrap: wrap;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.capture-dates {
|
|
586
|
+
margin: 0;
|
|
587
|
+
padding: 0;
|
|
588
|
+
list-style-type: none;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.capture-dates a:link {
|
|
592
|
+
text-decoration: none;
|
|
593
|
+
color: var(--ia-theme-link-color, #4b64ff);
|
|
594
|
+
}
|
|
595
|
+
.capture-dates a:hover {
|
|
596
|
+
text-decoration: underline;
|
|
597
|
+
}
|
|
604
598
|
`;
|
|
605
599
|
}
|
|
606
600
|
};
|