-
Notifications
You must be signed in to change notification settings - Fork 1
/
33-SimpleLightbox.html
70 lines (64 loc) Β· 2 KB
/
33-SimpleLightbox.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" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SimpleLightbox library</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/simplelightbox/2.12.1/simple-lightbox.css"
integrity="sha512-BjQ2UJBKmkJynH20LaFAU4E/kOtE7r7it8YvfwhlyGA9HqB6ZQj1Z9d8tN+y3v2RYunBtcQ8NlbNOkXFkLfobQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<style>
.gallery {
display: grid;
max-width: 1140px;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
grid-auto-rows: 240px;
grid-gap: 12px;
justify-content: center;
padding: 0;
list-style: none;
margin-left: auto;
margin-right: auto;
}
.gallery__item {
position: relative;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14),
0px 2px 1px -1px rgba(0, 0, 0, 0.12);
}
.gallery__image:hover {
transform: scale(1.03);
}
.gallery__image {
height: 100%;
width: 100%;
object-fit: cover;
transition: transform cubic-bezier(0.4, 0, 0.2, 1);
animation-duration: 250ms;
}
.gallery__link {
display: block;
text-decoration: none;
height: 100%;
}
.gallery__link:hover {
cursor: zoom-in;
}
</style>
</head>
<body>
<!-- Add gallery items to this list -->
<ul class="gallery"></ul>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/simplelightbox/2.12.1/simple-lightbox.min.js"
integrity="sha512-QoopN2y0b53eP+J2BNc1ff4ImedQAt2xDdhLQkUzTCyfniKkUlHbhweoYxDhCY78Z5EnMtY5rLtjtTK0Yc9Jcw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script src="./app/33-SimpleLightbox.js" type="module"></script>
</body>
</html>