@internetarchive/collection-browser 4.0.0 → 4.0.1

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 (48) 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/app-root.js +614 -614
  11. package/dist/src/app-root.js.map +1 -1
  12. package/dist/src/collection-browser.js +764 -764
  13. package/dist/src/collection-browser.js.map +1 -1
  14. package/dist/src/collection-facets/more-facets-content.js +121 -121
  15. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  16. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  17. package/dist/src/models.js.map +1 -1
  18. package/dist/src/tiles/grid/collection-tile.js +89 -89
  19. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  20. package/dist/src/tiles/grid/item-tile.js +138 -138
  21. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  22. package/dist/src/tiles/hover/hover-pane-controller.js +28 -28
  23. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  24. package/dist/src/tiles/models.js.map +1 -1
  25. package/dist/src/tiles/tile-dispatcher.js +216 -216
  26. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  27. package/dist/test/collection-browser.test.js +1 -1
  28. package/dist/test/collection-browser.test.js.map +1 -1
  29. package/eslint.config.mjs +53 -53
  30. package/index.html +24 -24
  31. package/local.archive.org.cert +86 -86
  32. package/local.archive.org.key +27 -27
  33. package/package.json +121 -119
  34. package/renovate.json +6 -6
  35. package/src/app-root.ts +1166 -1166
  36. package/src/collection-browser.ts +3075 -3075
  37. package/src/collection-facets/more-facets-content.ts +644 -644
  38. package/src/data-source/collection-browser-query-state.ts +59 -59
  39. package/src/models.ts +873 -873
  40. package/src/tiles/grid/collection-tile.ts +184 -184
  41. package/src/tiles/grid/item-tile.ts +346 -346
  42. package/src/tiles/hover/hover-pane-controller.ts +627 -627
  43. package/src/tiles/models.ts +8 -8
  44. package/src/tiles/tile-dispatcher.ts +518 -518
  45. package/test/collection-browser.test.ts +1 -1
  46. package/tsconfig.json +25 -25
  47. package/web-dev-server.config.mjs +30 -30
  48. package/web-test-runner.config.mjs +52 -41
