-
Notifications
You must be signed in to change notification settings - Fork 0
/
image-comparison-slider.html
293 lines (271 loc) · 18.7 KB
/
image-comparison-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
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
<!DOCTYPE html>
<html lang="en" data-bs-theme="light">
<head>
<meta charset="utf-8">
<title>Silicon UI Kit | Image Comparison Slider</title>
<!-- SEO Meta Tags -->
<meta name="description" content="Silicon - Multipurpose Technology Bootstrap Template">
<meta name="keywords" content="bootstrap, business, creative agency, mobile app showcase, saas, fintech, finance, online courses, software, medical, conference landing, services, e-commerce, shopping cart, multipurpose, shop, ui kit, marketing, seo, landing, blog, portfolio, html5, css3, javascript, gallery, slider, touch, creative">
<meta name="author" content="Createx Studio">
<!-- Viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Theme switcher (color modes) -->
<script src="../assets/js/theme-switcher.js"></script>
<!-- Favicon and Touch Icons -->
<link rel="apple-touch-icon" sizes="180x180" href="../assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="../assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="../assets/favicon/favicon-16x16.png">
<link rel="manifest" href="../assets/favicon/site.webmanifest">
<link rel="mask-icon" href="../assets/favicon/safari-pinned-tab.svg" color="#6366f1">
<link rel="shortcut icon" href="../assets/favicon/favicon.ico">
<meta name="msapplication-TileColor" content="#080032">
<meta name="msapplication-config" content="../assets/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<!-- Vendor Styles -->
<link rel="stylesheet" media="screen" href="../assets/vendor/boxicons/css/boxicons.min.css">
<link rel="stylesheet" media="screen" href="../assets/vendor/swiper/swiper-bundle.min.css">
<link rel="stylesheet" media="screen" href="../assets/vendor/img-comparison-slider/dist/styles.css">
<link rel="stylesheet" media="screen" href="../assets/vendor/prismjs/themes/prism.css">
<link rel="stylesheet" media="screen" href="../assets/vendor/prismjs/plugins/toolbar/prism-toolbar.css">
<link rel="stylesheet" media="screen" href="../assets/vendor/prismjs/plugins/line-numbers/prism-line-numbers.css">
<!-- Main Theme Styles + Bootstrap -->
<link rel="stylesheet" media="screen" href="../assets/css/theme.min.css">
</head>
<!-- Body -->
<body>
<!-- Navbar -->
<header class="header navbar navbar-expand bg-light border-bottom border-light shadow fixed-top" data-scroll-header>
<div class="container-fluid pe-lg-4">
<div class="d-flex align-items-center">
<a href="typography.html" class="navbar-brand flex-shrink-0 py-1 py-lg-2">
<img src="../assets/img/logo.svg" width="47" alt="Silicon">
Silicon
</a>
<span class="badge bg-warning">UI Kit</span>
</div>
<div class="d-flex align-items-center w-100">
<ul class="navbar-nav d-none d-lg-flex" style="padding-left: 11.75rem;">
<li class="nav-item">
<a href="../index.html" class="nav-link">
<i class="bx bx-desktop opacity-70 fs-lg me-1"></i>
Live preview
</a>
</li>
<li class="nav-item">
<a href="../docs/getting-started.html" class="nav-link">
<i class="bx bx-file opacity-70 fs-lg me-1"></i>
Documentation
</a>
</li>
</ul>
<button type="button" class="navbar-toggler d-block d-lg-none ms-auto me-4" data-bs-toggle="offcanvas" data-bs-target="#componentsNav" aria-controls="componentsNav" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="form-check form-switch mode-switch pe-lg-1 ms-lg-auto" data-bs-toggle="mode">
<input type="checkbox" class="form-check-input" id="theme-mode">
<label class="form-check-label d-none d-sm-block d-lg-none d-xl-block" for="theme-mode">Light</label>
<label class="form-check-label d-none d-sm-block d-lg-none d-xl-block" for="theme-mode">Dark</label>
</div>
<a href="https://themes.getbootstrap.com/product/silicon-business-technology-template-ui-kit/" class="btn btn-primary btn-sm fs-sm rounded ms-4 d-none d-lg-inline-flex" target="_blank" rel="noopener">
<i class="bx bx-cart fs-5 lh-1 me-1"></i>
Buy now
</a>
</div>
</div>
</header>
<!-- Main sidebar navigation -->
<aside data-bs-theme="dark">
<div id="componentsNav" class="offcanvas-lg offcanvas-start d-flex flex-column position-fixed top-0 start-0 vh-100 bg-dark border-end-lg" style="width: 21rem; z-index: 1045;">
<div class="offcanvas-header d-none d-lg-flex justify-content-start">
<a href="typography.html" class="navbar-brand text-dark d-none d-lg-flex py-0">
<img src="../assets/img/logo.svg" width="47" alt="Silicon">
Silicon
</a>
<span class="badge bg-warning d-none d-lg-inline-block">UI Kit</span>
</div>
<div class="offcanvas-header d-block d-lg-none border-bottom">
<div class="d-flex align-items-center justify-content-between mb-3">
<h5 class="d-lg-none mb-0">Menu</h5>
<button type="button" class="btn-close d-lg-none" data-bs-dismiss="offcanvas" data-bs-target="#componentsNav" aria-label="Close"></button>
</div>
<div class="list-group list-group-flush mx-n4">
<a href="../index.html" class="list-group-item list-group-item-action d-flex align-items-center border-0 py-2 px-4">
<i class="bx bx-desktop fs-lg opacity-80 me-2"></i>
Preview
</a>
<a href="../docs/getting-started.html" class="list-group-item list-group-item-action d-flex align-items-center border-0 py-2 px-4">
<i class="bx bx-file fs-lg opacity-80 me-2"></i>
Documentation
</a>
</div>
</div>
<div class="offcanvas-body swiper scrollbar-hover overflow-hidden w-100 p-4" data-swiper-options='{
"direction": "vertical",
"slidesPerView": "auto",
"freeMode": true,
"scrollbar": {
"el": ".swiper-scrollbar"
},
"mousewheel": true
}'>
<div class="swiper-wrapper">
<div class="swiper-slide h-auto">
<h3 class="fs-lg">Content</h3>
<div class="list-group list-group-flush border-bottom pb-3 mb-4 mx-n4">
<a href="typography.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Typography</a>
<a href="https://boxicons.com/" class="list-group-item list-group-item-action border-0 py-2 px-4" target="_blank" rel="noopener">Icon font</a>
<a href="code.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Code</a>
<a href="images.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Images & figures</a>
<a href="tables.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Tables</a>
</div>
<h3 class="fs-lg">Components</h3>
<div class="list-group list-group-flush border-bottom pb-3 mb-4 mx-n4">
<a href="accordion.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Accordion</a>
<a href="alerts.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Alerts</a>
<a href="audio-player.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Audio player</a>
<a href="badges.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Badges</a>
<a href="blog-components.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Blog components</a>
<a href="breadcrumb.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Breadcrumb</a>
<a href="buttons.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Buttons</a>
<a href="button-group.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Button group</a>
<a href="cards.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Cards</a>
<a href="carousel.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Carousel (Slider)</a>
<a href="collapse.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Collapse</a>
<a href="dropdowns.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Dropdowns</a>
<a href="forms.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Forms</a>
<a href="gallery.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Gallery (Lightbox)</a>
<a href="image-comparison-slider.html" class="list-group-item list-group-item-action border-0 py-2 px-4 active">Image comparison slider</a>
<a href="input-group.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Input group</a>
<a href="list-group.html" class="list-group-item list-group-item-action border-0 py-2 px-4">List group</a>
<a href="modal.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Modal</a>
<a href="navbar.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Navbar</a>
<a href="offcanvas.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Offcanvas</a>
<a href="pagination.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Pagination</a>
<a href="parallax.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Parallax</a>
<a href="pills.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Pills</a>
<a href="placeholders.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Placeholders</a>
<a href="popovers.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Popovers</a>
<a href="portfolio-components.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Portfolio components</a>
<a href="pricing.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Pricing</a>
<a href="progress-bars.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Progress bars</a>
<a href="social-buttons.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Social buttons</a>
<a href="spinners.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Spinners</a>
<a href="steps.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Steps</a>
<a href="tabs.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Tabs</a>
<a href="team.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Team</a>
<a href="testimonials.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Testimonials / reviews</a>
<a href="toasts.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Toasts</a>
<a href="tooltips.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Tooltips</a>
<a href="video-popup.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Video popup</a>
</div>
<h3 class="fs-lg">Utilities</h3>
<div class="list-group list-group-flush mx-n4 pb-2">
<a href="https://getbootstrap.com/docs/5.3/utilities/background/" class="list-group-item list-group-item-action border-0 py-2 px-4" target="_blank" rel="noopener">Bootstrap</a>
<a href="utilities.html" class="list-group-item list-group-item-action border-0 py-2 px-4">Silicon</a>
</div>
</div>
</div>
<div class="swiper-scrollbar end-0"></div>
</div>
<div class="offcanvas-header border-top">
<a href="https://themes.getbootstrap.com/product/silicon-business-technology-template-ui-kit/" class="btn btn-primary w-100" target="_blank" rel="noopener">
<i class="bx bx-cart fs-4 lh-1 me-1"></i>
Buy now
</a>
</div>
</div>
</aside>
<!-- Page container -->
<main class="docs-container pt-5">
<div class="container-fluid px-xxl-5 px-lg-4 pt-4 pt-lg-5 pb-2 pb-lg-4">
<!-- Page title -->
<div class="d-sm-flex align-items-end justify-content-between ps-lg-2 ps-xxl-0 mt-2 mt-lg-0 pt-4 mb-n3">
<div class="me-4">
<h1 class="pb-1">Image Comparison Slider</h1>
<p class="text-muted fs-lg mb-2">JavaScript based slider component that can be used to demonstrate the difference between two images.</p>
</div>
<span class="badge bg-warning mb-2">Silicon component</span>
</div>
<!-- Info alert -->
<div class="alert alert-info mt-5 mb-n1 mb-lg-0" role="alert">
<div class="d-flex">
<i class="bx bx-info-circle lead me-2 me-sm-3"></i>
<div class="text-break">
<p class="mb-2">Image comparison slider relies on 3rd party plugin. Make sure to link to <strong>plugin css and js</strong> files in your document: <strong>assets/vendor/img-comparison-slider/dist/styles.css</strong> and <strong>assets/vendor/img-comparison-slider/dist/index.js</strong>.</p>
<p class="mb-2">Use this page as a reference.</p>
</div>
</div>
</div>
<!-- Example -->
<section class="py-5 ps-lg-2 ps-xxl-0">
<h2 class="h4">Example</h2>
<div class="d-table">
<ul class="nav nav-tabs-alt" role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#preview1" data-bs-toggle="tab" role="tab" aria-controls="preview1" aria-selected="true">
<i class="bx bx-show-alt fs-base opacity-70 me-2"></i>
Preview
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#html1" data-bs-toggle="tab" role="tab" aria-controls="html1" aria-selected="false">
<i class="bx bx-code-alt fs-base opacity-70 me-2"></i>
HTML
</a>
</li>
</ul>
</div>
<div class="tab-content pt-1">
<div class="tab-pane fade show active" id="preview1" role="tabpanel">
<img-comparison-slider style="max-width: 860px;">
<figure slot="first" class="position-relative">
<img src="../assets/img/portfolio/grid/10.jpg" alt="Image before">
<figcaption class="badge position-absolute top-50 start-0 translate-middle-y bg-white rounded text-nav fs-sm fw-semibold lh-1 px-3 py-2 ms-3 ms-sm-4">Before</figcaption>
</figure>
<figure slot="second" class="position-relative">
<img src="../assets/img/portfolio/grid/11.jpg" alt="Image after">
<figcaption class="badge position-absolute top-50 end-0 translate-middle-y bg-white rounded text-nav fs-sm fw-semibold lh-1 px-3 py-2 me-3 me-sm-4">After</figcaption>
</figure>
<div slot="handle" style="width: 36px;">
<svg class="text-primary shadow-primary rounded-circle" width="36" height="36" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 36 36"><g><circle fill="currentColor" cx="18" cy="18" r="18"/></g><path fill="#fff" d="M22.2,17.2h-8.3v-3.3L9.7,18l4.2,4.2v-3.3h8.3v3.3l4.2-4.2l-4.2-4.2V17.2z"/></svg>
</div>
</img-comparison-slider>
</div>
<div class="tab-pane fade" id="html1" role="tabpanel">
<pre class="line-numbers"><code class="lang-html"><!-- Image comparison slider example -->
<img-comparison-slider>
<figure slot="first" class="position-relative">
<img src="assets/img/portfolio/grid/10.jpg" alt="Image before">
<figcaption class="badge position-absolute top-50 start-0 translate-middle-y bg-white rounded text-nav fs-sm fw-semibold lh-1 px-3 py-2 ms-3 ms-sm-4">Before</figcaption>
</figure>
<figure slot="second" class="position-relative">
<img src="assets/img/portfolio/grid/11.jpg" alt="Image after">
<figcaption class="badge position-absolute top-50 end-0 translate-middle-y bg-white rounded text-nav fs-sm fw-semibold lh-1 px-3 py-2 me-3 me-sm-4">After</figcaption>
</figure>
<div slot="handle">
<svg class="text-primary shadow-primary rounded-circle" width="36" height="36" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 36 36"><g><circle fill="currentColor" cx="18" cy="18" r="18"/></g><path fill="#fff" d="M22.2,17.2h-8.3v-3.3L9.7,18l4.2,4.2v-3.3h8.3v3.3l4.2-4.2l-4.2-4.2V17.2z"/></svg>
</div>
</img-comparison-slider></code></pre>
</div>
</div>
</section>
</div>
</main>
<!-- Back to top button -->
<a href="#top" class="btn-scroll-top" data-scroll>
<span class="btn-scroll-top-tooltip text-muted fs-sm me-2">Top</span>
<i class="btn-scroll-top-icon bx bx-chevron-up"></i>
</a>
<!-- Vendor Scripts -->
<script src="../assets/vendor/swiper/swiper-bundle.min.js"></script>
<script src="../assets/vendor/img-comparison-slider/dist/index.js"></script>
<script src="../assets/vendor/prismjs/components/prism-core.min.js"></script>
<script src="../assets/vendor/prismjs/components/prism-markup.min.js"></script>
<script src="../assets/vendor/prismjs/components/prism-clike.min.js"></script>
<script src="../assets/vendor/prismjs/plugins/toolbar/prism-toolbar.min.js"></script>
<script src="../assets/vendor/prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js"></script>
<script src="../assets/vendor/prismjs/plugins/line-numbers/prism-line-numbers.min.js"></script>
<!-- Main Theme Script -->
<script src="../assets/js/theme.min.js"></script>
</body>
</html>