-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (66 loc) · 4.89 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Floating Point</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="navbar bg-dark p-3"></div>
<div class="container d-flex justify-content-center mt-4">
<h1 class="display-4">Floating Point</h1>
</div>
<div class="container d-flex justify-content-center">
<p class="lead">IEEE 754</p>
</div>
<div class="container d-flex justify-content-center">
<div class="container row mt-4 w-75">
<div class="col-12 col-lg-4 flex-fill d-flex flex-column flex-lg-column justify-content-center mb-auto">
<div class="form-floating w-100 p-0 d-flex flex-row flex-lg-column mb-auto">
<input type="number" ster="any" id="number-input" name="number" class="form-control ps-3 mb-3 mb-lg-0" placeholder="Number">
<label for="number" class="ms-3 mb-3">Number</label>
<button class="btn btn-dark range-btn p-0 align-self-center mb-3 ms-4 ms-lg-0 mt-lg-4 fs-5 pb-3" type="button" data-bs-toggle="collapse" data-bs-target="#number-range" aria-expanded="false" aria-controls="number-range">+</button>
</div>
<div class="collapse col-12 mb-2" id="number-range">
<input id="number-slider" type="range" class="form-range link-dark" snap="1" min="-1000" max="1000" value="0">
</div>
</div>
<div class="col-12 col-lg-4 flex-fill d-flex flex-column flex-lg-column justify-content-center mb-auto">
<div class="form-floating w-100 p-0 d-flex flex-row flex-lg-column">
<input type="number" id="exponent-input" name="exponent" class="form-control ps-3 mb-3 mb-lg-0" id="" placeholder="Exponent Bits">
<label for="exponent" class="ms-3 mb-3">Exponent Bits</label>
<button class="btn btn-dark range-btn p-0 align-self-center mb-3 ms-4 ms-lg-0 mt-lg-4 fs-5 pb-3" type="button" data-bs-toggle="collapse" data-bs-target="#exponent-range" aria-expanded="false" aria-controls="exponent-range">+</button>
</div>
<div class="collapse col-12 mb-2" id="exponent-range">
<input id="exponent-slider" type="range" class="form-range link-dark" snap="1" min="0" max="15" value="0">
</div>
</div>
<div class="col-12 col-lg-4 flex-fill d-flex flex-column flex-lg-column justify-content-center mb-auto">
<div class="form-floating w-100 p-0 d-flex flex-row flex-lg-column">
<input type="number" id="mantissa-input" name="mantissa" class="form-control ps-3 mb-3 mb-lg-0" id="" placeholder="Mantissa Bits">
<label for="mantissa" class="ms-3 mb-3">Mantissa Bits</label>
<button class="btn btn-dark range-btn p-0 align-self-center mb-3 ms-4 ms-lg-0 mt-lg-4 fs-5 pb-3" type="button" data-bs-toggle="collapse" data-bs-target="#mantissa-range" aria-expanded="false" aria-controls="mantissa-range">+</button>
</div>
<div class="collapse col-12 mb-2" id="mantissa-range">
<input id="mantissa-slider" type="range" class="form-range link-dark" snap="1" min="0" max="15" value="0">
</div>
</div>
</div>
</div>
<div class="container d-flex justify-content-center mt-4">
<p id="bit-num-dom" class="lead me-1"></p><p id="bit-text-dom" class="lead"> bits total</p>
</div>
<div class="container border rounded bg-dark p-0">
<div class="row row-cols-3 justify-content-center align-content-center m-0">
<h1 id="sign-result-dom" class="text-light fs-1 display-3 mt-1 col col-12 col-lg-auto text-center"></h1>
<h1 id="exponent-result-dom" class="text-light fs-1 display-3 mt-1 col col-12 col-lg-auto text-center"></h1>
<h1 id="mantissa-result-dom" class="text-light fs-1 display-3 mt-1 col col-12 col-lg-auto text-center"></h1>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="script.js"></script>
</body>
</html>