-
Notifications
You must be signed in to change notification settings - Fork 0
/
slider.html
120 lines (118 loc) · 4.88 KB
/
slider.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/mainall.css">
<link rel="stylesheet" href="css/slider.css">
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/fancybox.umd.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css"/>
</head>
<header class="header">
<ul class="header__list">
<li><a href="index.html">Filter</a></li>
<li><a href="slider.html">Slider</a></li>
<li><a href="map.html">Map</a></li>
<li><a href="picture.html">Picture</a></li>
</ul>
</header>
<body>
<main class="main">
<div class="title">
<h1>Заголовок H1</h1>
</div>
<div class="main__slider">
<div id="mainCarousel" class="carousel w-10/12 max-w-5xl mx-auto">
<div
class="carousel__slide"
data-src="https://lipsum.app/id/1/900x600"
data-fancybox="gallery"
data-caption="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum lobortis ultricies ipsum, a maximus ligula dignissim in. Sed consectetur tellus egestas, consequat dolor at, tempus augue. Morbi quis ipsum quis velit."
>
<img src="https://lipsum.app/id/1/600x400" />
</div>
<div
class="carousel__slide"
data-src="https://lipsum.app/id/2/900x600"
data-fancybox="gallery"
data-caption="Ut semper, justo eget vehicula vestibulum, enim enim suscipit lectus, et sagittis nibh risus vel metus. Quisque eu ornare ante, et gravida mauris"
>
<img src="https://lipsum.app/id/2/600x400" />
</div>
<div
class="carousel__slide"
data-src="https://lipsum.app/id/3/900x600"
data-fancybox="gallery"
data-caption="Hello 🖐"
>
<img src="https://lipsum.app/id/3/600x400" />
</div>
<div
class="carousel__slide"
data-src="https://lipsum.app/id/4/900x600"
data-fancybox="gallery"
data-caption="Another caption"
>
<img src="https://lipsum.app/id/4/600x400" />
</div>
</div>
<div id="thumbCarousel" class="carousel max-w-xl mx-auto">
<div class="carousel__slide">
<img class="panzoom__content" src="https://lipsum.app/id/1/100x100" />
</div>
<div class="carousel__slide">
<img class="panzoom__content" src="https://lipsum.app/id/2/100x100" />
</div>
<div class="carousel__slide">
<img class="panzoom__content" src="https://lipsum.app/id/3/100x100" />
</div>
<div class="carousel__slide">
<img class="panzoom__content" src="https://lipsum.app/id/4/100x100" />
</div>
</div>
</div>
<div class="main__right_block">
<div class="main__title">
<h1>Заголовок H1</h1>
</div>
<div class="main__text">
<p>Разнообразный и богатый опыт постоянный количественный рост и сфера нашей активности позволяет выполнять важные задания по разработке существенных финансовых и административных условий. Равным образом реализация намеченных плановых заданий требуют от нас анализа дальнейших направлений развития. Повседневная практика показывает...</p>
</div>
<div class="main__shop">
<span>1000 ₽</span>
<button>В Корзину</button>
</div>
</div>
</main>
<script>
const mainCarousel = new Carousel(document.querySelector("#mainCarousel"), {
Dots: false,
});
// Thumbnails
const thumbCarousel = new Carousel(document.querySelector("#thumbCarousel"), {
Sync: {
target: mainCarousel,
friction: 0,
},
Dots: false,
Navigation: false,
center: true,
slidesPerPage: 1,
infinite: true,
});
// Customize Fancybox
Fancybox.bind('[data-fancybox="gallery"]', {
Carousel: {
on: {
change: (that) => {
mainCarousel.slideTo(mainCarousel.findPageForSlide(that.page), {
friction: 0,
});
},
},
},
});
</script>
</body>
</html>