-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (62 loc) · 2.97 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
<!DOCTYPE HTML>
<html>
<head>
<title>
Resistor Solver
</title>
<meta charset="UTF-8">
<meta name="description" content="Resistive circuit solver">
<meta name="keywords" content="Resistor">
<meta name="author" content="Joseph Ma">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./styles.css" />
</head>
<body>
<div class="wrapper">
<div class="main-title">Resistor Solver</div>
<div class="description">
This site takes a given resistor range and solves for an equivalent circuit of 1kΩ, 5.1kΩ, and 10kΩ resistors.
</div>
<div class="inputs">
<input type="number" id="range-lower" name="range-lower" class="range-input" placeholder="Lower bound">
<input type="number" id="range-higher" name="range-higher" class="range-input" placeholder="Upper bound">
</div>
<div class="hint">(Bound input is in Ω, not kΩ)</div>
<div class="option-row">
<button type="button" onclick="calculateResistance()" class="range-submit">Calculate</button>
<input type="checkbox" onclick="longDisplay()" id="long-display"> Display long
</div>
<div id="resistors"></div>
<div class="footer">
It is known that duplicates may appear. This will not be changed.
<br />There is a hard limit of 100 resistors in parallel.
<br />For IEEE citation:
<br />
J. Ma, <i>Resistor Solver</i>, June 6, 2021. Accessed on: <span id="date-fill"></span>. [Online]. Available: <span id="url-fill"></span>
<br />
<!--
<div class="actual-footer">
<label class="switch">
<input id="check" type="checkbox">
<span class="slider round"></span>
</label>
<div class="copyright">© Joseph Ma 2021</span>
</div>-->
<div class="copyright">© Joseph Ma 2021 <a href="https://github.com/jlsajfj/resistor-solver">source</a></span>
</div>
</div>
<script>
const MonthNames = ["Jan", "Feb", "Mar", "Apr", "May", "June",
"July", "Aug", "Sep", "Oc", "Nov", "Dec"];
window.onload = () => {
var date = new Date();
var year = date.getFullYear();
var month = MonthNames[date.getMonth()];
var day = date.getDate();
document.getElementById('date-fill').innerHTML = `${month} ${day}, ${year}`
document.getElementById('url-fill').innerHTML = window.location.href;
}
</script>
<script src="./scripts.js"></script>
</body>
</html>