-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
493 lines (465 loc) · 16.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="User friendly, easy to use, and touch and navigation enabled
JavaScript image gallery."
/>
<meta name="author" content="Maxim Zaika" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta
name="keywords"
content="user, friendly, easy, to, use, touch, navigation, enabled, javascript, image, gallery"
/>
<title>TwoWay Image Gallery</title>
<link rel="icon" href="demo/img/TWShort.png" />
<link rel="stylesheet" href="src/twoWayGallery.css" />
<link rel="stylesheet" href="demo/demo.css" />
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<script src="src/twoWayGallery.js"></script>
<script src="demo/twConfig.js" defer></script>
</head>
<body>
<nav class="navbar">
<div class="page-row font-size">
<a class="navbar-logo" href="#">twoWayGallery.js</a>
<ul class="navbar-nav">
<li class="nav-item">
<a
href="https://github.com/maximzaika/TwoWayGallery/tree/main#Install"
target="_blank"
>Install</a
>
</li>
<li class="nav-item">
<a
href="https://github.com/maximzaika/TwoWayGallery/tree/main#Options"
target="_blank"
>Options</a
>
</li>
</ul>
</div>
</nav>
<section class="header">
<div class="page-row header-content">
<div class="row padding-bottom">
<div class="column-left">
<h2>TwoWay Gallery <span>v 2.07</span></h2>
<p>
User friendly, easy to use, and touch and navigation enabled
JavaScript image gallery.
</p>
</div>
<div class="column-right column-logo">
<img class="tw-logo" src="demo/img/TWLogo.png" alt="" />
</div>
</div>
<a
type="button"
href="https://github.com/maximzaika/TwoWayGallery/archive/2.07.zip"
class="btn btn-download"
>
Download
</a>
<a
type="button"
href="https://github.com/maximzaika/TwoWayGallery/tree/main"
target="_blank"
class="btn btn-github"
>Github Repo</a
>
</div>
</section>
<section id="demo" class="demo">
<div class="page-row">
<h2 class="center">Demo & Configuration</h2>
<p class="center" style="font-size: 20px">
Options that require manual input are not displayed. You may find all
available options in
<a
href="https://github.com/maximzaika/TwoWayGallery/tree/main#Options"
target="_blank"
>
Github</a
>.
</p>
<div class="available-options">
<div class="main-options">
<button type="button" class="collapsible">
Main gallery configurations
</button>
<div class="grid-container collapse">
<div class="item-1">
<p class="center">
startItem
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
The starting image is changed based on its index (both
Main and Secondary galleries).
</span>
</i>
</p>
<div class="center-select">
<select class="integer" id="startItem">
<option value="0">0</option>
<option value="1">1</option>
<option value="2" selected>2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
</div>
</div>
<div class="item-2">
<p class="center">
displayItems
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
The number of items displayed in desktop view.
</span>
</i>
</p>
<div class="center-select">
<select class="integer" id="displayItems">
<option value="3">3</option>
<option value="5" selected>5</option>
<option value="7">7</option>
</select>
</div>
</div>
<div class="item-3">
<p class="center">
descriptionType
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
The style of the description.
</span>
</i>
</p>
<div class="center-select">
<select class="desc-short-string" id="descriptionType">
<option value="white" selected>white</option>
<option value="black">black</option>
</select>
</div>
</div>
<div class="item-4">
<p class="center">
enableArrowKeys
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
Allows to use arrow keys if in viewport.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="enableArrowKeys"
value="enableArrowKeys"
/>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="item-5">
<p class="center">
enableTouch
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
Enables swiping right and left.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="enableTouch"
value="enableTouch"
checked
/>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="item-6">
<p class="center">
apEnable
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext"> Enables auto scroll. </span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="autoPlayEnable"
value="autoPlayEnable"
/>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="item-7">
<p class="center">
apTimeout
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
If apEnable is true, controls auto scroll delay.
</span>
</i>
</p>
<div class="center-select">
<select class="desc-long-string" id="autoPlayTimeout">
<option value="500">500 ms</option>
<option value="1000">1000 ms</option>
<option value="2000" selected>2000 ms</option>
<option value="4000">4000 ms</option>
<option value="8000">8000 ms</option>
</select>
</div>
</div>
<div class="item-8">
<p class="center">
apDirection
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
If apEnable is true, controls the direction of auto
scroll.
</span>
</i>
</p>
<div class="center-select">
<select class="desc-short-string" id="autoPlayDirection">
<option value="left">left</option>
<option value="right" selected>right</option>
</select>
</div>
</div>
<div class="item-9">
<p class="center">
apPauseOnHover
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
If apEnable is true, pauses auto scroll on hover.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="autoPlayPauseOnHover"
value="autoPlayPauseOnHover"
checked
/>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="item-10">
<p class="center">
apPauseNotif
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
If apEnable is true, notifies the user if auto scroll is
paused.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="autoPlayPauseNotification"
value="autoPlayPauseNotification"
checked
/>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="item-11">
<p class="center">
navEnable
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
Displays the navigation arrows.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="navigationEnable"
value="navigationEnable"
checked
/>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="item-12">
<p class="center">
navShowOnHover
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
Navigation is hidden and shown on hover.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="navigationShowOnHover"
value="navigationShowOnHover"
/>
<span class="slider round"></span>
</label>
</div>
</div>
</div>
</div>
<div class="secondary-options">
<button type="button" class="collapsible">
Secondary gallery configurations
</button>
<div class="grid-container collapse">
<div class="item-1">
<p class="center">
sgEnable
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
Enables Secondary Gallery.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="sGalleryEnable"
value="sGalleryEnable"
checked
/>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="item-2">
<p class="center">
sgInstant
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
Upon click, ignores image scroll animation.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="sGalleryInstant"
value="sGalleryInstant"
/>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="item-3">
<p class="center">
sgDeskTouch
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
Enables mouse drag. Mobile is always on.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="sGalleryDesktopTouch"
value="sGalleryDesktopTouch"
checked
/>
<span class="slider round"></span>
</label>
</div>
</div>
<div class="item-4">
<p class="center">
sgNavArrows
<i class="fa fa-info-circle tooltip" aria-hidden="true">
<span class="tooltiptext">
Displays the navigation arrows.
</span>
</i>
</p>
<div class="center-select">
<label class="switch">
<input
type="checkbox"
id="sGalleryNavigationArrows"
value="sGalleryNavigationArrows"
checked
/>
<span class="slider round"></span>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="tw-gallery" style="margin-top: 30px">
<div class="tw-m-gallery"></div>
<div class="tw-s-gallery"></div>
</div>
</div>
</section>
<section class="footer">
<div class="page-row initials">
<p>by Maxim Zaika</p>
<div class="refs">
<a
class="linkedin-icon"
href="https://www.linkedin.com/in/maxim-zaika"
target="_blank"
></a>
<a
class="twitter-icon"
href="https://twitter.com/share?url=https://github.com/maximzaika/TwoWayGallery&text=TwoWay%20Gallery%20-%20Love%20this%20JS%20image%20Gallery!"
target="_blank"
></a>
</div>
</div>
</section>
<script>
const collapsible = document.getElementsByClassName("collapsible");
for (const collapse of collapsible) {
collapse.addEventListener("click", () => {
collapse.classList.toggle("active");
let content = collapse.nextElementSibling;
if (content.style.maxHeight) {
content.style.marginTop = null;
content.style.maxHeight = null;
content.style.overflow = "hidden";
} else {
content.style.marginTop = `20px`;
content.style.overflow = "visible";
content.style.maxHeight = `${content.scrollHeight + 300}px`;
}
});
}
</script>
</body>
</html>