-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcats.html
65 lines (61 loc) · 2.5 KB
/
cats.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
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
<script>
window.onload = function()
{
let pics = document.querySelectorAll('img')
{
pics.forEach(function(pic)
{
pic.addEventListener('click', function()
{
let message = pic.getAttribute('data-message');
window.alert(message);
});
});
}
}
</script>
<link href="styles.css" rel="stylesheet">
<title>The Beans</title>
</head>
<body>
<div class=header style="background-image: url('images/cat header.png'); background-size: contain;">
<h1>meow meow</h1>
</div>
<a href="index.html">Home</a>
<h2 class="rainbow-text" style="text-align: center; font-size: 2em">these are some pictures of my cats</h2><br>
<div class='grid'>
<figure>
<img src="images/cat1.jpg" data-message="Peppy Bean!">
<figcaption>Pepper</figcaption>
</figure>
<figure>
<img src="images/cat2.jpg" data-message="Samantho">
<figcaption>Sammy</figcaption>
</figure>
<figure>
<img src="images/cat3.jpg" data-message="The stinker">
<figcaption>Smore</figcaption>
</figure>
<figure>
<img src="images/cat4.jpg" data-message="Dear Floof">
<figcaption>Fluffy</figcaption>
</figure>
<figure>
<img src="images/cat5.jpg" data-message="Cat">
<figcaption>The gang</figcaption>
</figure>
<figure>
<img src="images/cat6.png" data-message="Meu deus, as criaturas!">
<figcaption>My creatures...</figcaption>
</figure>
</div>
<footer><hr>
shoutouts to simpleflips
</footer>
</body>
</html>