j1-template 2024.3.16 → 2024.3.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/amplitude.html +132 -61
  3. data/assets/data/banner.html +1 -1
  4. data/assets/data/cookieconsent.html +1 -1
  5. data/assets/data/docsearch.html +1 -1
  6. data/assets/data/fab.html +1 -1
  7. data/assets/data/footer.html +1 -1
  8. data/assets/data/galeries.html +1 -1
  9. data/assets/data/gallery_customizer.html +1 -1
  10. data/assets/data/gemini-ui.html +1 -1
  11. data/assets/data/iframes.html +1 -1
  12. data/assets/data/masonry.html +1 -1
  13. data/assets/data/masterslider.html +1 -1
  14. data/assets/data/menu.html +1 -1
  15. data/assets/data/mmenu.html +1 -1
  16. data/assets/data/mmenu_sidebar.html +1 -1
  17. data/assets/data/mmenu_toc.html +1 -1
  18. data/assets/data/panel.html +1 -1
  19. data/assets/data/quicklinks.html +1 -1
  20. data/assets/data/rtext_resizer.html +1 -1
  21. data/assets/data/slick.html +1 -1
  22. data/assets/data/speak2me.html +1 -1
  23. data/assets/data/swiper.html +313 -0
  24. data/assets/theme/j1/adapter/js/amplitude.30.js +1177 -0
  25. data/assets/theme/j1/adapter/js/amplitude.js +152 -121
  26. data/assets/theme/j1/adapter/js/j1.js +3 -3
  27. data/assets/theme/j1/adapter/js/masterslider.js +2 -1
  28. data/assets/theme/j1/adapter/js/swiper.js +231 -0
  29. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +13 -3
  30. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
  31. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +53 -6
  32. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +2 -1
  33. data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.15.js +1594 -0
  34. data/assets/theme/j1/modules/amplitudejs/js/tech/ytp.js +1617 -89
  35. data/assets/theme/j1/modules/amplitudejs/js/visualizations/bar.js +1 -1
  36. data/assets/theme/j1/modules/amplitudejs/js/visualizations/circular-equalizer.js +31 -1
  37. data/assets/theme/j1/modules/amplitudejs/js/visualizations/frequency-analyzer.js +1 -1
  38. data/assets/theme/j1/modules/amplitudejs/js/visualizations/michael-bromley.js +1 -1
  39. data/assets/theme/j1/modules/amplitudejs/js/visualizations/template.js +1 -1
  40. data/assets/theme/j1/modules/photoswipe/.version_5.4.4 +6 -0
  41. data/assets/theme/j1/modules/photoswipe/LICENSE +21 -0
  42. data/assets/theme/j1/modules/photoswipe/README.md +32 -0
  43. data/assets/theme/j1/modules/photoswipe/css/org/photoswipe-dynamic-caption-plugin.umd.min.js +5 -0
  44. data/assets/theme/j1/modules/photoswipe/css/org/photoswipe.css +420 -0
  45. data/assets/theme/j1/modules/photoswipe/css/photoswipe-caption-plugin.css +67 -0
  46. data/assets/theme/j1/modules/photoswipe/css/photoswipe-caption-plugin.min.css +16 -0
  47. data/assets/theme/j1/modules/photoswipe/css/photoswipe.css +376 -0
  48. data/assets/theme/j1/modules/photoswipe/css/photoswipe.min.css +17 -0
  49. data/assets/theme/j1/modules/photoswipe/css/scss/photoswipe.scss +427 -0
  50. data/assets/theme/j1/modules/photoswipe/example/photoswipe-caption-plugin.html +237 -0
  51. data/assets/theme/j1/modules/photoswipe/example/test-gallery.html +36 -0
  52. data/assets/theme/j1/modules/photoswipe/js/README.md +43 -0
  53. data/assets/theme/j1/modules/photoswipe/js/photoswipe-caption-plugin.min.js +5 -0
  54. data/assets/theme/j1/modules/photoswipe/js/photoswipe-core.min.js +18 -0
  55. data/assets/theme/j1/modules/photoswipe/js/photoswipe-lightbox.min.js +18 -0
  56. data/assets/theme/j1/modules/swiper/.version_1.2.0 +15 -0
  57. data/assets/theme/j1/modules/swiper/LICENSE +20 -0
  58. data/assets/theme/j1/modules/swiper/README.md +95 -0
  59. data/assets/theme/j1/modules/swiper/css/swiper-bundle.css +740 -0
  60. data/assets/theme/j1/modules/swiper/css/swiper-bundle.min..css +17 -0
  61. data/assets/theme/j1/modules/swiper/css/theme/uno.css +249 -0
  62. data/assets/theme/j1/modules/swiper/css/theme/uno.min.css +154 -0
  63. data/assets/theme/j1/modules/swiper/js/swiper-bundle.js +9785 -0
  64. data/assets/theme/j1/modules/swiper/js/swiper-bundle.min.js +17 -0
  65. data/assets/theme/j1/modules/swiper/swiperjs.com-demos.url +2 -0
  66. data/lib/j1/version.rb +1 -1
  67. data/lib/starter_web/README.md +5 -5
  68. data/lib/starter_web/_config.yml +1 -1
  69. data/lib/starter_web/_data/modules/amplitude.yml +374 -39
  70. data/lib/starter_web/_data/modules/defaults/amplitude.yml +60 -35
  71. data/lib/starter_web/_data/modules/defaults/slick.yml +1 -1
  72. data/lib/starter_web/_data/modules/defaults/swiper.yml +515 -0
  73. data/lib/starter_web/_data/modules/swiper.yml +227 -0
  74. data/lib/starter_web/_data/resources.yml +53 -1
  75. data/lib/starter_web/_data/templates/feed.xml +1 -1
  76. data/lib/starter_web/_plugins/asciidoctor/amplitude-block.rb +1 -0
  77. data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +0 -4
  78. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  79. data/lib/starter_web/assets/video/poster/youtube/faelle_des_bnd/der_unverzichtbare_feind.jpg +0 -0
  80. data/lib/starter_web/assets/video/poster/youtube/faelle_des_bnd/ein_diener_vieler_herren.jpg +0 -0
  81. data/lib/starter_web/assets/video/poster/youtube/the_piano/the-piano.jpg +0 -0
  82. data/lib/starter_web/package.json +1 -1
  83. data/lib/starter_web/pages/public/_includes/attributes.asciidoc +45 -0
  84. data/lib/starter_web/pages/public/_includes/documents/photoswipe/200_photoswipe_parameters.asciidoc +510 -0
  85. data/lib/starter_web/pages/public/_includes/documents/photoswipe/210_photoswipe_lightbox_parameters.asciidoc +98 -0
  86. data/lib/starter_web/pages/public/_includes/documents/photoswipe/300_caption_plugin_for_photoSwipe.asciidoc +327 -0
  87. data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_features.asciidoc +50 -0
  88. data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_html_layout.asciidoc +122 -0
  89. data/lib/starter_web/pages/public/_includes/documents/swiper/100_swiper_initialization.asciidoc +53 -0
  90. data/lib/starter_web/pages/public/_includes/documents/swiper/110_swiper_common_options.asciidoc +43 -0
  91. data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_a_k.asciidoc +994 -0
  92. data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_l_o.asciidoc +473 -0
  93. data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_p_s.asciidoc +700 -0
  94. data/lib/starter_web/pages/public/_includes/documents/swiper/200_swiper_parameters_t_z.asciidoc +413 -0
  95. data/lib/starter_web/pages/public/_includes/documents/swiper/300_swiper_instance_properties.asciidoc +873 -0
  96. data/lib/starter_web/pages/public/_includes/documents/swiper/400_swiper_modules.asciidoc +2514 -0
  97. data/lib/starter_web/pages/public/_includes/documents/swiper/500_swiper_methods.asciidoc +989 -0
  98. data/lib/starter_web/pages/public/_includes/documents/swiper/600_swiper_events.asciidoc +1534 -0
  99. data/lib/starter_web/pages/public/amplitude_yt_tester.adoc +77 -63
  100. data/lib/starter_web/pages/public/photoswipe_api.adoc +150 -0
  101. data/lib/starter_web/pages/public/swiper_api.adoc +128 -0
  102. data/lib/starter_web/pages/public/swiper_tester.adoc +973 -0
  103. data/lib/starter_web/pages/public/tour/modal_extentions.adoc +12 -5
  104. data/lib/starter_web/pages/public/tour/play_audio.adoc +60 -5
  105. data/lib/starter_web/pages/public/tour/play_video.adoc +30 -0
  106. data/lib/starter_web/pages/public/tour/present_images.adoc +5 -5
  107. metadata +56 -3
  108. data/assets/theme/j1/modules/amplitudejs/js/tech/youtube_example.js +0 -211
