-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (65 loc) · 1.89 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css"
/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/javascript.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<style>
html,
body {
height: 100%;
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
}
#car {
max-width: 600px;
border-radius: 16px;
aspect-ratio: 2 / 1.5;
background-image: url("./demo/images/checkerboard.png");
overflow: hidden;
margin: auto;
margin-bottom: 24px;
}
pre,
code {
max-width: 600px;
border-radius: 16px;
margin: auto;
}
.header {
max-width: 600px;
margin: auto;
}
</style>
</head>
<body>
<div class="header">
<h1>Image Dragger</h1>
<p>A lightweight library to add image comparisons</p>
</div>
<div id="car"></div>
<div>
<pre><code class="language-javascript">
ImageDragger.create("#car", {
leftImage: "./demo/images/car.jpg",
rightImage: "./demo/images/car-bg-removed.png",
});
</code>
</pre>
</div>
<script type="module">
import { ImageDragger } from "https://cdn.jsdelivr.net/npm/image-dragger@latest/dist/image-dragger.js";
ImageDragger.create("#car", {
leftImage: "./demo/images/car.jpg",
rightImage: "./demo/images/car-bg-removed.png",
});
hljs.highlightAll();
</script>
</body>
</html>