foldbox 0.0.0-stage → 1.2.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/LICENSE +21 -0
- package/README.md +134 -2
- package/dist/foldbox.min.css +4 -0
- package/dist/foldbox.min.js +5 -0
- package/package.json +34 -5
- package/src/foldbox.css +571 -0
- package/src/foldbox.js +1627 -0
package/src/foldbox.css
ADDED
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Foldbox 1.2.0 – https://github.com/wpgenius/foldbox
|
|
3
|
+
* (c) WPGenius. Released under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
.foldbox {
|
|
6
|
+
--foldbox-bg: rgba(10, 10, 12, 0.96);
|
|
7
|
+
--foldbox-color: #fff;
|
|
8
|
+
--foldbox-muted: rgba(255, 255, 255, 0.7);
|
|
9
|
+
--foldbox-accent: #fff;
|
|
10
|
+
--foldbox-btn-bg: rgba(255, 255, 255, 0.08);
|
|
11
|
+
--foldbox-btn-hover: rgba(255, 255, 255, 0.18);
|
|
12
|
+
--foldbox-thumb-bg: rgba(255, 255, 255, 0.1);
|
|
13
|
+
--foldbox-spinner-track: rgba(255, 255, 255, 0.25);
|
|
14
|
+
--foldbox-top: 0px;
|
|
15
|
+
--foldbox-z: 100000;
|
|
16
|
+
--foldbox-thumb-size: 64px;
|
|
17
|
+
--foldbox-speed: 400ms;
|
|
18
|
+
--foldbox-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
19
|
+
|
|
20
|
+
position: fixed;
|
|
21
|
+
inset: var(--foldbox-top) 0 0;
|
|
22
|
+
z-index: var(--foldbox-z);
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
color: var(--foldbox-color);
|
|
26
|
+
font-family: inherit;
|
|
27
|
+
font-size: 15px;
|
|
28
|
+
line-height: 1.5;
|
|
29
|
+
opacity: 0;
|
|
30
|
+
outline: none;
|
|
31
|
+
transition: opacity var(--foldbox-speed) var(--foldbox-ease);
|
|
32
|
+
-webkit-tap-highlight-color: transparent;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Themes: `theme: 'light'`, or `theme: 'auto'` to follow the visitor's system setting. */
|
|
36
|
+
.foldbox--light {
|
|
37
|
+
--foldbox-bg: rgba(250, 250, 248, 0.97);
|
|
38
|
+
--foldbox-color: #111;
|
|
39
|
+
--foldbox-muted: rgba(0, 0, 0, 0.65);
|
|
40
|
+
--foldbox-accent: #111;
|
|
41
|
+
--foldbox-btn-bg: rgba(0, 0, 0, 0.06);
|
|
42
|
+
--foldbox-btn-hover: rgba(0, 0, 0, 0.12);
|
|
43
|
+
--foldbox-thumb-bg: rgba(0, 0, 0, 0.08);
|
|
44
|
+
--foldbox-spinner-track: rgba(0, 0, 0, 0.15);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media (prefers-color-scheme: light) {
|
|
48
|
+
|
|
49
|
+
.foldbox--auto {
|
|
50
|
+
--foldbox-bg: rgba(250, 250, 248, 0.97);
|
|
51
|
+
--foldbox-color: #111;
|
|
52
|
+
--foldbox-muted: rgba(0, 0, 0, 0.65);
|
|
53
|
+
--foldbox-accent: #111;
|
|
54
|
+
--foldbox-btn-bg: rgba(0, 0, 0, 0.06);
|
|
55
|
+
--foldbox-btn-hover: rgba(0, 0, 0, 0.12);
|
|
56
|
+
--foldbox-thumb-bg: rgba(0, 0, 0, 0.08);
|
|
57
|
+
--foldbox-spinner-track: rgba(0, 0, 0, 0.15);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.foldbox *,
|
|
62
|
+
.foldbox *::before,
|
|
63
|
+
.foldbox *::after {
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.foldbox.is-open {
|
|
68
|
+
opacity: 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.foldbox.is-closing {
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.foldbox__backdrop {
|
|
76
|
+
position: absolute;
|
|
77
|
+
inset: 0;
|
|
78
|
+
background: var(--foldbox-bg);
|
|
79
|
+
transition: opacity 0.2s;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Toolbar */
|
|
83
|
+
.foldbox__toolbar {
|
|
84
|
+
position: relative;
|
|
85
|
+
z-index: 3;
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
gap: 12px;
|
|
90
|
+
padding: 10px 12px;
|
|
91
|
+
transform: translateY(-12px);
|
|
92
|
+
transition: transform var(--foldbox-speed) var(--foldbox-ease);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.foldbox.is-open .foldbox__toolbar {
|
|
96
|
+
transform: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.foldbox__counter {
|
|
100
|
+
padding-left: 6px;
|
|
101
|
+
color: var(--foldbox-muted);
|
|
102
|
+
font-variant-numeric: tabular-nums;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.foldbox__actions {
|
|
106
|
+
display: flex;
|
|
107
|
+
gap: 6px;
|
|
108
|
+
margin-left: auto;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.foldbox__btn {
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
width: 40px;
|
|
116
|
+
height: 40px;
|
|
117
|
+
margin: 0;
|
|
118
|
+
padding: 0;
|
|
119
|
+
color: var(--foldbox-color);
|
|
120
|
+
background: var(--foldbox-btn-bg);
|
|
121
|
+
border: 0;
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
text-decoration: none;
|
|
125
|
+
transition: background-color 0.2s, transform 0.2s, opacity 0.2s;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.foldbox__btn:hover,
|
|
129
|
+
.foldbox__btn:focus-visible {
|
|
130
|
+
color: var(--foldbox-color);
|
|
131
|
+
background: var(--foldbox-btn-hover);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.foldbox__btn:focus-visible,
|
|
135
|
+
.foldbox__thumb:focus-visible,
|
|
136
|
+
.foldbox__play:focus-visible {
|
|
137
|
+
outline: 2px solid var(--foldbox-accent);
|
|
138
|
+
outline-offset: 2px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.foldbox__btn:active {
|
|
142
|
+
transform: scale(0.92);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.foldbox__btn[hidden] {
|
|
146
|
+
display: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.foldbox__btn svg {
|
|
150
|
+
width: 22px;
|
|
151
|
+
height: 22px;
|
|
152
|
+
fill: none;
|
|
153
|
+
stroke: currentcolor;
|
|
154
|
+
stroke-width: 1.8;
|
|
155
|
+
stroke-linecap: round;
|
|
156
|
+
stroke-linejoin: round;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.foldbox__btn--play svg,
|
|
160
|
+
.foldbox__btn--pause svg {
|
|
161
|
+
fill: currentcolor;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.foldbox__btn[aria-pressed="true"] svg {
|
|
165
|
+
fill: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Slideshow progress */
|
|
169
|
+
.foldbox__progress {
|
|
170
|
+
position: absolute;
|
|
171
|
+
top: 0;
|
|
172
|
+
left: 0;
|
|
173
|
+
right: 0;
|
|
174
|
+
z-index: 4;
|
|
175
|
+
height: 3px;
|
|
176
|
+
pointer-events: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.foldbox__progress span {
|
|
180
|
+
display: block;
|
|
181
|
+
height: 100%;
|
|
182
|
+
background: var(--foldbox-accent);
|
|
183
|
+
transform: scaleX(0);
|
|
184
|
+
transform-origin: left center;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Stage and slides */
|
|
188
|
+
.foldbox__stage {
|
|
189
|
+
position: relative;
|
|
190
|
+
z-index: 1;
|
|
191
|
+
flex: 1 1 auto;
|
|
192
|
+
min-height: 0;
|
|
193
|
+
overflow: hidden;
|
|
194
|
+
touch-action: none;
|
|
195
|
+
transition: transform 0.3s var(--foldbox-ease);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/*
|
|
199
|
+
* Slides and thumbnails always run left to right, so the -index * 100%
|
|
200
|
+
* translate in the JS shows the right slide on dir="rtl" pages too. Captions
|
|
201
|
+
* and the toolbar keep the page's direction.
|
|
202
|
+
*/
|
|
203
|
+
.foldbox__track,
|
|
204
|
+
.foldbox__thumbs {
|
|
205
|
+
direction: ltr;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.foldbox__track {
|
|
209
|
+
display: flex;
|
|
210
|
+
height: 100%;
|
|
211
|
+
transition: transform var(--foldbox-speed) var(--foldbox-ease);
|
|
212
|
+
will-change: transform;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.foldbox__slide {
|
|
216
|
+
position: relative;
|
|
217
|
+
display: flex;
|
|
218
|
+
flex: 0 0 100%;
|
|
219
|
+
align-items: center;
|
|
220
|
+
justify-content: center;
|
|
221
|
+
width: 100%;
|
|
222
|
+
height: 100%;
|
|
223
|
+
padding: 8px 64px;
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
user-select: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.foldbox--fade .foldbox__track {
|
|
229
|
+
position: relative;
|
|
230
|
+
transform: none !important;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.foldbox--fade .foldbox__slide {
|
|
234
|
+
position: absolute;
|
|
235
|
+
inset: 0;
|
|
236
|
+
opacity: 0;
|
|
237
|
+
visibility: hidden;
|
|
238
|
+
transition: opacity var(--foldbox-speed) var(--foldbox-ease), visibility 0s linear var(--foldbox-speed);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.foldbox--fade .foldbox__slide.is-active {
|
|
242
|
+
opacity: 1;
|
|
243
|
+
visibility: visible;
|
|
244
|
+
transition: opacity var(--foldbox-speed) var(--foldbox-ease), visibility 0s;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.foldbox__zoom {
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
justify-content: center;
|
|
251
|
+
max-width: 100%;
|
|
252
|
+
max-height: 100%;
|
|
253
|
+
transition: transform 0.3s var(--foldbox-ease);
|
|
254
|
+
will-change: transform;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.foldbox__img {
|
|
258
|
+
display: block;
|
|
259
|
+
max-width: 100%;
|
|
260
|
+
max-height: calc(100vh - var(--foldbox-top) - 200px);
|
|
261
|
+
width: auto;
|
|
262
|
+
height: auto;
|
|
263
|
+
margin: 0;
|
|
264
|
+
object-fit: contain;
|
|
265
|
+
cursor: zoom-in;
|
|
266
|
+
-webkit-user-drag: none;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.foldbox--single .foldbox__img,
|
|
270
|
+
.foldbox:not(:has(.foldbox__thumbs)) .foldbox__img {
|
|
271
|
+
max-height: calc(100vh - var(--foldbox-top) - 120px);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.foldbox.is-fullscreen .foldbox__img {
|
|
275
|
+
max-height: calc(100vh - 140px);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/*
|
|
279
|
+
* Size media to the slide instead of guessing from 100vh, which is too tall
|
|
280
|
+
* while a mobile address bar is showing or when the caption is long. The vh
|
|
281
|
+
* rules above stay as the fallback for browsers without container units.
|
|
282
|
+
*/
|
|
283
|
+
@supports (height: 1cqh) {
|
|
284
|
+
|
|
285
|
+
.foldbox__slide {
|
|
286
|
+
container-type: size;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.foldbox .foldbox__slide .foldbox__img {
|
|
290
|
+
max-height: 100cqh;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.foldbox .foldbox__slide .foldbox__video,
|
|
294
|
+
.foldbox .foldbox__slide .foldbox__embed,
|
|
295
|
+
.foldbox .foldbox__slide .foldbox__play {
|
|
296
|
+
width: min(100%, 100cqh * 16 / 9);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.foldbox.is-zoomed .foldbox__img {
|
|
301
|
+
cursor: grab;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.foldbox.is-zoomed .foldbox__img:active {
|
|
305
|
+
cursor: grabbing;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.foldbox__video,
|
|
309
|
+
.foldbox__embed {
|
|
310
|
+
width: min(100%, calc((100vh - var(--foldbox-top) - 200px) * 16 / 9));
|
|
311
|
+
max-height: 100%;
|
|
312
|
+
aspect-ratio: 16 / 9;
|
|
313
|
+
background: #000;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.foldbox__video {
|
|
317
|
+
display: block;
|
|
318
|
+
height: auto;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.foldbox__embed iframe {
|
|
322
|
+
display: block;
|
|
323
|
+
width: 100%;
|
|
324
|
+
height: 100%;
|
|
325
|
+
border: 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.foldbox__play {
|
|
329
|
+
position: relative;
|
|
330
|
+
display: block;
|
|
331
|
+
width: min(100%, calc((100vh - var(--foldbox-top) - 200px) * 16 / 9));
|
|
332
|
+
aspect-ratio: 16 / 9;
|
|
333
|
+
margin: 0;
|
|
334
|
+
padding: 0;
|
|
335
|
+
overflow: hidden;
|
|
336
|
+
background: #000;
|
|
337
|
+
border: 0;
|
|
338
|
+
cursor: pointer;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.foldbox__play img {
|
|
342
|
+
display: block;
|
|
343
|
+
width: 100%;
|
|
344
|
+
height: 100%;
|
|
345
|
+
object-fit: cover;
|
|
346
|
+
opacity: 0.85;
|
|
347
|
+
transition: opacity 0.2s, transform 0.4s var(--foldbox-ease);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.foldbox__play:hover img {
|
|
351
|
+
opacity: 1;
|
|
352
|
+
transform: scale(1.03);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.foldbox__play-icon {
|
|
356
|
+
position: absolute;
|
|
357
|
+
top: 50%;
|
|
358
|
+
left: 50%;
|
|
359
|
+
width: 72px;
|
|
360
|
+
height: 72px;
|
|
361
|
+
background: rgba(0, 0, 0, 0.6);
|
|
362
|
+
border: 2px solid rgba(255, 255, 255, 0.9);
|
|
363
|
+
border-radius: 50%;
|
|
364
|
+
transform: translate(-50%, -50%);
|
|
365
|
+
transition: transform 0.2s, background-color 0.2s;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.foldbox__play-icon::after {
|
|
369
|
+
content: "";
|
|
370
|
+
position: absolute;
|
|
371
|
+
top: 50%;
|
|
372
|
+
left: 54%;
|
|
373
|
+
border-style: solid;
|
|
374
|
+
border-width: 12px 0 12px 20px;
|
|
375
|
+
border-color: transparent transparent transparent #fff;
|
|
376
|
+
transform: translate(-50%, -50%);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.foldbox__play:hover .foldbox__play-icon {
|
|
380
|
+
background: rgba(0, 0, 0, 0.8);
|
|
381
|
+
transform: translate(-50%, -50%) scale(1.08);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* Loading and error */
|
|
385
|
+
.foldbox__slide.is-loading::before {
|
|
386
|
+
content: "";
|
|
387
|
+
position: absolute;
|
|
388
|
+
top: 50%;
|
|
389
|
+
left: 50%;
|
|
390
|
+
width: 36px;
|
|
391
|
+
height: 36px;
|
|
392
|
+
margin: -18px 0 0 -18px;
|
|
393
|
+
border: 3px solid var(--foldbox-spinner-track);
|
|
394
|
+
border-top-color: var(--foldbox-accent);
|
|
395
|
+
border-radius: 50%;
|
|
396
|
+
animation: foldbox-spin 0.8s linear infinite;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.foldbox__slide.has-error .foldbox__zoom {
|
|
400
|
+
color: var(--foldbox-muted);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@keyframes foldbox-spin {
|
|
404
|
+
|
|
405
|
+
to {
|
|
406
|
+
transform: rotate(360deg);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* Prev / next */
|
|
411
|
+
.foldbox__nav {
|
|
412
|
+
position: absolute;
|
|
413
|
+
top: 50%;
|
|
414
|
+
z-index: 3;
|
|
415
|
+
width: 48px;
|
|
416
|
+
height: 48px;
|
|
417
|
+
margin-top: -24px;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.foldbox__nav--prev {
|
|
421
|
+
left: 10px;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.foldbox__nav--next {
|
|
425
|
+
right: 10px;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.foldbox__nav:disabled {
|
|
429
|
+
opacity: 0.3;
|
|
430
|
+
cursor: default;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.foldbox.is-zoomed .foldbox__nav {
|
|
434
|
+
opacity: 0;
|
|
435
|
+
pointer-events: none;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Footer: caption and thumbnails */
|
|
439
|
+
.foldbox__footer {
|
|
440
|
+
position: relative;
|
|
441
|
+
z-index: 2;
|
|
442
|
+
transform: translateY(12px);
|
|
443
|
+
transition: transform var(--foldbox-speed) var(--foldbox-ease);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.foldbox.is-open .foldbox__footer {
|
|
447
|
+
transform: none;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.foldbox__caption {
|
|
451
|
+
max-width: 900px;
|
|
452
|
+
margin: 0 auto;
|
|
453
|
+
padding: 6px 16px 10px;
|
|
454
|
+
text-align: center;
|
|
455
|
+
color: var(--foldbox-muted);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.foldbox__caption h4 {
|
|
459
|
+
margin: 0 0 2px;
|
|
460
|
+
color: var(--foldbox-color);
|
|
461
|
+
font-size: 1.05em;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.foldbox__caption p {
|
|
465
|
+
margin: 0;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.foldbox__caption[hidden] {
|
|
469
|
+
display: none;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.foldbox__thumbs {
|
|
473
|
+
display: flex;
|
|
474
|
+
gap: 6px;
|
|
475
|
+
padding: 4px 12px 12px;
|
|
476
|
+
overflow-x: auto;
|
|
477
|
+
scrollbar-width: none;
|
|
478
|
+
justify-content: safe center;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.foldbox__thumbs::-webkit-scrollbar {
|
|
482
|
+
display: none;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.foldbox__thumb {
|
|
486
|
+
position: relative;
|
|
487
|
+
flex: 0 0 auto;
|
|
488
|
+
width: var(--foldbox-thumb-size);
|
|
489
|
+
height: var(--foldbox-thumb-size);
|
|
490
|
+
margin: 0;
|
|
491
|
+
padding: 0;
|
|
492
|
+
overflow: hidden;
|
|
493
|
+
background: var(--foldbox-thumb-bg);
|
|
494
|
+
border: 0;
|
|
495
|
+
border-radius: 6px;
|
|
496
|
+
cursor: pointer;
|
|
497
|
+
opacity: 0.5;
|
|
498
|
+
transition: opacity 0.2s, transform 0.2s;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.foldbox__thumb:hover {
|
|
502
|
+
opacity: 0.85;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.foldbox__thumb.is-active {
|
|
506
|
+
opacity: 1;
|
|
507
|
+
box-shadow: inset 0 0 0 2px var(--foldbox-accent);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.foldbox__thumb img {
|
|
511
|
+
display: block;
|
|
512
|
+
width: 100%;
|
|
513
|
+
height: 100%;
|
|
514
|
+
object-fit: cover;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.foldbox__thumb.is-active img {
|
|
518
|
+
padding: 2px;
|
|
519
|
+
border-radius: 6px;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.foldbox__thumb--video::after,
|
|
523
|
+
.foldbox__thumb--youtube::after,
|
|
524
|
+
.foldbox__thumb--vimeo::after {
|
|
525
|
+
content: "";
|
|
526
|
+
position: absolute;
|
|
527
|
+
top: 50%;
|
|
528
|
+
left: 50%;
|
|
529
|
+
border-style: solid;
|
|
530
|
+
border-width: 7px 0 7px 12px;
|
|
531
|
+
border-color: transparent transparent transparent #fff;
|
|
532
|
+
transform: translate(-40%, -50%);
|
|
533
|
+
filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.6));
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.foldbox--hide-thumbs-fs.is-fullscreen .foldbox__thumbs {
|
|
537
|
+
display: none;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/* Small screens */
|
|
541
|
+
@media (max-width: 640px) {
|
|
542
|
+
|
|
543
|
+
.foldbox__slide {
|
|
544
|
+
padding: 4px 0;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.foldbox__nav {
|
|
548
|
+
display: none;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.foldbox {
|
|
552
|
+
--foldbox-thumb-size: 52px;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
@media (prefers-reduced-motion: reduce) {
|
|
557
|
+
|
|
558
|
+
.foldbox,
|
|
559
|
+
.foldbox__toolbar,
|
|
560
|
+
.foldbox__footer,
|
|
561
|
+
.foldbox__track,
|
|
562
|
+
.foldbox__zoom,
|
|
563
|
+
.foldbox__slide {
|
|
564
|
+
transition: none !important;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/* Filterable grid: removed items while they fade out */
|
|
569
|
+
.foldbox-ghost {
|
|
570
|
+
pointer-events: none;
|
|
571
|
+
}
|