@canopy-iiif/app 0.8.6 → 0.9.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,411 @@
1
+ .canopy-interstitial {
2
+ position: relative;
3
+ width: 100%;
4
+ isolation: isolate;
5
+ margin-bottom: 2.618rem;
6
+
7
+ &--hero {
8
+ --hero-height: 520px;
9
+ --hero-bg-start: var(--color-brand-50);
10
+ --hero-bg-end: var(--color-brand-200);
11
+ --hero-caption-link: var(--color-brand-700);
12
+ --hero-dot-bg: var(--color-brand-300);
13
+ --hero-dot-active-bg: var(--color-brand-700);
14
+
15
+ background: linear-gradient(
16
+ 135deg,
17
+ var(--hero-bg-start) 0%,
18
+ var(--hero-bg-end) 100%
19
+ );
20
+ min-height: var(--hero-height);
21
+
22
+ .canopy-interstitial__overlay,
23
+ .canopy-interstitial__pane::before,
24
+ .canopy-interstitial__pane::after,
25
+ .canopy-interstitial__veil {
26
+ display: none;
27
+ }
28
+
29
+ .canopy-interstitial__layout {
30
+ display: flex;
31
+ flex-direction: column;
32
+ min-height: var(--hero-height);
33
+ width: 100%;
34
+ overflow: hidden;
35
+ }
36
+
37
+ .canopy-interstitial__panel {
38
+ flex: 1;
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
43
+ box-sizing: border-box;
44
+ min-width: 0;
45
+ background: transparent;
46
+ }
47
+
48
+ .canopy-interstitial__body {
49
+ align-items: flex-start;
50
+ text-align: left;
51
+ width: 100%;
52
+ max-width: none;
53
+ margin: 0;
54
+ gap: 1.5rem;
55
+ }
56
+
57
+ .canopy-interstitial__actions {
58
+ justify-content: flex-start;
59
+ }
60
+
61
+ .canopy-interstitial__media-group {
62
+ flex: 1;
63
+ position: relative;
64
+ min-height: var(--hero-height);
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ padding: clamp(1.5rem, 4vw, 3rem);
69
+ box-sizing: border-box;
70
+ min-width: 0;
71
+ overflow: hidden;
72
+ background: transparent;
73
+ }
74
+
75
+ .canopy-interstitial__caption {
76
+ position: static;
77
+ margin: 1.5rem auto 0;
78
+ padding: 0 0.5rem;
79
+ text-align: center;
80
+ }
81
+
82
+ .canopy-interstitial__panel,
83
+ .canopy-interstitial__media-group {
84
+ width: 50%;
85
+ }
86
+
87
+ .canopy-interstitial__pagination {
88
+ position: static;
89
+ transform: none;
90
+ justify-content: center;
91
+ margin-top: 1.618rem;
92
+ padding-bottom: 2px;
93
+ }
94
+
95
+ @media (max-width: 63.9375rem) {
96
+ .canopy-interstitial__panel,
97
+ .canopy-interstitial__media-group {
98
+ width: 100%;
99
+ }
100
+ }
101
+
102
+ @media (min-width: 48rem) {
103
+ .canopy-interstitial__layout {
104
+ flex-direction: row;
105
+ }
106
+ }
107
+
108
+ @media (min-width: 64rem) {
109
+ .canopy-interstitial__body .canopy-interstitial__headline {
110
+ font-size: 3rem;
111
+ }
112
+ }
113
+ }
114
+
115
+ &__slider {
116
+ position: relative;
117
+ width: 100%;
118
+ min-height: var(--hero-height);
119
+ overflow: hidden;
120
+ }
121
+
122
+ &__slider .swiper-wrapper {
123
+ display: flex;
124
+ transition-property: transform;
125
+ }
126
+
127
+ &__slider .swiper-slide {
128
+ width: 100%;
129
+ flex-shrink: 0;
130
+ display: flex;
131
+ justify-content: center;
132
+ align-items: stretch;
133
+ }
134
+
135
+ &__pane {
136
+ position: relative;
137
+ width: 100%;
138
+ min-height: var(--hero-height);
139
+ overflow: hidden;
140
+ background-color: color-mix(in srgb, var(--hero-bg-start) 65%, transparent);
141
+ }
142
+
143
+ &__pane::before,
144
+ &__pane::after {
145
+ content: "";
146
+ position: absolute;
147
+ inset: 0;
148
+ pointer-events: none;
149
+ z-index: 1;
150
+ display: none;
151
+ }
152
+
153
+ &__pane--flat::before,
154
+ &__pane--flat::after {
155
+ display: none;
156
+ }
157
+
158
+ &__pane--static {
159
+ display: flex;
160
+ flex-direction: column;
161
+ height: var(--hero-height);
162
+ background-color: transparent;
163
+ }
164
+
165
+ &__media {
166
+ position: absolute;
167
+ inset: 0;
168
+ width: 100%;
169
+ height: 100%;
170
+ object-fit: cover;
171
+ object-position: center;
172
+ z-index: 0;
173
+ }
174
+
175
+ &__media-frame {
176
+ position: relative;
177
+ width: 100%;
178
+ height: 100%;
179
+ flex: 1 1 auto;
180
+ overflow: hidden;
181
+ border-radius: clamp(1.5rem, 2vw, 2rem);
182
+ }
183
+
184
+ &__media--static {
185
+ position: static;
186
+ display: block;
187
+ width: 100%;
188
+ height: 100%;
189
+ object-fit: cover;
190
+ object-position: center;
191
+ }
192
+
193
+ &__veil {
194
+ position: absolute;
195
+ inset: 0;
196
+ pointer-events: none;
197
+ z-index: 2;
198
+ display: none;
199
+ }
200
+
201
+ &__overlay {
202
+ pointer-events: none;
203
+ position: absolute;
204
+ inset: 0;
205
+ z-index: 6;
206
+ display: flex;
207
+ align-items: center;
208
+ justify-content: center;
209
+ padding: 4rem 1.75rem;
210
+ background: linear-gradient(
211
+ 135deg,
212
+ color-mix(in srgb, var(--hero-bg-start) 85%, transparent) 0%,
213
+ color-mix(in srgb, var(--hero-bg-end) 70%, transparent) 100%
214
+ );
215
+ }
216
+
217
+ &__body {
218
+ position: relative;
219
+ z-index: 3;
220
+ max-width: 48rem;
221
+ margin: 0 auto;
222
+ padding: 0;
223
+ display: flex;
224
+ flex-direction: column;
225
+ align-items: center;
226
+ gap: 1.5rem;
227
+ text-align: center;
228
+ pointer-events: auto;
229
+ }
230
+
231
+ &__headline {
232
+ margin: 0;
233
+ font-size: 2rem;
234
+ font-weight: 600;
235
+ line-height: 1.08;
236
+ letter-spacing: -0.01em;
237
+ }
238
+
239
+ &__description {
240
+ margin: 0;
241
+ max-width: 42rem;
242
+ font-size: 1rem;
243
+ line-height: 1.7;
244
+ color: color-mix(in srgb, currentColor 82%, transparent);
245
+ }
246
+
247
+ &__actions {
248
+ display: flex;
249
+ flex-wrap: wrap;
250
+ justify-content: center;
251
+ gap: 0.75rem;
252
+ }
253
+
254
+ &__caption {
255
+ position: absolute;
256
+ bottom: 1.75rem;
257
+ right: 2rem;
258
+ z-index: 3;
259
+ font-size: 0.8333rem;
260
+ letter-spacing: 0.12em;
261
+ text-transform: uppercase;
262
+ color: var(--hero-caption-color);
263
+ }
264
+
265
+ &__caption--static {
266
+ position: static;
267
+ margin: 1.5rem auto 0;
268
+ text-align: center;
269
+ color: var(--hero-caption-color);
270
+ }
271
+
272
+ &__caption-link {
273
+ color: var(--hero-caption-link);
274
+ text-decoration: underline;
275
+ text-underline-offset: 0.35em;
276
+ text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
277
+ transition:
278
+ color 0.2s ease,
279
+ text-decoration-color 0.2s ease;
280
+
281
+ &:hover,
282
+ &:focus-visible {
283
+ color: var(--hero-caption-link);
284
+ text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
285
+ }
286
+ }
287
+
288
+ &__nav {
289
+ position: absolute;
290
+ inset: 0;
291
+ z-index: 4;
292
+ }
293
+
294
+ &__nav-btn {
295
+ position: absolute;
296
+ top: 50%;
297
+ transform: translateY(-50%);
298
+ width: 2.75rem;
299
+ height: 2.75rem;
300
+ border-radius: 9999px;
301
+ border: 1px solid
302
+ color-mix(in srgb, var(--color-gray-400, #94a3b8) 55%, transparent);
303
+ background-color: color-mix(
304
+ in srgb,
305
+ var(--color-gray-100, #f1f5f9) 65%,
306
+ transparent
307
+ );
308
+ backdrop-filter: blur(6px);
309
+ cursor: pointer;
310
+ display: inline-flex;
311
+ align-items: center;
312
+ justify-content: center;
313
+ transition:
314
+ background-color 0.2s ease,
315
+ border-color 0.2s ease,
316
+ color 0.2s ease;
317
+ color: var(--colors-primary);
318
+
319
+ &::after {
320
+ content: "";
321
+ border: solid currentColor;
322
+ border-width: 0 2px 2px 0;
323
+ display: inline-block;
324
+ padding: 7px;
325
+ transform: rotate(135deg);
326
+ }
327
+
328
+ &--prev {
329
+ left: 1.5rem;
330
+ }
331
+
332
+ &--next {
333
+ right: 1.5rem;
334
+
335
+ &::after {
336
+ transform: rotate(-45deg);
337
+ }
338
+ }
339
+
340
+ &:hover,
341
+ &:focus-visible {
342
+ background-color: color-mix(
343
+ in srgb,
344
+ var(--color-brand-200) 55%,
345
+ transparent
346
+ );
347
+ border-color: color-mix(
348
+ in srgb,
349
+ var(--color-brand-400, #818cf8) 70%,
350
+ transparent
351
+ );
352
+ color: var(--color-brand-700, #4338ca);
353
+ }
354
+ }
355
+
356
+ &__pagination {
357
+ position: absolute;
358
+ z-index: 4;
359
+ bottom: 1rem;
360
+ left: 50%;
361
+ transform: translateX(-50%);
362
+ display: flex;
363
+ gap: 0.4rem;
364
+ }
365
+
366
+ &__pagination .swiper-pagination-bullet {
367
+ display: inline-block;
368
+ width: 0.45rem;
369
+ height: 0.45rem;
370
+ border-radius: 9999px;
371
+ background-color: var(--hero-dot-bg);
372
+ opacity: 1;
373
+ transition:
374
+ transform 0.2s ease,
375
+ background-color 0.2s ease;
376
+ }
377
+
378
+ &__pagination .swiper-pagination-bullet-active {
379
+ transform: scale(1.35);
380
+ background-color: var(--hero-dot-active-bg);
381
+ }
382
+ }
383
+
384
+ .canopy-interstitial--hero.canopy-interstitial--bg-transparent {
385
+ background: none;
386
+ }
387
+
388
+ .canopy-interstitial--hero.canopy-interstitial--bg-transparent
389
+ .canopy-interstitial__overlay {
390
+ background: none;
391
+ }
392
+
393
+ @media (min-width: 40rem) {
394
+ .canopy-interstitial__body {
395
+ padding-inline: 2.75rem;
396
+ }
397
+
398
+ .canopy-interstitial__headline {
399
+ font-size: 3rem;
400
+ }
401
+
402
+ .canopy-interstitial__description {
403
+ font-size: 1.0625rem;
404
+ }
405
+ }
406
+
407
+ @media (min-width: 64rem) {
408
+ .canopy-interstitial__body {
409
+ padding-inline: 4rem;
410
+ }
411
+ }
@@ -1,5 +1,6 @@
1
+ @use "./buttons";
1
2
  @use "./card";
2
3
  @use "./header";
3
- @use "./hero";
4
+ @use "./interstitial-hero";
4
5
  @use "./search";
5
6
  @use "./sub-navigation";