-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·125 lines (116 loc) · 5.34 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
<!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>Calculator</title>
<link rel="stylesheet" href="css/style.css">
<script src="js/script.js" defer></script>
<script src="js/creative.js" defer></script>
</head>
<body onload="setHandlers()">
<div id="calc">
<div class="output">
<div class="history" id="history"></div>
<div class="result" id="input">0</div>
<div class="converter" id="converter">
<hr class="converter-hr">
<select class="dropdown" name="initial-unit" id="initial-unit">
<optgroup label="Length">
<option value="centimetres">Centimetres</option>
<option value="meters">Metres</option>
<option value="kilometres">Kilometres</option>
</optgroup>
<optgroup label="Mass">
<option value="grams">Grams</option>
<option value="kilograms">Kilograms</option>
<option value="tonnes">Tonnes</option>
</optgroup>
<optgroup label="Area">
<option value="sq-centimetres">Sqare centimetres</option>
<option value="sq-metres">Sqare metres</option>
<option value="sq-kilometres">Sqare kilometres</option>
<option value="hectares">Hectares</option>
</optgroup>
</select>
<input class="input-value" type="number" name="input-value" placeholder="0" dir="rtl" id="initial">
<hr class="converter-hr">
<select class="dropdown" name="convert-to-unit" id="convert-to-unit">
<optgroup label="Length">
<option value="centimetres">Centimetres</option>
<option value="meters">Metres</option>
<option value="kilometres">Kilometres</option>
</optgroup>
<optgroup label="Mass">
<option value="grams">Grams</option>
<option value="kilograms">Kilograms</option>
<option value="tonnes">Tonnes</option>
</optgroup>
<optgroup label="Area">
<option value="sq-centimetres">Sqare centimetres</option>
<option value="sq-metres">Sqare metres</option>
<option value="sq-kilometres">Sqare kilometres</option>
<option value="hectares">Hectares</option>
</optgroup>
</select>
<div class="converted-value" id="converted">0</div>
<hr class="converter-hr">
</div>
</div>
<div class="ext-func">
<div class="mods">
<div class="func-btn" onclick="openConverter()">Converter</div>
<div class="func-btn" onclick="expand()">Advanced</div>
</div>
<div class="func-btn">
<img src="assets/images/backspace.png" alt="backspace" id="backspace" onclick="inputDelete()">
</div>
</div>
<hr class="ext-hr">
<div class="buttons">
<div class="btn first-row" onclick="fieldClear()">C</div>
<div class="btn first-row" onclick="toggleSign()">±</div>
<div class="btn first-row">%</div>
<div class="btn simple-oper">÷</div>
<div class="btn">7</div>
<div class="btn">8</div>
<div class="btn">9</div>
<div class="btn simple-oper">×</div>
<div class="btn">4</div>
<div class="btn">5</div>
<div class="btn">6</div>
<div class="btn simple-oper">-</div>
<div class="btn">1</div>
<div class="btn">2</div>
<div class="btn">3</div>
<div class="btn simple-oper">+</div>
<div class="btn drop-left">.</div>
<div class="btn">0</div>
<div class="btn equals" onclick="result()">=</div>
</div>
</div>
<div id="expand">
<div class="btns-row">
<div class="btn btn-expand" onclick="append('!')">x!</div>
<div class="btn btn-expand" onclick="append('^')">
x<sup>n</sup>
</div>
<div class="btn btn-expand" onclick="append('√')">
√x
</div>
</div>
<div class="btns-row">
<div class="btn btn-expand" onclick="memoryRecall()">MR</div>
<div class="btn btn-expand" onclick="memoryClear()">MC</div>
<div class="btn btn-expand" onclick="memoryAdd()">M+</div>
<div class="btn btn-expand" onclick="memorySub()">M-</div>
</div>
<div class="btns-row">
<div class="btn btn-expand" onclick="switchMode('binary')" id="binary">BIN</div>
<div class="btn btn-expand equals" onclick="switchMode('dec')" id="dec">DEC</div>
<div class="btn btn-expand" onclick="switchMode('hex')" id="hex">HEX</div>
</div>
</div>
</body>
</html>