-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
72 lines (67 loc) · 2.52 KB
/
index.html
File metadata and controls
72 lines (67 loc) · 2.52 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Buffon's Needle</title>
<script src="math.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style>
html, body {
overflow: hidden;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
font-family: sans-serif;
font-weight: bold;
}
#menu {
display: block;
top: 0;
left: 0;
padding: 1em;
margin: 0.75em;
border-radius: 0.75em;
background-color: #8491ac;
position: absolute;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
#submit {
color: black;
}
#submit:hover {
color: white;
}
.menu-inputs {
border-radius: 0.75em;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
padding: 1em;
background-color: #ccdfff;
border: none;
font-weight: bold;
font-size: 1em;
color: black;
}
.menu-text {
display: block;
color: #ccdfff;
text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19);
padding-top: 1em;
font-size: 1.5em;
}
</style>
</head>
<body onload="loadedPage();" onresize="resizeCanvas()">
<div id="menu">
<input class="menu-inputs" type="text" placeholder="Amount of needles to drop"></input>
<input id="submit" class="menu-inputs" type="submit" value="Submit" onclick="submitForm();"></input>
<br>
<span class="menu-text">Total Needles: <span id="total-needles"></span></span>
<span class="menu-text">Crossing Needles: <span id="crossed-needles"></span></span>
<span class="menu-text">Approximation: <span id="results"></span></span>
<span class="menu-text">Percent Error: <span id="percent-error"></span>%</span>
</div>
<canvas id="canvas">This text is displayed if your browser does not support HTML5 Canvas.</canvas>
<script src="index.js"></script>
</body>
</html>