-
Notifications
You must be signed in to change notification settings - Fork 1
/
gallery.html
263 lines (229 loc) · 9.93 KB
/
gallery.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AVITAR</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- font awesome cdn -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- fonts -->
<link rel = "stylesheet" href = "font/fonts.css">
<!-- normalize css -->
<link rel = "stylesheet" href = "css/normalize.css">
<!-- custom css -->
<link rel = "stylesheet" href = "css/utility.css">
<link rel = "stylesheet" href = "css/style.css">
<link rel = "stylesheet" href = "css/responsive.css">
</head>
<body>
<!-- navbar -->
<nav class = "navbar">
<div class = "container flex">
<a href = "index.html" class = "site-brand">
AVI<span>TAR</span>
</a>
<button type = "button" id = "navbar-show-btn" class = "flex">
<i class = "fas fa-bars"></i>
</button>
<div id = "navbar-collapse">
<button type = "button" id = "navbar-close-btn" class = "flex">
<i class = "fas fa-times"></i>
</button>
<ul class = "navbar-nav">
<li class = "nav-item">
<a href = "index.html" class = "nav-link">Home</a>
</li>
<li class = "nav-item">
<a href = "gallery.html" class = "nav-link">Gallery</a>
</li>
<li class = "nav-item">
<a href = "blog.html" class = "nav-link">Blog</a>
</li>
<li class = "nav-item">
<a href = "about.html" class = "nav-link">About</a>
</li>
<li class = "nav-item">
<a href = "contact.html" class = "nav-link">Contact</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- end of navbar -->
<!-- header -->
<header class = "flex header-sm">
<div class = "container">
<div class = "header-title">
<h1>Gallery</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Natus rerum maxime enim odit illum in molestias beatae doloremque, ratione optio.</p>
</div>
</div>
</header>
<!-- header -->
<!----> <!-- gallery section -->
<!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">
<!-- custom css file link -->
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600&display=swap');
*{
margin:0; padding:0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
.container{
max-width: 85%;
margin:20px auto;
}
.container .title{
font-size: 25px;
background-color: #000;
color:#fff;
border-radius: 5px;
margin-bottom: 10px;
text-align: center;
padding:15px;
}
.container .image-container{
columns:3 250px;
gap:15px;
}
.container .image-container img{
margin-bottom: 10px;
border-radius: 5px;
width: 100%;
}
.image-container img {
width: 100%;
height: auto;
transition: transform 0.3s ease; /* Add smooth transition effect */
}
.image-container img:hover {
transform: scale(1.2); /* Increase the scale to zoom in (1.2 means 120%) */
}
</style>
</head>
<body>
<div class="container">
<div class="image-container">
<img src="images/gallery-1.jpg" alt="">
<img src="images/gallery-2.jpg" alt="">
<img src="images/gallery-3.jpg" alt="">
<img src="images/gallery-4.jpeg" alt="">
<img src="images/gallery-5.jpeg" alt="">
<img src="images/gallery-6.jpeg" alt="">
<img src="images/gallery-7.jpg" alt="">
<img src="images/gallery-8.jpeg" alt="">
<img src="images/gallery-9.jpeg" alt="">
<img src="images/gallery-10.jpeg" alt="">
<img src="images/gallery-11.jpeg" alt="">
<img src="images/gallery-12.jpeg" alt="">
<img src="images/gallery-13.jpeg" alt="">
<img src="images/gallery-14.jpeg" alt="">
<img src="images/gallery-15.jpeg" alt="">
<img src="images/gallery-16.jpeg" alt="">
<img src="images/gallery-17.jpeg" alt="">
<img src="images/gallery-18.jpeg" alt="">
<img src="images/gallery-19.jpeg" alt="">
</div>
</div>
</body>
</html>
<!-- footer -->
<footer class = "py-4">
<div class = "container footer-row">
<div class = "footer-item">
<a href = "index.html" class = "site-brand">
AVI<span>TAR</span>
</a>
<p class = "text">Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet voluptates maiores nam vitae iusto. Placeat rem sint voluptas natus exercitationem autem quod neque, odit laudantium reiciendis ipsa suscipit veritatis voluptate.</p>
</div>
<div class = "footer-item">
<h2>Follow us on: </h2>
<ul class = "social-links">
<li>
<a href = "#">
<i class = "fab fa-facebook-f"></i>
</a>
</li>
<li>
<a href = "https://www.instagram.com/team_avitar/">
<i class = "fab fa-instagram"></i>
</a>
</li>
<li>
<a href = "#">
<i class = "fab fa-twitter"></i>
</a>
</li>
<li>
<a href = "#">
<i class = "fab fa-pinterest"></i>
</a>
</li>
<li>
<a href = "#">
<i class = "fab fa-google-plus"></i>
</a>
</li>
</ul>
</div>
<div class="footer-item">
<h2>Contact Information:</h2>
<p>Email: <a href="mailto:[email protected]">[email protected]</a></p>
<p>Phone: 986384484848</p>
<p>Address: VIT-Bhopal , sehore, bhopal, india</p>
</div>
<img src="images/logo.png" alt="">
</div>
</footer>
<!-- end of footer -->
<!-- js -->
<script src = "js/script.js"></script>
<script>
// image modal
const allGalleryItem = document.querySelectorAll('.gallery-item');
const imgModalDiv = document.getElementById('img-modal-box');
const modalCloseBtn = document.getElementById('modal-close-btn');
const nextBtn = document.getElementById('next-btn');
const prevBtn = document.getElementById('prev-btn');
let imgIndex = 0;
allGalleryItem.forEach((galleryItem) => {
galleryItem.addEventListener('click', () => {
imgModalDiv.style.display = "block";
let imgSrc = galleryItem.querySelector('img').src;
imgIndex = parseInt(imgSrc.split("-")[1].substring(0, 1));
showImageContent(imgIndex);
})
});
// next click
nextBtn.addEventListener('click', () => {
imgIndex++;
if(imgIndex > allGalleryItem.length){
imgIndex = 1;
}
showImageContent(imgIndex);
});
// previous click
prevBtn.addEventListener('click', () => {
imgIndex--;
if(imgIndex <= 0){
imgIndex = allGalleryItem.length;
}
showImageContent(imgIndex);
});
function showImageContent(index){
imgModalDiv.querySelector('#img-modal img').src = `images/gallery-${index}.jpg`;
}
modalCloseBtn.addEventListener('click', () => {
imgModalDiv.style.display = "none";
})
</script>
</body>
</html>