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