-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
195 lines (184 loc) · 6.63 KB
/
index.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
<!--website for calculating speed and acceleration-->
<!--copyright 2019 levi barshinger-->
<!--DO NOT DELETE-->
<!DOCTYPE html>
<html>
<head>
<title>JavaScript and the DOM Practice</title>
<link rel="stylesheet" href="styles.css"></link>
</head>
<body>
<header>
<div class="sidenav">
<h2 class="menu-title"><a href="#main-content">Physics Calculations</a></h2>
<a href="#calc-speed" class="nav-item">Speed</a>
<a href="#calc-acceleration" class="nav-item">Acceleration</a>
<a href="#calc-force" class="nav-item">Force</a>
<a href="#calc-pressure" class="nav-item">Pressure</a>
<a href="#calc-work" class="nav-item">Work</a>
<a href="#calc-kinetic-energy" class="nav-item">Kinetic Energy</a>
<a href="#calc-power" class="nav-item">Power</a>
</div>
</header>
<div class="main-content" id="main-content">
<h1>Physics Calculations</h1>
<!--Calculates Speed-->
<div class="calc-speed" id="calc-speed">
<h2>Calculate Speed</h2>
<p>Select a System of Measurement:</p>
<div class="custom-select">
<select name="speed-measurement" id="speed-measurement">
<option value="mi-min" class="styled-option">mi/min</option>
<option value="mi-hr" class="styled-option">mi/hr</option>
<option value="cm-sec" class="styled-option">cm/sec</option>
<option value="m-sec" class="styled-option">m/sec</option>
<option value="m-min" class="styled-option">m/min</option>
<option value="km-min" class="styled-option">km/min</option>
<option value="km-hr" class="styled-option">km/hr</option>
</select>
</div>
<p>Distance:</p>
<input type="text" class="distance-for-speed"></input>
<br>
<br>
<br>
<p>Time:</p>
<input type="text" class="speed-time"></input>
<br>
<br>
<br>
<button class="btn-speed">Calculate Speed</button>
<br>
<p class="speed-result results">Speed:</p>
</div>
<!--Calculates Acceleration-->
<div class="calc-acceleration" id="calc-acceleration">
<h2>Calculate Acceleration</h2>
<p>Select a System of Measurement:</p>
<div class="custom-select">
<select name="acceleration-measurement" id="acceleration-measurement">
<option value="mi-min2" class="styled-option">mi/min²</option>
<option value="mi-hr2" class="styled-option">mi/hr²</option>
<option value="cm-sec2" class="styled-option">cm/sec²</option>
<option value="m-sec2" class="styled-option">m/sec²</option>
<option value="m-min2" class="styled-option">m/min²</option>
<option value="km-min2" class="styled-option">km/min²</option>
<option value="km-hr2">km/hr²</option>
</select>
</div>
<p>Initial Velocity (in miles per minute):</p>
<input type="text" class="initial-v"></input>
<br>
<br>
<br>
<p>Final Velocity (in miles per minute):</p>
<input type="text" class="final-v"></input>
<br>
<br>
<br>
<p>Time (in minutes):</p>
<input type="text" class="acceleration-time"></input>
<br>
<br>
<br>
<button class="btn-acceleration">Calculate Acceleration</button>
<br>
<p class="acceleration-result results">Acceleration:</p>
</div>
<!--Calculates Force-->
<div class="calc-force" id="calc-force">
<h2>Calculate Force</h2>
<p>Mass (in kilograms):</p>
<input type="text" class="mass"></input>
<br>
<br>
<br>
<p>Acceleration (in miles per second):</p>
<input type="text" class="acceleration-for-force"></input>
<br>
<br>
<br>
<button class="btn-force">Calculate Force</button>
<br>
<p class="force-result results">Force:</p>
</div>
<!--Calculates Pressure-->
<div class="calc-pressure" id="calc-pressure">
<h2>Calculate Pressure</h2>
<p>Area (in meters<sup>2</sup>):</p>
<input type="text" class="area"></input>
<br>
<br>
<br>
<p>Force (in Newtons):</p>
<input type="text" class="force-for-pressure"></input>
<br>
<br>
<br>
<button class="btn-pressure">Calculate Pressure</button>
<br>
<p class="pressure-result results">Pressure:</p>
</div>
<!--Calculates Work-->
<div class="calc-work" id="calc-work">
<h2>Calculate Work</h2>
<p>Force (in Newtons):</p>
<input type="text" class="force-for-work"></input>
<br>
<br>
<br>
<p>Distance (in Meters):</p>
<input type="text" class="distance-for-work"></input>
<br>
<br>
<br>
<button class="btn-work">Calculate Work</button>
<br>
<p class="work-result results">Work:</p>
</div>
<!--Calculates Kinetic Energy-->
<div class="calc-kinetic-energy" id="calc-kinetic-energy">
<h2>Calculate Kinetic Energy</h2>
<p>Mass (in kilograms):</p>
<input type="text" class="mass-for-kinetic-energy"></input>
<br>
<br>
<br>
<p>Veloctiy (in meters per second):</p>
<input type="text" class="velocity-for-kinetic-energy"></input>
<br>
<br>
<br>
<button class="btn-kinetic-energy">Calculate Kinetic Energy</button>
<br>
<p class="kinetic-energy-result results">Kinetic Energy:</p>
</div>
<!--Calculates Power-->
<div class="calc-power" id="calc-power">
<h2>Calculate Power</h2>
<p>Select a System of Measurement:</p>
<div class="custom-select">
<select name="power-measurement" id="power-measurement">
<option value="watts" class="styled-option">Watts</option>
<option value="horsepower" class="styled-option">Horsepower</option>
</select>
</div>
<p>Energy (in joules):</p>
<input type="text" class="energy-for-power"></input>
<br>
<br>
<br>
<p>Time (in seconds):</p>
<input type="text" class="time-for-power"></input>
<br>
<br>
<br>
<button class="btn-power">Calculate Power</button>
<br>
<p class="power-result results">Power:</p>
</div>
<p>Copyright © 2019 Levi Barshinger</p>
</div>
</body>
<script src="script.js"></script>
</html>