-
Notifications
You must be signed in to change notification settings - Fork 0
/
painting.html
92 lines (87 loc) · 2.64 KB
/
painting.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>The Waveform Generation</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/wavgen.css">
</head>
<body>
<!-- Placeholder for the subnav component -->
<div id="artsubnav-container"></div>
<!-- The Modal -->
<div id="myModal" class="modal">
<span class="close">×</span>
<img class="modal-content" id="img01" alt="ball1">
<div id="caption"></div>
</div>
<div class="header">
<h2><a href="painting.html">Painting</a></h2>
</div>
<div class="row">
<div class="side">
<h3>Ball 1</h3>
<p><img src="images/1.gif" alt="Ball 1" style="width:320px;height:240px;"></p>
</div>
<div class="main">
<h4>3D Ball Gif</h4>
<h4>TouchDesigner 2024</h4>
</div>
</div>
<div class="row">
<div class="side">
<h3>Ball 1</h3>
<p><img src="images/1.gif" alt="Ball 1" style="width:320px;height:240px;"></p>
</div>
<div class="main">
<h4>3D Ball Gif</h4>
<h4>TouchDesigner 2024</h4>
</div>
</div>
<div class="row">
<div class="side">
<h3>Ball 1</h3>
<p><img src="images/1.gif" alt="Ball 1" style="width:320px;height:240px;"></p>
</div>
<div class="main">
<h4>3D Ball Gif</h4>
<h4>TouchDesigner 2024</h4>
</div>
</div>
<div class="row">
<div class="side">
<h3>Ball 1</h3>
<p><img src="images/1.gif" alt="Ball 1" style="width:320px;height:240px;"></p>
</div>
<div class="main">
<h4>3D Ball Gif</h4>
<h4>TouchDesigner 2024</h4>
</div>
</div>
<script>
// Get the modal
var modal = document.getElementById("myModal");
// Get the image and insert it inside the modal - use its "alt" text as a caption
var imgs = document.querySelectorAll("img");
var modalImg = document.getElementById("img01");
var captionText = document.getElementById("caption");
imgs.forEach(img => {
img.onclick = function(){
modal.style.display = "block";
modalImg.src = this.src;
captionText.innerHTML = this.alt;
}
});
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
</script>
<!-- Placeholder for the footer component -->
<div id="footer-container"></div>
<!-- Load the component loader script -->
<script src="js/loadComponents.js"></script>
</body>
</html>