@internetarchive/collection-browser 2.22.1-alpha-webdev7818.4 → 2.22.1-alpha1
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 +6 -3
- package/dist/src/collection-browser.js +691 -681
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -1
- package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
- package/dist/src/manage/manage-bar.d.ts +4 -0
- package/dist/src/manage/manage-bar.js +21 -0
- package/dist/src/manage/manage-bar.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 -289
- package/dist/src/tiles/list/tile-list.js.map +1 -1
- package/dist/test/collection-browser.test.js +187 -187
- package/dist/test/collection-browser.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 +2763 -2755
- package/src/data-source/collection-browser-data-source-interface.ts +333 -333
- package/src/data-source/collection-browser-data-source.ts +1390 -1390
- package/src/manage/manage-bar.ts +23 -0
- 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 -688
- package/test/collection-browser.test.ts +2359 -2359
- package/tsconfig.json +20 -20
- package/web-dev-server.config.mjs +30 -30
- 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() {
|
|
@@ -79,40 +79,40 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
79
79
|
return nothing;
|
|
80
80
|
const isCollection = this.model.mediatype === 'collection';
|
|
81
81
|
const href = this.displayValueProvider.itemPageUrl(this.model.identifier, isCollection);
|
|
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>
|
|
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>
|
|
93
93
|
</a> `;
|
|
94
94
|
}
|
|
95
95
|
get detailsTemplate() {
|
|
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}
|
|
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}
|
|
108
108
|
`;
|
|
109
109
|
}
|
|
110
110
|
// Data templates
|
|
111
111
|
get iconRightTemplate() {
|
|
112
|
-
return html `
|
|
113
|
-
<a id="icon-right" href=${this.mediatypeURL}>
|
|
114
|
-
<tile-mediatype-icon .model=${this.model}> </tile-mediatype-icon>
|
|
115
|
-
</a>
|
|
112
|
+
return html `
|
|
113
|
+
<a id="icon-right" href=${this.mediatypeURL}>
|
|
114
|
+
<tile-mediatype-icon .model=${this.model}> </tile-mediatype-icon>
|
|
115
|
+
</a>
|
|
116
116
|
`;
|
|
117
117
|
}
|
|
118
118
|
get titleTemplate() {
|
|
@@ -123,8 +123,8 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
123
123
|
// If the model has a server-specified href, use it
|
|
124
124
|
// Otherwise construct a details link using the identifier
|
|
125
125
|
return ((_b = this.model) === null || _b === void 0 ? void 0 : _b.href)
|
|
126
|
-
? html `<a href="${this.baseNavigationUrl}${this.model.href}"
|
|
127
|
-
>${(_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
|
|
128
128
|
>`
|
|
129
129
|
: this.detailsLink(this.model.identifier, this.model.title, this.model.mediatype === 'collection');
|
|
130
130
|
}
|
|
@@ -142,11 +142,11 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
142
142
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.source)) {
|
|
143
143
|
return nothing;
|
|
144
144
|
}
|
|
145
|
-
return html `
|
|
146
|
-
<div id="source" class="metadata">
|
|
147
|
-
${this.labelTemplate(msg('Source'))}
|
|
148
|
-
${this.searchLink('source', this.model.source)}
|
|
149
|
-
</div>
|
|
145
|
+
return html `
|
|
146
|
+
<div id="source" class="metadata">
|
|
147
|
+
${this.labelTemplate(msg('Source'))}
|
|
148
|
+
${this.searchLink('source', this.model.source)}
|
|
149
|
+
</div>
|
|
150
150
|
`;
|
|
151
151
|
}
|
|
152
152
|
get volumeTemplate() {
|
|
@@ -161,23 +161,23 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
161
161
|
var _a, _b, _c;
|
|
162
162
|
// "Archivist since" if account
|
|
163
163
|
if (((_a = this.model) === null || _a === void 0 ? void 0 : _a.mediatype) === 'account') {
|
|
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>
|
|
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>
|
|
170
170
|
`;
|
|
171
171
|
}
|
|
172
172
|
// "Creator" if not account tile
|
|
173
173
|
if (!((_c = this.model) === null || _c === void 0 ? void 0 : _c.creators) || this.model.creators.length === 0) {
|
|
174
174
|
return nothing;
|
|
175
175
|
}
|
|
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>
|
|
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>
|
|
181
181
|
`;
|
|
182
182
|
}
|
|
183
183
|
get datePublishedTemplate() {
|
|
@@ -229,22 +229,22 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
229
229
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.subjects) || this.model.subjects.length === 0) {
|
|
230
230
|
return nothing;
|
|
231
231
|
}
|
|
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>
|
|
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>
|
|
237
237
|
`;
|
|
238
238
|
}
|
|
239
239
|
get collectionsTemplate() {
|
|
240
240
|
if (!this.collectionLinks || this.collectionLinks.length === 0) {
|
|
241
241
|
return nothing;
|
|
242
242
|
}
|
|
243
|
-
return html `
|
|
244
|
-
<div id="collections" class="metadata">
|
|
245
|
-
${this.labelTemplate(msg('Collections'))}
|
|
246
|
-
${join(this.collectionLinks, ', ')}
|
|
247
|
-
</div>
|
|
243
|
+
return html `
|
|
244
|
+
<div id="collections" class="metadata">
|
|
245
|
+
${this.labelTemplate(msg('Collections'))}
|
|
246
|
+
${join(this.collectionLinks, ', ')}
|
|
247
|
+
</div>
|
|
248
248
|
`;
|
|
249
249
|
}
|
|
250
250
|
get descriptionTemplate() {
|
|
@@ -258,23 +258,23 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
258
258
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.review))
|
|
259
259
|
return nothing;
|
|
260
260
|
const { reviewtitle, reviewbody, stars } = this.model.review;
|
|
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>
|
|
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>
|
|
269
269
|
`;
|
|
270
270
|
}
|
|
271
271
|
get textSnippetsTemplate() {
|
|
272
272
|
var _a;
|
|
273
273
|
if (!this.hasSnippets)
|
|
274
274
|
return nothing;
|
|
275
|
-
return html `<text-snippet-block
|
|
276
|
-
viewsize="list"
|
|
277
|
-
.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}
|
|
278
278
|
></text-snippet-block>`;
|
|
279
279
|
}
|
|
280
280
|
get hasSnippets() {
|
|
@@ -285,12 +285,12 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
285
285
|
var _a;
|
|
286
286
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.captureDates) || !this.model.title)
|
|
287
287
|
return nothing;
|
|
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>
|
|
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>
|
|
294
294
|
`;
|
|
295
295
|
}
|
|
296
296
|
// Utility functions
|
|
@@ -298,10 +298,10 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
298
298
|
metadataTemplate(text, label = '', id) {
|
|
299
299
|
if (!text)
|
|
300
300
|
return nothing;
|
|
301
|
-
return html `
|
|
302
|
-
<div id=${ifDefined(id)} class="metadata">
|
|
303
|
-
${this.labelTemplate(label)} ${text}
|
|
304
|
-
</div>
|
|
301
|
+
return html `
|
|
302
|
+
<div id=${ifDefined(id)} class="metadata">
|
|
303
|
+
${this.labelTemplate(label)} ${text}
|
|
304
|
+
</div>
|
|
305
305
|
`;
|
|
306
306
|
}
|
|
307
307
|
labelTemplate(label) {
|
|
@@ -316,11 +316,11 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
316
316
|
const query = encodeURIComponent(`${field}:"${searchTerm}"`);
|
|
317
317
|
// No whitespace after closing tag
|
|
318
318
|
// Note: single ' for href='' to wrap " in query var gets changed back by yarn format
|
|
319
|
-
return html `<a
|
|
320
|
-
href="${this.baseNavigationUrl}/search?query=${query}"
|
|
321
|
-
rel="nofollow"
|
|
322
|
-
>
|
|
323
|
-
${DOMPurify.sanitize(searchTerm)}</a
|
|
319
|
+
return html `<a
|
|
320
|
+
href="${this.baseNavigationUrl}/search?query=${query}"
|
|
321
|
+
rel="nofollow"
|
|
322
|
+
>
|
|
323
|
+
${DOMPurify.sanitize(searchTerm)}</a
|
|
324
324
|
>`;
|
|
325
325
|
}
|
|
326
326
|
detailsLink(identifier, text, isCollection = false) {
|
|
@@ -411,190 +411,190 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
411
411
|
return 'long';
|
|
412
412
|
}
|
|
413
413
|
static get styles() {
|
|
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
|
-
}
|
|
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
|
+
}
|
|
598
598
|
`;
|
|
599
599
|
}
|
|
600
600
|
};
|