-
Notifications
You must be signed in to change notification settings - Fork 0
/
images.html
117 lines (114 loc) · 4.74 KB
/
images.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tom Mitchell - Photo Gallery</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="gradient-overlay"></div>
<div class="scroll-indicator"></div>
<header class="header gallery-header">
<div class="header-content">
<h1>Photo Gallery</h1>
<a href="index.html#about" class="back-button"><i class="fas fa-arrow-left"></i> Back to Home</a>
</div>
</header>
<main class="container gallery-container">
<section class="section gallery">
<div class="gallery-grid">
<div class="gallery-item">
<img src="./Images/Sunsets/Sunset1.jpeg" alt="Sunset 1">
</div>
<div class="gallery-item">
<img src="./Images/Sunsets/Sunset2.jpeg" alt="Sunset 2">
</div>
<div class="gallery-item">
<img src="./Images/Sunsets/Sunset3.jpeg" alt="Sunset 3">
</div>
<div class="gallery-item">
<img src="./Images/Sunsets/Sunset4.jpeg" alt="Sunset 4">
</div>
<div class="gallery-item">
<img src="./Images/Sunsets/Sunset5.jpeg" alt="Sunset 5">
</div>
<div class="gallery-item">
<img src="./Images/Skiing/Skiing1.jpeg" alt="Skiing 1">
</div>
<div class="gallery-item">
<img src="./Images/Skiing/Skiing2.jpeg" alt="Skiing 2">
</div>
<div class="gallery-item">
<img src="./Images/Skiing/Skiing3.jpeg" alt="Skiing 3">
</div>
<div class="gallery-item">
<img src="./Images/Skiing/Skiing4.jpeg" alt="Skiing 4">
</div>
<div class="gallery-item">
<img src="./Images/Skiing/Skiing5.jpeg" alt="Skiing 5">
</div>
<div class="gallery-item">
<img src="./Images/Skiing/Skiing6.jpeg" alt="Skiing 6">
</div>
<div class="gallery-item">
<img src="./Images/Flying/Flying1.jpeg" alt="Flying 1">
</div>
<div class="gallery-item">
<img src="./Images/Flying/Flying2.jpeg" alt="Flying 2">
</div>
<div class="gallery-item">
<img src="./Images/Flying/Flying3.jpeg" alt="Flying 3">
</div>
<div class="gallery-item">
<img src="./Images/Flying/Flying6.jpeg" alt="Flying 7">
</div>
<div class="gallery-item">
<img src="./Images/Flying/Flying4.jpeg" alt="Flying 4">
</div>
<div class="gallery-item">
<img src="./Images/Flying/Flying5.jpeg" alt="Flying 5">
</div>
<div class="gallery-item">
<img src="./Images/Flying/Flying7.jpeg" alt="Flying 6">
</div>
<div class="gallery-item">
<img src="./Images/Fishing/Fishing1.jpeg" alt="Fishing 1">
</div>
<div class="gallery-item">
<img src="./Images/Fishing/Fishing2.jpeg" alt="Fishing 2">
</div>
</div>
</section>
</main>
<div id="imageModal" class="modal">
<span class="close">×</span>
<img class="modal-content" id="modalImage">
</div>
<footer>
<p class="copyright">© 2024 Tom Mitchell. All rights reserved.</p>
</footer>
<script src="scripts.js"></script>
<script>
const modal = document.getElementById('imageModal');
const modalImg = document.getElementById('modalImage');
const closeBtn = document.getElementsByClassName('close')[0];
document.querySelectorAll('.gallery-item img').forEach(img => {
img.onclick = function() {
modal.style.display = "block";
modalImg.src = this.src;
}
});
closeBtn.onclick = function() {
modal.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</body>
</html>