@internetarchive/collection-browser 3.0.0 → 3.0.1-webdev-7936.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.js +681 -680
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/collection-facets/facet-row.js +131 -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 +264 -263
- 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/sort-filter-bar/sort-filter-bar.js +1 -1
- package/dist/src/sort-filter-bar/sort-filter-bar.js.map +1 -1
- package/dist/src/tiles/base-tile-component.js.map +1 -1
- package/dist/src/tiles/grid/collection-tile.js +3 -2
- 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 +3 -2
- package/dist/src/tiles/grid/search-tile.js.map +1 -1
- package/dist/src/tiles/grid/styles/tile-grid-shared-styles.js +2 -1
- 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 +300 -290
- 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 -183
- 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 +13 -0
- 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 +2776 -2775
- package/src/collection-facets/facet-row.ts +283 -282
- package/src/collection-facets/smart-facets/smart-facet-bar.ts +437 -437
- package/src/collection-facets.ts +991 -990
- 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/sort-filter-bar/sort-filter-bar.ts +1 -1
- package/src/tiles/base-tile-component.ts +53 -53
- package/src/tiles/grid/collection-tile.ts +3 -2
- package/src/tiles/grid/item-tile.ts +339 -339
- package/src/tiles/grid/search-tile.ts +3 -2
- package/src/tiles/grid/styles/tile-grid-shared-styles.ts +2 -1
- 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 +696 -688
- 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 -2340
- package/test/restoration-state-handler.test.ts +510 -510
- package/test/tiles/list/tile-list.test.ts +15 -0
- package/tsconfig.json +20 -20
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +41 -41
|
@@ -5,7 +5,7 @@ import { join } from 'lit/directives/join.js';
|
|
|
5
5
|
import { map } from 'lit/directives/map.js';
|
|
6
6
|
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
7
7
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
8
|
-
import { msg } from '@lit/localize';
|
|
8
|
+
import { msg, str } from '@lit/localize';
|
|
9
9
|
import DOMPurify from 'dompurify';
|
|
10
10
|
import { suppressedCollections } from '../../models';
|
|
11
11
|
import { BaseTileComponent } from '../base-tile-component';
|
|
@@ -37,82 +37,92 @@ 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;
|
|
78
79
|
if (!this.model)
|
|
79
80
|
return nothing;
|
|
80
81
|
const isCollection = this.model.mediatype === 'collection';
|
|
81
82
|
const href = this.displayValueProvider.itemPageUrl(this.model.identifier, isCollection);
|
|
82
|
-
return html `<a
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
.
|
|
89
|
-
.
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
|
|
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>
|
|
93
98
|
</a> `;
|
|
94
99
|
}
|
|
95
100
|
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}
|
|
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}
|
|
108
113
|
`;
|
|
109
114
|
}
|
|
110
115
|
// Data templates
|
|
111
116
|
get iconRightTemplate() {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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>
|
|
116
126
|
`;
|
|
117
127
|
}
|
|
118
128
|
get titleTemplate() {
|
|
@@ -123,8 +133,8 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
123
133
|
// If the model has a server-specified href, use it
|
|
124
134
|
// Otherwise construct a details link using the identifier
|
|
125
135
|
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
|
|
136
|
+
? html `<a href="${this.baseNavigationUrl}${this.model.href}"
|
|
137
|
+
>${(_c = this.model.title) !== null && _c !== void 0 ? _c : this.model.identifier}</a
|
|
128
138
|
>`
|
|
129
139
|
: this.detailsLink(this.model.identifier, this.model.title, this.model.mediatype === 'collection');
|
|
130
140
|
}
|
|
@@ -142,11 +152,11 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
142
152
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.source)) {
|
|
143
153
|
return nothing;
|
|
144
154
|
}
|
|
145
|
-
return html `
|
|
146
|
-
<div id="source" class="metadata">
|
|
147
|
-
${this.labelTemplate(msg('Source'))}
|
|
148
|
-
${this.searchLink('source', this.model.source)}
|
|
149
|
-
</div>
|
|
155
|
+
return html `
|
|
156
|
+
<div id="source" class="metadata">
|
|
157
|
+
${this.labelTemplate(msg('Source'))}
|
|
158
|
+
${this.searchLink('source', this.model.source)}
|
|
159
|
+
</div>
|
|
150
160
|
`;
|
|
151
161
|
}
|
|
152
162
|
get volumeTemplate() {
|
|
@@ -161,23 +171,23 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
161
171
|
var _a, _b, _c;
|
|
162
172
|
// "Archivist since" if account
|
|
163
173
|
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>
|
|
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>
|
|
170
180
|
`;
|
|
171
181
|
}
|
|
172
182
|
// "Creator" if not account tile
|
|
173
183
|
if (!((_c = this.model) === null || _c === void 0 ? void 0 : _c.creators) || this.model.creators.length === 0) {
|
|
174
184
|
return nothing;
|
|
175
185
|
}
|
|
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>
|
|
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>
|
|
181
191
|
`;
|
|
182
192
|
}
|
|
183
193
|
get datePublishedTemplate() {
|
|
@@ -229,22 +239,22 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
229
239
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.subjects) || this.model.subjects.length === 0) {
|
|
230
240
|
return nothing;
|
|
231
241
|
}
|
|
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>
|
|
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>
|
|
237
247
|
`;
|
|
238
248
|
}
|
|
239
249
|
get collectionsTemplate() {
|
|
240
250
|
if (!this.collectionLinks || this.collectionLinks.length === 0) {
|
|
241
251
|
return nothing;
|
|
242
252
|
}
|
|
243
|
-
return html `
|
|
244
|
-
<div id="collections" class="metadata">
|
|
245
|
-
${this.labelTemplate(msg('Collections'))}
|
|
246
|
-
${join(this.collectionLinks, ', ')}
|
|
247
|
-
</div>
|
|
253
|
+
return html `
|
|
254
|
+
<div id="collections" class="metadata">
|
|
255
|
+
${this.labelTemplate(msg('Collections'))}
|
|
256
|
+
${join(this.collectionLinks, ', ')}
|
|
257
|
+
</div>
|
|
248
258
|
`;
|
|
249
259
|
}
|
|
250
260
|
get descriptionTemplate() {
|
|
@@ -258,23 +268,23 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
258
268
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.review))
|
|
259
269
|
return nothing;
|
|
260
270
|
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>
|
|
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>
|
|
269
279
|
`;
|
|
270
280
|
}
|
|
271
281
|
get textSnippetsTemplate() {
|
|
272
282
|
var _a;
|
|
273
283
|
if (!this.hasSnippets)
|
|
274
284
|
return nothing;
|
|
275
|
-
return html `<text-snippet-block
|
|
276
|
-
viewsize="list"
|
|
277
|
-
.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}
|
|
278
288
|
></text-snippet-block>`;
|
|
279
289
|
}
|
|
280
290
|
get hasSnippets() {
|
|
@@ -285,12 +295,12 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
285
295
|
var _a;
|
|
286
296
|
if (!((_a = this.model) === null || _a === void 0 ? void 0 : _a.captureDates) || !this.model.title)
|
|
287
297
|
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>
|
|
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>
|
|
294
304
|
`;
|
|
295
305
|
}
|
|
296
306
|
// Utility functions
|
|
@@ -298,10 +308,10 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
298
308
|
metadataTemplate(text, label = '', id) {
|
|
299
309
|
if (!text)
|
|
300
310
|
return nothing;
|
|
301
|
-
return html `
|
|
302
|
-
<div id=${ifDefined(id)} class="metadata">
|
|
303
|
-
${this.labelTemplate(label)} ${text}
|
|
304
|
-
</div>
|
|
311
|
+
return html `
|
|
312
|
+
<div id=${ifDefined(id)} class="metadata">
|
|
313
|
+
${this.labelTemplate(label)} ${text}
|
|
314
|
+
</div>
|
|
305
315
|
`;
|
|
306
316
|
}
|
|
307
317
|
labelTemplate(label) {
|
|
@@ -316,11 +326,11 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
316
326
|
const query = encodeURIComponent(`${field}:"${searchTerm}"`);
|
|
317
327
|
// No whitespace after closing tag
|
|
318
328
|
// 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
|
|
329
|
+
return html `<a
|
|
330
|
+
href="${this.baseNavigationUrl}/search?query=${query}"
|
|
331
|
+
rel="nofollow"
|
|
332
|
+
>
|
|
333
|
+
${DOMPurify.sanitize(searchTerm)}</a
|
|
324
334
|
>`;
|
|
325
335
|
}
|
|
326
336
|
detailsLink(identifier, text, isCollection = false) {
|
|
@@ -411,190 +421,190 @@ let TileList = class TileList extends BaseTileComponent {
|
|
|
411
421
|
return 'long';
|
|
412
422
|
}
|
|
413
423
|
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
|
-
}
|
|
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
|
+
}
|
|
598
608
|
`;
|
|
599
609
|
}
|
|
600
610
|
};
|