@@ -0,0 +1,510 @@
1
+ [role="mt-5"]
2
+ == PhotoSwipe Options
3
+
4
+ List of available PhotoSwipe options (parameters) alphabetically ordered.
5
+ Find option settings also with the
6
+ https://photoswipe.com/getting-started/[PhotoSwipe Documentation, {browser-window--new}].
7
+
8
+ [role="mt-4"]
9
+ === allowPanToNext
10
+
11
+ Boolean, `+true+`. Allow swipe navigation to the next slide when the
12
+ current slide is zoomed. Does not apply to mouse events.
13
+
14
+ [source, js]
15
+ ----
16
+ const lightbox = new PhotoSwipeLightbox({
17
+ gallery: '#gallery_id',
18
+ pswpModule: PhotoSwipe,
19
+ children: 'a',
20
+ allowPanToNext: false
21
+ });
22
+ lightbox.init();
23
+ ----
24
+
25
+ [role="mt-4"]
26
+ === arrowKeys
27
+
28
+ Boolean, `+true+`. Left/right arrow keys for navigation.
29
+
30
+ [source, js]
31
+ ----
32
+ const lightbox = new PhotoSwipeLightbox({
33
+ gallery: '#gallery_id',
34
+ pswpModule: PhotoSwipe,
35
+ children: 'a',
36
+ arrowKeys: false
37
+ });
38
+
39
+ lightbox.init();
40
+ ----
41
+
42
+ [role="mt-4"]
43
+ === bgOpacity
44
+
45
+ Sets the background *backdrop* opacity. Should be *always* defined by
46
+ *bgOpacity* option and *not* by CSS RGBA color.
47
+
48
+ [cols="3,2,2,5a", subs=+macros, options="header", width="100%", role="rtable mt-4"]
49
+ |===
50
+ |Name |Type |Default |Description \| Example
51
+
52
+ |`bgOpacity`
53
+ |number
54
+ |0.8
55
+ |Sets the background *backdrop* opacity. Should be *always* defined by
56
+ *bgOpacity* option and *not* by CSS RGBA color.
57
+
58
+ [source, js]
59
+ ----
60
+ const lightbox = new PhotoSwipeLightbox({
61
+ // ... other options
62
+ bgOpacity: 0.2,
63
+ });
64
+
65
+ lightbox.init();
66
+ ----
67
+ |===
68
+
69
+ [role="mt-4"]
70
+ === clickAction
71
+
72
+ imageClickAction, bgClickAction
73
+
74
+ Refer to link:https://photoswipe.com/click-and-tap-actions/[click and tap actions]
75
+ page.
76
+
77
+ [role="mt-4"]
78
+ === clickToCloseNonZoomable
79
+
80
+ Boolean, `+true+`. If image is not zoomable (for example, smaller than
81
+ viewport) it can be closed by clicking on it.
82
+
83
+ [source, js]
84
+ ----
85
+ const lightbox = new PhotoSwipeLightbox({
86
+ gallery: '#gallery_id',
87
+ pswpModule: PhotoSwipe,
88
+ children: 'a',
89
+ clickToCloseNonZoomable: false
90
+ });
91
+
92
+ lightbox.init();
93
+ ----
94
+
95
+ [role="mt-4"]
96
+ === closeOnVerticalDrag
97
+
98
+ Boolean, `+true+`. Vertical drag gesture to close the PhotoSwipe.
99
+
100
+ [source, js]
101
+ ----
102
+ const lightbox = new PhotoSwipeLightbox({
103
+ gallery: '#gallery_id',
104
+ pswpModule: PhotoSwipe,
105
+ children: 'a',
106
+ pswpModule: PhotoSwipe,
107
+ closeOnVerticalDrag: false
108
+ });
109
+
110
+ lightbox.init();
111
+ ----
112
+
113
+ [role="mt-4"]
114
+ === easing
115
+
116
+ String, `+'cubic-bezier(.4,0,.22,1)'+`. CSS easing function for
117
+ open/close/zoom transitions.
118
+ link:/opening-or-closing-transition#transition-duration-and-easing[Example
119
+ here].
120
+
121
+ [role="mt-4"]
122
+ === escKey
123
+
124
+ Boolean, `+true+`. Esc key to close.
125
+
126
+ [role="mt-4"]
127
+ === errorMsg
128
+
129
+ String, `+'The image cannot be loaded'+`.
130
+
131
+ Message to display when the image wasn't able to load. If you need to
132
+ display HTML - use link:/filters#contenterrorelement[contentErrorElement
133
+ filter].
134
+
135
+ [source, js]
136
+ ----
137
+ const lightbox = new PhotoSwipeLightbox({
138
+ gallery: '#gallery_id',
139
+ pswpModule: PhotoSwipe,
140
+ children: 'a',
141
+ errorMsg: 'The photo cannot be loaded'
142
+ });
143
+ lightbox.init();
144
+ ----
145
+
146
+ [role="mt-4"]
147
+ === getViewportSizeFn
148
+
149
+ Function `+{x: width, y: height}+`, `+undefined+`. A function that
150
+ should return slide viewport width and height, in format
151
+ `+{x: 100, y: 100}+`.
152
+
153
+ [source, js]
154
+ ----
155
+ const lightbox = new PhotoSwipeLightbox({
156
+ gallery: '#gallery_id',
157
+ pswpModule: PhotoSwipe,
158
+ children: 'a',
159
+ getViewportSizeFn: function(options, pswp) {
160
+ return {
161
+ x: document.documentElement.clientWidth - 200,
162
+ y: window.innerHeight
163
+ };
164
+ }
165
+ });
166
+
167
+ lightbox.init();
168
+ ----
169
+
170
+ [role="mt-4"]
171
+ === hideAnimationDuration
172
+
173
+ Number, `+333+`.
174
+
175
+ Transition duration in milliseconds, can be `+0+`.
176
+
177
+ link:/https://photoswipe.com/opening-or-closing-transition/#transition-duration-and-easing[Example here].
178
+
179
+ Use options showAnimationDuration and hideAnimationDuration
180
+ (Integer, default 333).
181
+
182
+ Option easing (String, default cubic-bezier(.4,0,.22,1)) accepts any
183
+ CSS timing-function. It is applied to any zoom transition (including double-tap).
184
+
185
+ Both options can be modified dynamically while PhotoSwipe is opened.
186
+
187
+ In the example below transition duration is set to 1000ms (1s). Easing is
188
+ defined dynamically (opening transition gets ease-out-back, zoom transitions
189
+ gets ease-in-out-back, and closing transition gets ease-in-back):
190
+
191
+ [source, js]
192
+ ----
193
+ const backEasing = {
194
+ in: 'cubic-bezier(0.6, -0.28, 0.7, 1)',
195
+ out: 'cubic-bezier(0.3, 0, 0.32, 1.275)',
196
+ inOut: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)'
197
+ };
198
+
199
+ const lightbox = new PhotoSwipeLightbox({
200
+ gallery:'#gallery_id',
201
+ pswpModule: PhotoSwipe,
202
+ children:'a',
203
+ showHideAnimationType: 'zoom',
204
+ showAnimationDuration: 1000,
205
+ hideAnimationDuration: 1000
206
+ });
207
+
208
+ lightbox.on('firstUpdate', () => {
209
+ lightbox.pswp.options.easing = backEasing.out;
210
+ });
211
+
212
+ lightbox.on('initialZoomInEnd', () => {
213
+ lightbox.pswp.options.easing = backEasing.inOut;
214
+ });
215
+
216
+ lightbox.on('close', () => {
217
+ lightbox.pswp.options.easing = backEasing.in;
218
+ });
219
+
220
+ lightbox.init();
221
+ ----
222
+
223
+ [role="mt-4"]
224
+ === indexIndicatorSep
225
+
226
+ String, `+/+`. Used for slide count indicator ("1 of 10 ").
227
+
228
+ [source, js]
229
+ ----
230
+ const lightbox = new PhotoSwipeLightbox({
231
+ gallery: '#gallery_id',
232
+ pswpModule: PhotoSwipe,
233
+ children: 'a',
234
+ indexIndicatorSep: ' of '
235
+ });
236
+
237
+ lightbox.init();
238
+ ----
239
+
240
+ [role="mt-4"]
241
+ === loop
242
+
243
+ Boolean, `+true+`. If set to true you'll be able to swipe from the last
244
+ to the first image. Option is always `+false+` when there are less than
245
+ 3 slides.
246
+
247
+ [source, js]
248
+ ----
249
+ const lightbox = new PhotoSwipeLightbox({
250
+ gallery: '#gallery_id',
251
+ pswpModule: PhotoSwipe,
252
+ children: 'a',
253
+ loop: false
254
+ });
255
+
256
+ lightbox.init();
257
+ ----
258
+
259
+ [role="mt-4"]
260
+ === mainClass
261
+
262
+ String, `+undefined+`. Class that will be added to the root element of
263
+ PhotoSwipe, may contain multiple separated by space. Example on
264
+ link:/styling#modifying-icons[Styling] page.
265
+
266
+ [role="mt-4"]
267
+ ==== appendToEl
268
+
269
+ DOMElement, `+document.body+`. Element to which PhotoSwipe dialog will
270
+ be appended when it opens.
271
+
272
+ [source, js]
273
+ ----
274
+ const lightbox = new PhotoSwipeLightbox({
275
+ gallery: '#gallery_id',
276
+ pswpModule: PhotoSwipe,
277
+ children: 'a',
278
+ appendToEl: document.querySelector('#__docusaurus')
279
+ });
280
+
281
+ lightbox.init();
282
+ ----
283
+
284
+ [role="mt-4"]
285
+ === maxWidthToAnimate
286
+
287
+ Integer, `+4000+`. Maximum width of image to animate, if initial
288
+ rendered image width is larger than this value - the opening/closing
289
+ transition will be automatically disabled.
290
+
291
+ [source, js]
292
+ ----
293
+ const lightbox = new PhotoSwipeLightbox({
294
+ gallery: '#gallery_id',
295
+ pswpModule: PhotoSwipe,
296
+ children: 'a',
297
+ maxWidthToAnimate: 800,
298
+ });
299
+
300
+ lightbox.init();
301
+ ----
302
+
303
+ [role="mt-4"]
304
+ === padding
305
+
306
+ Object, `+{ top: 0, bottom: 0, left: 0, right: 0 }+`. Slide area padding
307
+ (in pixels).
308
+
309
+ [source, js]
310
+ ----
311
+ const lightbox = new PhotoSwipeLightbox({
312
+ gallery: '#gallery_id',
313
+ pswpModule: PhotoSwipe,
314
+ children: 'a',
315
+ padding: { top: 20, bottom: 40, left: 100, right: 100 }
316
+ });
317
+
318
+ lightbox.init();
319
+ ----
320
+
321
+ [role="mt-4"]
322
+ === paddingFn
323
+
324
+ Function, should return padding object. The option is checked
325
+ frequently, so make sure it's performant. Overrides `+padding+` option
326
+ if defined. For example:
327
+
328
+ [source, js]
329
+ ----
330
+ const lightbox = new PhotoSwipeLightbox({
331
+ gallery: '#gallery_id',
332
+ pswpModule: PhotoSwipe,
333
+ children: 'a',
334
+ paddingFn: (viewportSize, itemData, index) => {
335
+ return {
336
+ // check based on slide index
337
+ top: index === 0 ? 100 : 0,
338
+
339
+ // check based on viewport size
340
+ bottom: viewportSize.x < 600 ? 0 : 200,
341
+
342
+ // check based on image size
343
+ left: itemData.w < 2000 ? 50 : 0,
344
+
345
+ right: 0
346
+ };
347
+ }
348
+ });
349
+
350
+ lightbox.init();
351
+ ----
352
+
353
+ [role="mt-4"]
354
+ === pinchToClose
355
+
356
+ Boolean, `+true+`. Pinch touch gesture to close the gallery.
357
+
358
+ [source, js]
359
+ ----
360
+ const lightbox = new PhotoSwipeLightbox({
361
+ gallery: '#gallery_id',
362
+ pswpModule: PhotoSwipe,
363
+ children: 'a',
364
+ pinchToClose: false
365
+ });
366
+
367
+ lightbox.init();
368
+ ----
369
+
370
+ [role="mt-4"]
371
+ === preload
372
+
373
+ Array, `+[1, 2]+`. Lazy loading of nearby slides based on direction of
374
+ movement. Should be an array with two integers, first one - number of
375
+ items to preload before the current image, second one - after the
376
+ current image. Two nearby images are always loaded.
377
+
378
+ [source, js]
379
+ ----
380
+ const lightbox = new PhotoSwipeLightbox({
381
+ gallery: '#gallery_id',
382
+ pswpModule: PhotoSwipe,
383
+ children: 'a',
384
+ preload: [1, 4]
385
+ });
386
+
387
+ lightbox.init();
388
+ ----
389
+
390
+ [role="mt-4"]
391
+ === preloaderDelay
392
+
393
+ Number (ms), `+2000+`. Delay before the loading indicator will be
394
+ displayed, if image is loaded during it - the indicator will not be
395
+ displayed at all. Can be zero.
396
+
397
+ [source, js]
398
+ ----
399
+ const lightbox = new PhotoSwipeLightbox({
400
+ gallery: '#gallery_id',
401
+ pswpModule: PhotoSwipe,
402
+ children: 'a',
403
+ preloaderDelay: 0
404
+ });
405
+
406
+ lightbox.init();
407
+ ----
408
+
409
+ [role="mt-4"]
410
+ === returnFocus
411
+
412
+ Boolean, `+true+`. Restore focus the last active element after
413
+ PhotoSwipe is closed.
414
+
415
+ [source, js]
416
+ ----
417
+ const lightbox = new PhotoSwipeLightbox({
418
+ gallery: '#gallery_id',
419
+ pswpModule: PhotoSwipe,
420
+ children: 'a',
421
+ returnFocus: false
422
+ });
423
+
424
+ lightbox.init();
425
+ ----
426
+
427
+ [role="mt-4"]
428
+ === showAnimationDuration
429
+
430
+ Number, `+333+`. Transition duration in milliseconds, can be `+0+`.
431
+ link:/opening-or-closing-transition#transition-duration-and-easing[Example
432
+ here].
433
+
434
+ [source, js]
435
+ ----
436
+ const lightbox = new PhotoSwipeLightbox({
437
+ gallery: '#gallery_id',
438
+ pswpModule: PhotoSwipe,
439
+ children: 'a',
440
+ escKey: false
441
+ });
442
+
443
+ lightbox.init();
444
+ ----
445
+
446
+ [role="mt-4"]
447
+ === spacing
448
+
449
+ Number, `+0.1+`. Spacing between slides. Defined as ratio relative to
450
+ the viewport width (0.1 = 10% of viewport).
451
+
452
+ [source, js]
453
+ ----
454
+ const lightbox = new PhotoSwipeLightbox({
455
+ gallery: '#gallery_id',
456
+ pswpModule: PhotoSwipe,
457
+ children: 'a',
458
+ spacing: 0.5, // 50% of viewport width
459
+ });
460
+
461
+ lightbox.init();
462
+ ----
463
+
464
+ [role="mt-4"]
465
+ === trapFocus
466
+
467
+ Boolean, `+true+`. Trap focus within PhotoSwipe element while it's open.
468
+
469
+
470
+ [role="mt-4"]
471
+ === tapAction
472
+
473
+ tapAction, doubleTapAction
474
+
475
+ Refer to link:https://photoswipe.com/click-and-tap-actions/[click and tap actions]
476
+ page.
477
+
478
+ [role="mt-4"]
479
+ === wheelToZoom
480
+
481
+ Boolean, `+undefined+`. By default PhotoSwipe zooms image with
482
+ ctrl-wheel, if you enable this option - image will zoom just via wheel.
483
+
484
+ [source, js]
485
+ ----
486
+ const lightbox = new PhotoSwipeLightbox({
487
+ gallery: '#gallery_id',
488
+ pswpModule: PhotoSwipe,
489
+ children: 'a',
490
+ wheelToZoom: true
491
+ });
492
+
493
+ lightbox.init();
494
+ ----
495
+
496
+ [role="mt-4"]
497
+ === zoomAnimationDuration
498
+
499
+ Number, `+333+`. Transition duration in milliseconds, can be `+0+`.
500
+ link:/opening-or-closing-transition#transition-duration-and-easing[Example
501
+ here].
502
+
503
+ [role="mt-4"]
504
+ === zoomLevel
505
+
506
+ initialZoomLevel, secondaryZoomLevel, maxZoomLevel
507
+
508
+ Refer to link:https://photoswipe.com/adjusting-zoom-level/[Adjusting zoom level]
509
+ page for more info. The default values are described
510
+ link:https://photoswipe.com/adjusting-zoom-level/#default-behaviour[there too].
@@ -0,0 +1,98 @@
1
+ [role="mt-5"]
2
+ == Lightbox Options
3
+
4
+ See link:/getting-started[getting started] and link:/data-sources[data
5
+ sources] for examples.
6
+
7
+ [role="mt-5"]
8
+ === gallery
9
+
10
+ Element, NodeList, or CSS selector (string) for the gallery element.
11
+
12
+ [role="mt-5"]
13
+ ==== children
14
+
15
+ Element, NodeList, or CSS selector (string) for elements within
16
+ `+gallery+`. For example, link elements. If not defined or set to false
17
+ - root `+gallery+` node will be used.
18
+
19
+ [role="mt-5"]
20
+ === pswpModule
21
+
22
+ Function or Module, `+undefined+`.
23
+
24
+ A function that should return import() promise (if you need dynamic import),
25
+ for example:
26
+
27
+ [source, js]
28
+ ----
29
+ pswpModule: () => import('photoswipe/dist/photoswipe.esm.js');
30
+ ----
31
+
32
+ Or the PhotoSwipe *Core* module itself, for example:
33
+
34
+ [source, js]
35
+ ----
36
+ const lightbox = new PhotoSwipeLightbox({
37
+ pswpModule: PhotoSwipe
38
+ // ...
39
+ });
40
+ ----
41
+
42
+ [role="mt-5"]
43
+ === preloadFirstSlide
44
+
45
+ Boolean, `+true+`. Loads the first slide image in parallel with
46
+ PhotoSwipe Core (while PhotoSwipe is opening).
47
+
48
+ [source, js]
49
+ ----
50
+ import PhotoSwipeLightbox from '/photoswipe/photoswipe-lightbox.esm.js';
51
+ const lightbox = new PhotoSwipeLightbox({
52
+ gallery: '#gallery--test-appendToEl',
53
+ children: 'a',
54
+ pswpModule: () => import('/photoswipe/photoswipe.esm.js'),
55
+ preloadFirstSlide: false
56
+ });
57
+ lightbox.init();
58
+ ----
59
+
60
+ [role="mt-5"]
61
+ === Translating
62
+
63
+ A list of options that might need a translation:
64
+
65
+ [source,prism-code,language-text,codeBlock_wPnj,docs-styled-scrollbar]
66
+ ----
67
+ closeTitle: 'Close',
68
+ zoomTitle: 'Zoom',
69
+ arrowPrevTitle: 'Previous',
70
+ arrowNextTitle: 'Next',
71
+
72
+ errorMsg: 'The image cannot be loaded',
73
+ indexIndicatorSep: ' / ',
74
+ ----
75
+
76
+ Example:
77
+
78
+ [source, js]
79
+ ----
80
+ import PhotoSwipeLightbox from '/photoswipe/photoswipe-lightbox.esm.js';
81
+ const lightbox = new PhotoSwipeLightbox({
82
+ gallery: '#gallery--test-i18n',
83
+ children: 'a',
84
+
85
+ closeTitle: 'Close the dialog',
86
+ zoomTitle: 'Zoom the photo',
87
+ arrowPrevTitle: 'Go to the previous photo',
88
+ arrowNextTitle: 'Go to the next photo',
89
+
90
+ errorMsg: 'The photo cannot be loaded',
91
+ indexIndicatorSep: ' of ',
92
+
93
+ pswpModule: () => import('/photoswipe/photoswipe.esm.js'),
94
+ preloadFirstSlide: false
95
+ });
96
+ lightbox.init();
97
+ ----
98
+