@@ -1,346 +1,346 @@
1
- import { css, CSSResultGroup, html, nothing, TemplateResult } from 'lit';
2
- import { customElement, property } from 'lit/decorators.js';
3
- import { ifDefined } from 'lit/directives/if-defined.js';
4
- import { map } from 'lit/directives/map.js';
5
- import { classMap } from 'lit/directives/class-map.js';
6
- import { msg } from '@lit/localize';
7
-
8
- import type { SortParam } from '@internetarchive/search-service';
9
- import type { DateFormat } from '../../utils/format-date';
10
- import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
11
- import { BaseTileComponent } from '../base-tile-component';
12
- import { baseTileStyles } from './styles/tile-grid-shared-styles';
13
- import { LayoutType } from '../models';
14
-
15
- import '../image-block';
16
- import '../review-block';
17
- import '../text-snippet-block';
18
- import '../item-image';
19
- import '../tile-mediatype-icon';
20
- import './tile-stats';
21
-
22
- @customElement('item-tile')
23
- export class ItemTile extends BaseTileComponent {
24
- /*
25
- * Reactive properties inherited from BaseTileComponent:
26
- * - model?: TileModel;
27
- * - currentWidth?: number;
28
- * - currentHeight?: number;
29
- * - baseNavigationUrl?: string;
30
- * - baseImageUrl?: string;
31
- * - collectionPagePath?: string;
32
- * - sortParam: SortParam | null = null;
33
- * - defaultSortParam: SortParam | null = null;
34
- * - creatorFilter?: string;
35
- * - mobileBreakpoint?: number;
36
- * - loggedIn = false;
37
- * - suppressBlurring = false;
38
- * - useLocalTime = false;
39
- */
40
-
41
- @property({ type: Boolean }) showInfoButton = false;
42
-
43
- @property({ type: Boolean }) showTvClips = false;
44
-
45
- @property({ type: String }) layoutType: LayoutType = 'default';
46
-
47
- render() {
48
- const itemTitle = this.model?.title;
49
- const containerClasses = classMap({
50
- container: true,
51
- simple: this.layoutType !== 'default',
52
- 'stats-only': this.layoutType === 'stats-only',
53
- 'snippets-only': this.layoutType === 'snippets-only',
54
- minimal: this.layoutType === 'minimal',
55
- });
56
-
57
- return html`
58
- <div class=${containerClasses}>
59
- ${this.infoButtonTemplate}
60
- <div class="tile-details">
61
- <div class="item-info">
62
- ${this.imageBlockTemplate}
63
-
64
- <div id="title">
65
- <h3 class="truncated" title=${ifDefined(itemTitle)}>
66
- ${itemTitle}
67
- </h3>
68
- </div>
69
-
70
- ${this.volumeIssueTemplate}
71
- ${this.isSortedByDate
72
- ? this.sortedDateInfoTemplate
73
- : this.creatorTemplate}
74
- ${this.webArchivesCaptureDatesTemplate} ${this.textSnippetsTemplate}
75
- ${this.reviewBlockTemplate}
76
- </div>
77
-
78
- ${this.tileStatsTemplate}
79
- </div>
80
- </div>
81
- `;
82
- }
83
-
84
- /**
85
- * Templates
86
- */
87
- private get creatorTemplate(): TemplateResult | typeof nothing {
88
- const displayedCreator =
89
- this.displayValueProvider.firstCreatorMatchingFilter;
90
- if (!displayedCreator) return nothing;
91
-
92
- return html`
93
- <div class="created-by">
94
- <span class="truncated" title=${displayedCreator}>
95
- by&nbsp;${displayedCreator}
96
- </span>
97
- </div>
98
- `;
99
- }
100
-
101
- private get imageBlockTemplate(): TemplateResult {
102
- return html`
103
- <image-block
104
- .model=${this.model}
105
- .baseImageUrl=${this.baseImageUrl}
106
- .loggedIn=${this.loggedIn}
107
- .suppressBlurring=${this.suppressBlurring}
108
- .isCompactTile=${false}
109
- .isListTile=${false}
110
- .viewSize=${'grid'}
111
- >
112
- </image-block>
113
- `;
114
- }
115
-
116
- private get sortedDateInfoTemplate() {
117
- let sortedValue;
118
- let format: DateFormat = 'long';
119
- switch (this.effectiveSort?.field) {
120
- case 'date': {
121
- const datePublished = this.model?.datePublished;
122
- sortedValue = { field: 'published', value: datePublished };
123
- if (isFirstMillisecondOfUTCYear(datePublished)) {
124
- format = 'year-only';
125
- }
126
- break;
127
- }
128
- case 'reviewdate':
129
- sortedValue = { field: 'reviewed', value: this.model?.dateReviewed };
130
- break;
131
- case 'addeddate':
132
- sortedValue = { field: 'added', value: this.model?.dateAdded };
133
- break;
134
- case 'publicdate':
135
- sortedValue = { field: 'archived', value: this.model?.dateArchived };
136
- break;
137
- default:
138
- break;
139
- }
140
-
141
- if (!sortedValue?.value) {
142
- return nothing;
143
- }
144
-
145
- const formattedDate = this.getFormattedDate(sortedValue.value, format);
146
- return html`
147
- <div class="date-sorted-by truncated">
148
- <span>${sortedValue.field} ${formattedDate}</span>
149
- </div>
150
- `;
151
- }
152
-
153
- private get infoButtonTemplate(): TemplateResult | typeof nothing {
154
- // &#9432; is an information icon
155
- return this.showInfoButton
156
- ? html`<button class="info-button" @click=${this.infoButtonPressed}>
157
- &#9432;
158
- <span class="sr-only">${msg('More info')}</span>
159
- </button>`
160
- : nothing;
161
- }
162
-
163
- private get reviewBlockTemplate(): TemplateResult | typeof nothing {
164
- if (!this.model?.review) return nothing;
165
-
166
- const { reviewtitle, reviewbody, stars } = this.model.review;
167
- return html`
168
- <review-block
169
- viewsize="grid"
170
- title=${ifDefined(reviewtitle)}
171
- body=${ifDefined(reviewbody)}
172
- starRating=${ifDefined(stars)}
173
- >
174
- </review-block>
175
- `;
176
- }
177
-
178
- private get textSnippetsTemplate(): TemplateResult | typeof nothing {
179
- if (!this.hasSnippets) return nothing;
180
- if (['stats-only', 'minimal'].includes(this.layoutType)) {
181
- return nothing;
182
- }
183
-
184
- return html`
185
- <text-snippet-block viewsize="grid" .snippets=${this.model?.snippets}>
186
- </text-snippet-block>
187
- `;
188
- }
189
-
190
- private get volumeIssueTemplate(): TemplateResult | typeof nothing {
191
- if (!this.model?.volume || !this.model?.issue) return nothing;
192
-
193
- return html`
194
- <div class="volume-issue">
195
- <span class="truncated" title="volume|issue">
196
- Volume&nbsp;${this.model?.volume}, Issue&nbsp;${this.model?.issue}
197
- </span>
198
- </div>
199
- `;
200
- }
201
-
202
- private get webArchivesCaptureDatesTemplate():
203
- | TemplateResult
204
- | typeof nothing {
205
- if (!this.model?.captureDates || !this.model.title) return nothing;
206
-
207
- return html`
208
- <ul class="capture-dates">
209
- ${map(
210
- this.model.captureDates,
211
- date =>
212
- html`<li>
213
- ${this.displayValueProvider.webArchivesCaptureLink(
214
- this.model!.title,
215
- date,
216
- )}
217
- </li>`,
218
- )}
219
- </ul>
220
- `;
221
- }
222
-
223
- /**
224
- * Template for the stats row along the bottom of the tile.
225
- */
226
- private get tileStatsTemplate(): TemplateResult | typeof nothing {
227
- if (['snippets-only', 'minimal'].includes(this.layoutType)) {
228
- return nothing;
229
- }
230
-
231
- const effectiveSort = this.sortParam ?? this.defaultSortParam;
232
- const [viewCount, viewLabel] =
233
- effectiveSort?.field === 'week'
234
- ? [this.model?.weeklyViewCount, 'weekly views']
235
- : [this.model?.viewCount, 'all-time views'];
236
-
237
- return html`
238
- <tile-stats
239
- .model=${this.model}
240
- .mediatype=${this.model?.mediatype}
241
- .viewCount=${viewCount}
242
- .viewLabel=${viewLabel}
243
- .favCount=${this.model?.favCount}
244
- .commentCount=${this.model?.commentCount}
245
- .tvClipCount=${this.model?.tvClipCount}
246
- .showTvClips=${this.showTvClips}
247
- >
248
- </tile-stats>
249
- `;
250
- }
251
-
252
- private get isSortedByDate(): boolean {
253
- return ['date', 'reviewdate', 'addeddate', 'publicdate'].includes(
254
- this.effectiveSort?.field as string,
255
- );
256
- }
257
-
258
- /**
259
- * Returns the active sort param if one is set, or the default sort param otherwise.
260
- */
261
- private get effectiveSort(): SortParam | null {
262
- return this.sortParam ?? this.defaultSortParam;
263
- }
264
-
265
- private get hasSnippets(): boolean {
266
- return !!this.model?.snippets?.length;
267
- }
268
-
269
- private infoButtonPressed(e: PointerEvent): void {
270
- e.preventDefault();
271
- const event = new CustomEvent<{ x: number; y: number }>(
272
- 'infoButtonPressed',
273
- { detail: { x: e.clientX, y: e.clientY } },
274
- );
275
- this.dispatchEvent(event);
276
- }
277
-
278
- /**
279
- * CSS
280
- */
281
- static get styles(): CSSResultGroup {
282
- const tileBorderColor = css`var(--tileBorderColor, #dddddd)`;
283
-
284
- return [
285
- baseTileStyles,
286
- css`
287
- a:link {
288
- text-decoration: none;
289
- color: var(--ia-theme-link-color, #4b64ff);
290
- }
291
- a:hover {
292
- text-decoration: underline;
293
- }
294
-
295
- .container {
296
- border: 1px solid ${tileBorderColor};
297
- }
298
-
299
- .simple #title > .truncated {
300
- -webkit-line-clamp: 2;
301
- }
302
-
303
- .simple .created-by > .truncated,
304
- .simple .date-sorted-by > .truncated,
305
- .simple .volume-issue > .truncated {
306
- -webkit-line-clamp: 1;
307
- }
308
-
309
- .simple.snippets-only .item-info,
310
- .simple.minimal .item-info {
311
- padding-bottom: 5px;
312
- }
313
-
314
- .simple.snippets-only text-snippet-block {
315
- margin-top: auto; /* Force the snippets to the bottom of the tile */
316
- }
317
-
318
- .capture-dates {
319
- margin: 0;
320
- padding: 0 5px;
321
- list-style-type: none;
322
- }
323
-
324
- review-block,
325
- text-snippet-block {
326
- --containerLeftMargin: 5px;
327
- --containerTopMargin: 5px;
328
- }
329
-
330
- /**
331
- * iOS Safari long-press on tiles (to bring up hover pane)
332
- * gets messy without this
333
- */
334
- @media screen and (pointer: coarse) and (hover: none) {
335
- .container {
336
- -webkit-touch-callout: none;
337
- }
338
-
339
- .truncated {
340
- -webkit-touch-callout: default;
341
- }
342
- }
343
- `,
344
- ];
345
- }
346
- }
1
+ import { css, CSSResultGroup, html, nothing, TemplateResult } from 'lit';
2
+ import { customElement, property } from 'lit/decorators.js';
3
+ import { ifDefined } from 'lit/directives/if-defined.js';
4
+ import { map } from 'lit/directives/map.js';
5
+ import { classMap } from 'lit/directives/class-map.js';
6
+ import { msg } from '@lit/localize';
7
+
8
+ import type { SortParam } from '@internetarchive/search-service';
9
+ import type { DateFormat } from '../../utils/format-date';
10
+ import { isFirstMillisecondOfUTCYear } from '../../utils/local-date-from-utc';
11
+ import { BaseTileComponent } from '../base-tile-component';
12
+ import { baseTileStyles } from './styles/tile-grid-shared-styles';
13
+ import { LayoutType } from '../models';
14
+
15
+ import '../image-block';
16
+ import '../review-block';
17
+ import '../text-snippet-block';
18
+ import '../item-image';
19
+ import '../tile-mediatype-icon';
20
+ import './tile-stats';
21
+
22
+ @customElement('item-tile')
23
+ export class ItemTile extends BaseTileComponent {
24
+ /*
25
+ * Reactive properties inherited from BaseTileComponent:
26
+ * - model?: TileModel;
27
+ * - currentWidth?: number;
28
+ * - currentHeight?: number;
29
+ * - baseNavigationUrl?: string;
30
+ * - baseImageUrl?: string;
31
+ * - collectionPagePath?: string;
32
+ * - sortParam: SortParam | null = null;
33
+ * - defaultSortParam: SortParam | null = null;
34
+ * - creatorFilter?: string;
35
+ * - mobileBreakpoint?: number;
36
+ * - loggedIn = false;
37
+ * - suppressBlurring = false;
38
+ * - useLocalTime = false;
39
+ */
40
+
41
+ @property({ type: Boolean }) showInfoButton = false;
42
+
43
+ @property({ type: Boolean }) showTvClips = false;
44
+
45
+ @property({ type: String }) layoutType: LayoutType = 'default';
46
+
47
+ render() {
48
+ const itemTitle = this.model?.title;
49
+ const containerClasses = classMap({
50
+ container: true,
51
+ simple: this.layoutType !== 'default',
52
+ 'stats-only': this.layoutType === 'stats-only',
53
+ 'snippets-only': this.layoutType === 'snippets-only',
54
+ minimal: this.layoutType === 'minimal',
55
+ });
56
+
57
+ return html`
58
+ <div class=${containerClasses}>
59
+ ${this.infoButtonTemplate}
60
+ <div class="tile-details">
61
+ <div class="item-info">
62
+ ${this.imageBlockTemplate}
63
+
64
+ <div id="title">
65
+ <h3 class="truncated" title=${ifDefined(itemTitle)}>
66
+ ${itemTitle}
67
+ </h3>
68
+ </div>
69
+
70
+ ${this.volumeIssueTemplate}
71
+ ${this.isSortedByDate
72
+ ? this.sortedDateInfoTemplate
73
+ : this.creatorTemplate}
74
+ ${this.webArchivesCaptureDatesTemplate} ${this.textSnippetsTemplate}
75
+ ${this.reviewBlockTemplate}
76
+ </div>
77
+
78
+ ${this.tileStatsTemplate}
79
+ </div>
80
+ </div>
81
+ `;
82
+ }
83
+
84
+ /**
85
+ * Templates
86
+ */
87
+ private get creatorTemplate(): TemplateResult | typeof nothing {
88
+ const displayedCreator =
89
+ this.displayValueProvider.firstCreatorMatchingFilter;
90
+ if (!displayedCreator) return nothing;
91
+
92
+ return html`
93
+ <div class="created-by">
94
+ <span class="truncated" title=${displayedCreator}>
95
+ by&nbsp;${displayedCreator}
96
+ </span>
97
+ </div>
98
+ `;
99
+ }
100
+
101
+ private get imageBlockTemplate(): TemplateResult {
102
+ return html`
103
+ <image-block
104
+ .model=${this.model}
105
+ .baseImageUrl=${this.baseImageUrl}
106
+ .loggedIn=${this.loggedIn}
107
+ .suppressBlurring=${this.suppressBlurring}
108
+ .isCompactTile=${false}
109
+ .isListTile=${false}
110
+ .viewSize=${'grid'}
111
+ >
112
+ </image-block>
113
+ `;
114
+ }
115
+
116
+ private get sortedDateInfoTemplate() {
117
+ let sortedValue;
118
+ let format: DateFormat = 'long';
119
+ switch (this.effectiveSort?.field) {
120
+ case 'date': {
121
+ const datePublished = this.model?.datePublished;
122
+ sortedValue = { field: 'published', value: datePublished };
123
+ if (isFirstMillisecondOfUTCYear(datePublished)) {
124
+ format = 'year-only';
125
+ }
126
+ break;
127
+ }
128
+ case 'reviewdate':
129
+ sortedValue = { field: 'reviewed', value: this.model?.dateReviewed };
130
+ break;
131
+ case 'addeddate':
132
+ sortedValue = { field: 'added', value: this.model?.dateAdded };
133
+ break;
134
+ case 'publicdate':
135
+ sortedValue = { field: 'archived', value: this.model?.dateArchived };
136
+ break;
137
+ default:
138
+ break;
139
+ }
140
+
141
+ if (!sortedValue?.value) {
142
+ return nothing;
143
+ }
144
+
145
+ const formattedDate = this.getFormattedDate(sortedValue.value, format);
146
+ return html`
147
+ <div class="date-sorted-by truncated">
148
+ <span>${sortedValue.field} ${formattedDate}</span>
149
+ </div>
150
+ `;
151
+ }
152
+
153
+ private get infoButtonTemplate(): TemplateResult | typeof nothing {
154
+ // &#9432; is an information icon
155
+ return this.showInfoButton
156
+ ? html`<button class="info-button" @click=${this.infoButtonPressed}>
157
+ &#9432;
158
+ <span class="sr-only">${msg('More info')}</span>
159
+ </button>`
160
+ : nothing;
161
+ }
162
+
163
+ private get reviewBlockTemplate(): TemplateResult | typeof nothing {
164
+ if (!this.model?.review) return nothing;
165
+
166
+ const { reviewtitle, reviewbody, stars } = this.model.review;
167
+ return html`
168
+ <review-block
169
+ viewsize="grid"
170
+ title=${ifDefined(reviewtitle)}
171
+ body=${ifDefined(reviewbody)}
172
+ starRating=${ifDefined(stars)}
173
+ >
174
+ </review-block>
175
+ `;
176
+ }
177
+
178
+ private get textSnippetsTemplate(): TemplateResult | typeof nothing {
179
+ if (!this.hasSnippets) return nothing;
180
+ if (['stats-only', 'minimal'].includes(this.layoutType)) {
181
+ return nothing;
182
+ }
183
+
184
+ return html`
185
+ <text-snippet-block viewsize="grid" .snippets=${this.model?.snippets}>
186
+ </text-snippet-block>
187
+ `;
188
+ }
189
+
190
+ private get volumeIssueTemplate(): TemplateResult | typeof nothing {
191
+ if (!this.model?.volume || !this.model?.issue) return nothing;
192
+
193
+ return html`
194
+ <div class="volume-issue">
195
+ <span class="truncated" title="volume|issue">
196
+ Volume&nbsp;${this.model?.volume}, Issue&nbsp;${this.model?.issue}
197
+ </span>
198
+ </div>
199
+ `;
200
+ }
201
+
202
+ private get webArchivesCaptureDatesTemplate():
203
+ | TemplateResult
204
+ | typeof nothing {
205
+ if (!this.model?.captureDates || !this.model.title) return nothing;
206
+
207
+ return html`
208
+ <ul class="capture-dates">
209
+ ${map(
210
+ this.model.captureDates,
211
+ date =>
212
+ html`<li>
213
+ ${this.displayValueProvider.webArchivesCaptureLink(
214
+ this.model!.title,
215
+ date,
216
+ )}
217
+ </li>`,
218
+ )}
219
+ </ul>
220
+ `;
221
+ }
222
+
223
+ /**
224
+ * Template for the stats row along the bottom of the tile.
225
+ */
226
+ private get tileStatsTemplate(): TemplateResult | typeof nothing {
227
+ if (['snippets-only', 'minimal'].includes(this.layoutType)) {
228
+ return nothing;
229
+ }
230
+
231
+ const effectiveSort = this.sortParam ?? this.defaultSortParam;
232
+ const [viewCount, viewLabel] =
233
+ effectiveSort?.field === 'week'
234
+ ? [this.model?.weeklyViewCount, 'weekly views']
235
+ : [this.model?.viewCount, 'all-time views'];
236
+
237
+ return html`
238
+ <tile-stats
239
+ .model=${this.model}
240
+ .mediatype=${this.model?.mediatype}
241
+ .viewCount=${viewCount}
242
+ .viewLabel=${viewLabel}
243
+ .favCount=${this.model?.favCount}
244
+ .commentCount=${this.model?.commentCount}
245
+ .tvClipCount=${this.model?.tvClipCount}
246
+ .showTvClips=${this.showTvClips}
247
+ >
248
+ </tile-stats>
249
+ `;
250
+ }
251
+
252
+ private get isSortedByDate(): boolean {
253
+ return ['date', 'reviewdate', 'addeddate', 'publicdate'].includes(
254
+ this.effectiveSort?.field as string,
255
+ );
256
+ }
257
+
258
+ /**
259
+ * Returns the active sort param if one is set, or the default sort param otherwise.
260
+ */
261
+ private get effectiveSort(): SortParam | null {
262
+ return this.sortParam ?? this.defaultSortParam;
263
+ }
264
+
265
+ private get hasSnippets(): boolean {
266
+ return !!this.model?.snippets?.length;
267
+ }
268
+
269
+ private infoButtonPressed(e: PointerEvent): void {
270
+ e.preventDefault();
271
+ const event = new CustomEvent<{ x: number; y: number }>(
272
+ 'infoButtonPressed',
273
+ { detail: { x: e.clientX, y: e.clientY } },
274
+ );
275
+ this.dispatchEvent(event);
276
+ }
277
+
278
+ /**
279
+ * CSS
280
+ */
281
+ static get styles(): CSSResultGroup {
282
+ const tileBorderColor = css`var(--tileBorderColor, #dddddd)`;
283
+
284
+ return [
285
+ baseTileStyles,
286
+ css`
287
+ a:link {
288
+ text-decoration: none;
289
+ color: var(--ia-theme-link-color, #4b64ff);
290
+ }
291
+ a:hover {
292
+ text-decoration: underline;
293
+ }
294
+
295
+ .container {
296
+ border: 1px solid ${tileBorderColor};
297
+ }
298
+
299
+ .simple #title > .truncated {
300
+ -webkit-line-clamp: 2;
301
+ }
302
+
303
+ .simple .created-by > .truncated,
304
+ .simple .date-sorted-by > .truncated,
305
+ .simple .volume-issue > .truncated {
306
+ -webkit-line-clamp: 1;
307
+ }
308
+
309
+ .simple.snippets-only .item-info,
310
+ .simple.minimal .item-info {
311
+ padding-bottom: 5px;
312
+ }
313
+
314
+ .simple.snippets-only text-snippet-block {
315
+ margin-top: auto; /* Force the snippets to the bottom of the tile */
316
+ }
317
+
318
+ .capture-dates {
319
+ margin: 0;
320
+ padding: 0 5px;
321
+ list-style-type: none;
322
+ }
323
+
324
+ review-block,
325
+ text-snippet-block {
326
+ --containerLeftMargin: 5px;
327
+ --containerTopMargin: 5px;
328
+ }
329
+
330
+ /**
331
+ * iOS Safari long-press on tiles (to bring up hover pane)
332
+ * gets messy without this
333
+ */
334
+ @media screen and (pointer: coarse) and (hover: none) {
335
+ .container {
336
+ -webkit-touch-callout: none;
337
+ }
338
+
339
+ .truncated {
340
+ -webkit-touch-callout: default;
341
+ }
342
+ }
343
+ `,
344
+ ];
345
+ }
346
+ }