@canopy-iiif/app 1.6.22 → 1.8.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.
@@ -0,0 +1,399 @@
1
+ .canopy-gallery {
2
+ position: relative;
3
+ padding: 0;
4
+ margin: 0;
5
+ --canopy-gallery-gap: 1.5rem;
6
+ --canopy-gallery-min-column: 16rem;
7
+ --canopy-gallery-radius: 1rem;
8
+ color: var(--color-gray-900);
9
+
10
+ &__close-anchor {
11
+ position: absolute;
12
+ width: 1px;
13
+ height: 1px;
14
+ margin: -1px;
15
+ padding: 0;
16
+ overflow: hidden;
17
+ clip: rect(0 0 0 0);
18
+ border: 0;
19
+ }
20
+
21
+ &__header {
22
+ margin-bottom: clamp(1rem, 2vw, 1.5rem);
23
+ }
24
+
25
+ &__heading {
26
+ margin: 0;
27
+ padding: 0;
28
+ font-size: 2.618rem;
29
+ line-height: 1.2;
30
+ }
31
+
32
+ &__description {
33
+ margin: 1rem 0 0;
34
+ font-size: 1.222rem;
35
+ max-width: unset;
36
+ color: var(--color-gray-muted);
37
+ }
38
+
39
+ &__grid {
40
+ display: grid;
41
+ grid-template-columns: repeat(
42
+ auto-fit,
43
+ minmax(var(--canopy-gallery-min-column, 16rem), 1fr)
44
+ );
45
+ gap: var(--canopy-gallery-gap, 1.5rem);
46
+ padding: var(--canopy-gallery-gap, 1.5rem) 0;
47
+ }
48
+
49
+ &__item {
50
+ position: relative;
51
+ display: flex;
52
+ flex-direction: column;
53
+ height: 100%;
54
+ padding: clamp(0.75rem, 1vw, 1rem);
55
+ border: 1px solid var(--color-gray-200);
56
+ border-radius: var(--canopy-gallery-radius, 1rem);
57
+ background-color: #fff;
58
+ box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
59
+
60
+ &:focus-within {
61
+ outline: 2px solid var(--color-accent-default, #3b82f6);
62
+ outline-offset: 3px;
63
+ }
64
+ }
65
+
66
+ &__media {
67
+ position: relative;
68
+ aspect-ratio: 4 / 3;
69
+ overflow: hidden;
70
+ border-radius: calc(var(--canopy-gallery-radius, 1rem) - 0.25rem);
71
+ background: var(--color-gray-100);
72
+
73
+ img,
74
+ picture,
75
+ video,
76
+ iframe {
77
+ width: 100%;
78
+ height: 100%;
79
+ display: block;
80
+ object-fit: cover;
81
+ }
82
+ }
83
+
84
+ &__placeholder {
85
+ width: 100%;
86
+ height: 100%;
87
+ background-image: linear-gradient(
88
+ 45deg,
89
+ rgba(255, 255, 255, 0.45) 25%,
90
+ transparent 25%,
91
+ transparent 50%,
92
+ rgba(255, 255, 255, 0.45) 50%,
93
+ rgba(255, 255, 255, 0.45) 75%,
94
+ transparent 75%,
95
+ transparent
96
+ );
97
+ background-size: 1.5rem 1.5rem;
98
+ }
99
+
100
+ &__caption {
101
+ margin: clamp(0.75rem, 1vw, 1rem) 0 0;
102
+ display: flex;
103
+ flex-direction: column;
104
+ gap: 0.35rem;
105
+ }
106
+
107
+ &__kicker {
108
+ text-transform: uppercase;
109
+ letter-spacing: 0.08em;
110
+ font-size: 0.75rem;
111
+ color: var(--color-gray-muted);
112
+ }
113
+
114
+ &__title-text {
115
+ font-weight: 600;
116
+ font-size: 1.05rem;
117
+ line-height: 1.3;
118
+ color: var(--color-gray-900);
119
+ }
120
+
121
+ &__summary {
122
+ font-size: 0.95rem;
123
+ color: var(--color-gray-muted);
124
+ }
125
+
126
+ &__meta {
127
+ margin: 0.35rem 0 0;
128
+ padding: 0;
129
+ list-style: none;
130
+ display: flex;
131
+ flex-wrap: wrap;
132
+ gap: 0.75rem;
133
+ font-size: 0.8rem;
134
+ color: var(--color-gray-muted);
135
+
136
+ &--modal {
137
+ font-size: 0.9rem;
138
+ gap: 1rem;
139
+ }
140
+ }
141
+
142
+ &__trigger {
143
+ position: absolute;
144
+ inset: 0;
145
+ border-radius: inherit;
146
+ text-decoration: none;
147
+ border: 0;
148
+ z-index: 2;
149
+ color: inherit;
150
+ background: transparent;
151
+ }
152
+
153
+ &__trigger-label {
154
+ position: absolute;
155
+ width: 1px;
156
+ height: 1px;
157
+ padding: 0;
158
+ margin: -1px;
159
+ overflow: hidden;
160
+ clip: rect(0 0 0 0);
161
+ border: 0;
162
+ }
163
+
164
+ &__modals {
165
+ position: relative;
166
+ z-index: 100;
167
+ }
168
+
169
+ &__modal {
170
+ position: fixed;
171
+ inset: 0;
172
+ opacity: 0;
173
+ pointer-events: none;
174
+ visibility: hidden;
175
+ z-index: 200;
176
+
177
+ &:target,
178
+ &[data-canopy-gallery-active="1"] {
179
+ opacity: 1;
180
+ pointer-events: auto;
181
+ visibility: visible;
182
+ }
183
+ }
184
+
185
+ &__modal:not([data-canopy-gallery-active]) {
186
+ width: 0;
187
+ height: 0;
188
+ }
189
+
190
+ &__modal-scrim {
191
+ min-height: 100vh;
192
+ display: block;
193
+ background: rgba(15, 23, 42, 1);
194
+ padding: 0;
195
+ }
196
+
197
+ &__modal-panel {
198
+ background: #fff;
199
+ color: var(--color-gray-900);
200
+ border-radius: 0;
201
+ width: 100%;
202
+ height: 100vh;
203
+ max-height: none;
204
+ overflow: auto;
205
+ display: flex;
206
+ flex-direction: column;
207
+ box-shadow: none;
208
+ }
209
+
210
+ &__modal-header {
211
+ border: none;
212
+ padding-top: 3rem;
213
+ padding-bottom: 0;
214
+ padding-left: clamp(1.25rem, 3vw, 2.5rem);
215
+ padding-right: clamp(1.25rem, 3vw, 2.5rem);
216
+ display: flex;
217
+ gap: clamp(1rem, 2vw, 2rem);
218
+ }
219
+
220
+ &__modal-thumb {
221
+ flex: 0 0 auto;
222
+ width: 100px;
223
+ aspect-ratio: 1 / 1;
224
+ border-radius: 0.5rem;
225
+ overflow: hidden;
226
+ background: var(--color-gray-100);
227
+ height: fit-content;
228
+
229
+ img,
230
+ picture,
231
+ video,
232
+ iframe {
233
+ width: 100%;
234
+ height: 100%;
235
+ object-fit: cover;
236
+ display: block;
237
+ }
238
+ }
239
+
240
+ &__modal-text {
241
+ flex: 1;
242
+ min-width: 0;
243
+ }
244
+
245
+ &__modal-kicker {
246
+ text-transform: uppercase;
247
+ letter-spacing: 0.08em;
248
+ font-size: 0.8rem;
249
+ color: var(--color-gray-muted);
250
+ margin: 0 0 0.5rem;
251
+ }
252
+
253
+ &__modal-title {
254
+ margin: 0.618rem 0 0;
255
+ font-size: 1.618rem;
256
+ line-height: 1.2;
257
+ }
258
+
259
+ &__modal-summary {
260
+ margin: 0;
261
+ font-size: 1.2222rem;
262
+ color: var(--color-gray-muted);
263
+ }
264
+
265
+ &__modal-body {
266
+ padding: clamp(1rem, 3vw, 2.5rem);
267
+ flex: 1;
268
+ overflow: auto;
269
+ }
270
+
271
+ &__modal-footer {
272
+ padding: clamp(1rem, 2vw, 1.5rem) clamp(1.25rem, 3vw, 2.5rem);
273
+ display: flex;
274
+ flex-wrap: wrap;
275
+ align-items: center;
276
+ gap: 1rem;
277
+ border-top: 1px solid rgba(15, 23, 42, 0.08);
278
+ }
279
+
280
+ &__modal-close {
281
+ background: var(--color-accent-100);
282
+ border-radius: 999px;
283
+ padding: 0.35rem 1.25rem;
284
+ font-weight: 600;
285
+ }
286
+
287
+ &__modal-nav {
288
+ margin-left: auto;
289
+ display: flex;
290
+ align-items: center;
291
+ gap: 1rem;
292
+ }
293
+
294
+ &__modal-nav-link {
295
+ font-weight: 600;
296
+
297
+ &--prev::before {
298
+ content: "← ";
299
+ }
300
+
301
+ &--next::after {
302
+ content: " →";
303
+ }
304
+ }
305
+
306
+ @media (max-width: 640px) {
307
+ &__grid {
308
+ grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
309
+ }
310
+
311
+ &__item {
312
+ padding: 0.75rem;
313
+ }
314
+
315
+ &__modal-panel {
316
+ max-height: 100vh;
317
+ }
318
+
319
+ &__modal-header {
320
+ flex-direction: column;
321
+ }
322
+
323
+ &__modal-thumb {
324
+ width: 100%;
325
+ }
326
+
327
+ &__modal-nav {
328
+ width: 100%;
329
+ justify-content: space-between;
330
+ margin-left: 0;
331
+ }
332
+ }
333
+ }
334
+
335
+ body[data-canopy-gallery-locked="1"] {
336
+ overflow: hidden;
337
+ }
338
+
339
+ .canopy-gallery--popup-medium {
340
+ .canopy-gallery__modal-scrim {
341
+ min-height: 100vh;
342
+ display: flex;
343
+ align-items: center;
344
+ justify-content: center;
345
+ padding: clamp(1.5rem, 3vw, 3rem);
346
+ background: rgba(15, 23, 42, 0.85);
347
+ }
348
+
349
+ .canopy-gallery__modal-panel {
350
+ width: min(960px, calc(100% - clamp(2rem, 4vw, 4rem)));
351
+ height: auto;
352
+ max-height: min(90vh, 960px);
353
+ border-radius: 0.75rem;
354
+ box-shadow: 0 25px 60px rgba(15, 23, 42, 0.45);
355
+ }
356
+ }
357
+
358
+ .canopy-gallery--popup-full {
359
+ .canopy-gallery__modal-scrim {
360
+ padding: 0;
361
+ }
362
+ }
363
+
364
+ .canopy-gallery-item__content {
365
+ width: 100%;
366
+ }
367
+
368
+ .canopy-gallery-item__content_flex {
369
+ display: flex;
370
+ flex-direction: row;
371
+ gap: 2rem;
372
+
373
+ aside {
374
+ min-width: 400px;
375
+ padding-right: 2rem;
376
+ }
377
+
378
+ dl {
379
+ display: flex;
380
+ flex-direction: column;
381
+ gap: 0.2rem;
382
+ }
383
+
384
+ dt {
385
+ text-transform: uppercase;
386
+ color: var(--color-gray-muted);
387
+ margin: 0;
388
+ font-size: 0.7222rem;
389
+ font-weight: 400;
390
+ margin-top: 0.85rem;
391
+ }
392
+
393
+ dd {
394
+ color: var(--color-gray-900);
395
+ margin: 0;
396
+ font-size: 1rem;
397
+ line-height: 1.45;
398
+ }
399
+ }
@@ -19,3 +19,4 @@
19
19
  @use "./work";
20
20
  @use "./timeline";
21
21
  @use "./map";
22
+ @use "./gallery";