-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
379 lines (370 loc) · 28.8 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Calculator</title>
<link href="style.css" rel="stylesheet">
<!-- Link bootstrap4 using CDN -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<!-- Link jQuery CDN -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Font Awesome Icon js -->
<script src="https://use.fontawesome.com/f26972590a.js"></script>
<!-- AOS CDN -->
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<!-- favicon -->
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body onload="showStandard()">
<!-- Sidebar -->
<div id="mySidenav" class="sidenav">
<span href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</span>
<a href="#standard" onclick="showStandard() "><img width="35" class="m-2 " src="https://img.icons8.com/ios-glyphs/30/000000/calculator.png"/>Standard</a>
<a href="#programmer" onclick="showProgrammer()"><img width="30" class="m-2" src="https://img.icons8.com/ios-glyphs/64/000000/code.png"/>Programmer</a>
<a href="#scientific" onclick="showScientific()"><img width="35" class="m-2" src="https://img.icons8.com/external-kiranshastry-lineal-kiranshastry/64/000000/external-flask-advertising-kiranshastry-lineal-kiranshastry.png"/>Scientific</a>
<a href="#currency-con" onclick="showCurrencyCon()"><img width="35" class="m-2" src="https://img.icons8.com/external-prettycons-lineal-prettycons/49/000000/external-currency-business-and-finance-prettycons-lineal-prettycons.png"/>Currency</a>
<a href="#Date-Difference" onclick="showDateDiff()"><img width="25" class="m-2" src="https://img.icons8.com/ios/49/000000/calendar.png"/>Date Calculation</a>
<br>
<span href="">
<label class="switch">
<input type="checkbox" onclick="changetheme()">
<span class="slider round">
<img width="20" class="lightimg" id="lighttheme" src="https://img.icons8.com/material-outlined/24/000000/sun.png"/>
<img width="20" class="darkimg" id="darktheme" src="https://img.icons8.com/ios-glyphs/30/000000/sun--v1.png"/>
</span>
</label>
</span>
</div>
<!-- Nav Bar -->
<nav class="navbar text-center mt-3">
<span style="font-size:30px; cursor:pointer" onclick="openNav()">☰ </span>
<h2 class="name mb-0" >
<b id="calc-type">Standard</b>
</h2>
<button class="btn p-1 mobile-history" id="show-history-btn" onclick="showhistory()">
<img width="30" src="https://img.icons8.com/external-flatart-icons-outline-flatarticons/64/000000/external-history-instagram-flatart-icons-outline-flatarticons.png"/>
</button>
</nav>
<!-- Main Calc & History -->
<div id="standard">
<!-- Calculator & History-->
<div class="row">
<!-- Calculator -->
<div class="calculator-grid" id="calculator"data-aos="fade-up" >
<div class="output" id="chnge-output">
<div id="previous-operand"> </div>
<div id="current-operand"> </div>
</div>
<button class="span" onclick = "clearall('current-operand', 'previous-operand') " >C</button>
<button onclick = "backspace('current-operand', 'previous-operand')"><img width="40" class="" src="https://img.icons8.com/ios/64/000000/clear-symbol.png"/></button>
<button onclick = "insert('/','current-operand')">÷</button>
<button onclick = "insert(1,'current-operand')" value="1">1</button>
<button onclick = "insert(2,'current-operand')" value="2">2</button>
<button onclick = "insert(3,'current-operand')" value="3">3</button>
<button onclick = "insert('*','current-operand')">*</button>
<button onclick = "insert(4,'current-operand')" value="4">4</button>
<button onclick = "insert(5,'current-operand')" value="5">5</button>
<button onclick = "insert(6,'current-operand')" value="6">6</button>
<button onclick = "insert('+','current-operand')">+</button>
<button onclick = "insert(7,'current-operand')" value="7">7</button>
<button onclick = "insert(8,'current-operand')" value="8">8</button>
<button onclick = "insert(9,'current-operand')" value="9">9</button>
<button onclick = "insert('-','current-operand')">-</button>
<button onclick = "insert('.','current-operand')" class="bottom-left">.</button>
<button onclick = "insert(0,'current-operand')">0</button>
<button class="span-two" onclick="equal('current-operand', 'previous-operand', 'query', 'history')">=</button>
</div>
<!-- History -->
<div class=" p-3 " id="operation-history" data-aos="fade-up">
<h2>History</h2>
<button onclick = "clearhistory('query', 'history')" type="button" class="btn p-1 clear-history">
<img width="30" src="https://img.icons8.com/external-kiranshastry-lineal-color-kiranshastry/64/000000/external-delete-miscellaneous-kiranshastry-lineal-color-kiranshastry.png"/>
</button>
<div id="query" class="display-history"> </div>
<div id="history" class="display-history"> </div>
</div>
</div>
<br>
</div>
<!-- Programmer & History -->
<div id="Programmer">
<!-- Calculator & History-->
<div class="row">
<!-- Calculator -->
<div class="pro-calculator-grid" id="calculator"data-aos="fade-up" >
<div class="output" id="pro-chnge-output">
<div id="pro-previous-operand"> </div>
<div id="pro-current-operand"> </div>
<div id="prog-ops" class="container">
<div class="row ml-2">
<div class="col-md-3">
<select onchange="noconvert('from-number-convert')" name="from-number-con" class="form-control mr-3 number-convert" id="from-number-convert">
<option value="none" disabled selected>Number Conversion From</option>
<option value="decimal">Decimal</option>
<option value="octal">Octal</option>
<option value="hexadec">HexaDecimal</option>
<option value="binary">Binary</option>
</select>
</div>
<div class="col-md-3 ml-2">
<select onchange="noconvert('to-number-convert')" name="to-number-con" class="form-control mr-3 number-convert" id="to-number-convert">
<option value="none" disabled selected>Number Conversion To</option>
<option value="todecimal">Decimal</option>
<option value="tooctal">Octal</option>
<option value="tohexadec">HexaDecimal</option>
<option value="tobinary">Binary</option>
</select>
</div>
</div>
</div>
</div>
<button class="span" onclick = "clearall('pro-current-operand', 'pro-previous-operand') " >C</button>
<button onclick = "backspace('pro-current-operand', 'pro-previous-operand')"><img width="40" class="" src="https://img.icons8.com/ios/64/000000/clear-symbol.png"/></button>
<button onclick = "insert('%','pro-current-operand')" name="opr">%</button>
<button onclick = "insert('A','pro-current-operand')" name="hexad">A</button>
<button onclick = "insert('(','pro-current-operand')" name="opr">(</button>
<button onclick = "insert(')','pro-current-operand')" name="opr">)</button>
<button onclick = "insert('-','pro-current-operand')" name="opr">+/-</button>
<button onclick = "insert('/','pro-current-operand')" name="opr">÷</button>
<button onclick = "insert('B','pro-current-operand')" name="hexad">B</button>
<button onclick = "insert(1,'pro-current-operand')" value="1" name="binar">1</button>
<button onclick = "insert(2,'pro-current-operand')" value="2" name="octa">2</button>
<button onclick = "insert(3,'pro-current-operand')" value="3" name="octa">3</button>
<button onclick = "insert('*','pro-current-operand')" name="opr">*</button>
<button onclick = "insert('C','pro-current-operand')" name="hexad">C</button>
<button onclick = "insert(4,'pro-current-operand')" value="4" name="octa">4</button>
<button onclick = "insert(5,'pro-current-operand')" value="5" name="octa">5</button>
<button onclick = "insert(6,'pro-current-operand')" value="6" name="octa">6</button>
<button onclick = "insert('+','pro-current-operand')" name="opr">+</button>
<button onclick = "insert('D','pro-current-operand')" name="hexad">D</button>
<button onclick = "insert(7,'pro-current-operand')" value="7" name="octa">7</button>
<button onclick = "insert(8,'pro-current-operand')" value="8" name="deci">8</button>
<button onclick = "insert(9,'pro-current-operand')" value="9" name="deci">9</button>
<button onclick = "insert('-','pro-current-operand')" name="opr">-</button>
<button onclick = "insert('E','pro-current-operand')" name="hexad">E</button>
<button onclick = "insert('.','pro-current-operand')" class="bottom-left" name="opr">.</button>
<button onclick = "insert(0,'pro-current-operand')" name="binar">0</button>
<button class="span" onclick="equal('pro-current-operand', 'pro-previous-operand', 'pro-query', 'pro-history')">=</button>
<button style="border-bottom-right-radius: 10px;" onclick = "insert('F','pro-current-operand')" name="hexad">F</button>
</div>
<!-- History -->
<div class=" p-3 " id="pro-operation-history" data-aos="fade-up">
<h2>History</h2>
<button onclick = "clearhistory('pro-query', 'pro-history')" type="button" class="btn p-1 clear-history">
<img width="30" src="https://img.icons8.com/external-kiranshastry-lineal-color-kiranshastry/64/000000/external-delete-miscellaneous-kiranshastry-lineal-color-kiranshastry.png"/>
</button>
<div id="pro-query" class="display-history"> </div>
<div id="pro-history" class="display-history"> </div>
</div>
</div>
<br>
</div>
<!-- Scientific Calculator & history -->
<div id="Scientific">
<!-- Calculator & History-->
<div class="row">
<!-- Calculator -->
<div class="sci-calculator-grid" id="calculator"data-aos="fade-up" >
<div class="output" id="sci-chnge-output">
<div id="sci-previous-operand"> </div>
<div id="sci-current-operand"> </div>
<div id="prog-ops" class="container">
<div class="row ml-2">
<div class="col-md-3">
<select onchange="trigofunctions(this.value)" name="number-con" class="form-control mr-3 number-convert" id="number-convert">
<option value="none" disabled selected>Trigonometry</option>
<option value="sin">sin</option>
<option value="cos">cos</option>
<option value="tan">tan</option>
<option value="sec">sec</option>
<option value="cosec">cosec</option>
<option value="cot">cot</option>
</select>
</div>
<div class="col-md-5">
<select onchange="basicfunctions(this.value)" name="number-con" class="form-control col-md-6 number-convert" id="number-convert">
<option value="none" disabled selected>Functions</option>
<option value="floor">floor</option>
<option value="ceil">ceil</option>
<option value="round">round</option>
<option value="rand">rand</option>
<option value="degree">degree</option>
</select>
</div>
</div>
</div>
</div>
<button class="span" onclick = "clearall('sci-current-operand', 'sci-previous-operand') " >C</button>
<button onclick = "insert(3.14,'sci-current-operand')">Pi</button>
<button onclick = "insert(2.71,'sci-current-operand')">e</button>
<button onclick = "backspace('sci-current-operand', 'sci-previous-operand')"><img width="40" class="" src="https://img.icons8.com/ios/64/000000/clear-symbol.png"/></button>
<button onclick = "scientificfun('log')">log</button>
<button onclick = "scientificfun('1byx')">1/x</button>
<button onclick = "scientificfun('abs')">|X|</button>
<button onclick = "insert('%','sci-current-operand')">mod</button>
<button onclick = "scientificfun('sqrt')">√</button>
<button onclick = "insert('(','sci-current-operand')">(</button>
<button onclick = "insert(')','sci-current-operand')">)</button>
<button onclick = "scientificfun('factorial')">n!</button>
<button onclick = "insert('^','sci-current-operand')">x^y</button>
<button onclick = "insert('/','sci-current-operand')">÷</button>
<button onclick = "insert(1,'sci-current-operand')" value="1">1</button>
<button onclick = "insert(2,'sci-current-operand')" value="2">2</button>
<button onclick = "insert(3,'sci-current-operand')" value="3">3</button>
<button onclick = "scientificfun('10raisex')">10^x</button>
<button onclick = "insert('*','sci-current-operand')">*</button>
<button onclick = "insert(4,'sci-current-operand')" value="4">4</button>
<button onclick = "insert(5,'sci-current-operand')" value="5">5</button>
<button onclick = "insert(6,'sci-current-operand')" value="6">6</button>
<button onclick = "scientificfun('square')">x^2</button>
<button onclick = "insert('+','sci-current-operand')">+</button>
<button onclick = "insert(7,'sci-current-operand')" value="7">7</button>
<button onclick = "insert(8,'sci-current-operand')" value="8">8</button>
<button onclick = "insert(9,'sci-current-operand')" value="9">9</button>
<button onclick = "scientificfun('cube')">x^3</button>
<button onclick = "insert('-','sci-current-operand')">-</button>
<button onclick = "insert('-','sci-current-operand')" class="bottom-left">+/-</button>
<button onclick = "insert(0,'sci-current-operand')">0</button>
<button onclick = "insert('.','sci-current-operand')">.</button>
<button class="span-two" onclick="equal('sci-current-operand', 'sci-previous-operand', 'sci-query', 'sci-history')">=</button>
</div>
<!-- History -->
<div class=" p-3 " id="sci-operation-history" data-aos="fade-up">
<h2>History</h2>
<button onclick = "clearhistory('sci-query', 'sci-history')" type="button" class="btn p-1 clear-history">
<img width="30" src="https://img.icons8.com/external-kiranshastry-lineal-color-kiranshastry/64/000000/external-delete-miscellaneous-kiranshastry-lineal-color-kiranshastry.png"/>
</button>
<div id="sci-query" class="display-history"> </div>
<div id="sci-history" class="display-history"> </div>
</div>
</div>
<br>
</div>
<!-- Currency Converter -->
<div id="currency-con">
<div class="col-md-8 dates currency m-auto">
<label for="from_currency" class="m-3">From</label>
<select id="from_currency" onchange="calculate()" class="form-control">
<option value="AED">AED</option><option value="ARS">ARS</option>
<option value="AUD">AUD</option><option value="BGN">BGN</option>
<option value="BRL">BRL</option><option value="BSD">BSD</option>
<option value="CAD">CAD</option><option value="CHF">CHF</option>
<option value="CLP">CLP</option><option value="CNY">CNY</option>
<option value="COP">COP</option><option value="CZK">CZK</option>
<option value="DKK">DKK</option><option value="DOP">DOP</option>
<option value="EGP">EGP</option><option value="EUR">EUR</option>
<option value="FJD">FJD</option><option value="GBP">GBP</option>
<option value="GTQ">GTQ</option><option value="HKD">HKD</option>
<option value="HRK">HRK</option><option value="HUF">HUF</option>
<option value="IDR">IDR</option><option value="ILS">ILS</option>
<option value="INR">INR</option><option value="ISK">ISK</option>
<option value="JPY">JPY</option><option value="KRW">KRW</option>
<option value="KZT">KZT</option><option value="MXN">MXN</option>
<option value="MYR">MYR</option><option value="NOK">NOK</option>
<option value="NZD">NZD</option><option value="PAB">PAB</option>
<option value="PEN">PEN</option><option value="PHP">PHP</option>
<option value="PKR">PKR</option><option value="PLN">PLN</option>
<option value="PYG">PYG</option><option value="RON">RON</option>
<option value="RUB">RUB</option><option value="SAR">SAR</option>
<option value="SEK">SEK</option><option value="SGD">SGD</option>
<option value="THB">THB</option><option value="TRY">TRY</option>
<option value="TWD">TWD</option><option value="UAH">UAH</option>
<option value="USD" selected>USD</option><option value="UYU">UYU</option>
<option value="VND">VND</option><option value="ZAR">ZAR</option>
</select>
<input type="number" id="from_ammount" oninput="calculate()" class="form-control ml-4" placeholder="0" value=1 />
</div><br>
<div class="col-md-7 middle m-auto">
<button id="exchange">
<img src="https://img.icons8.com/external-flatart-icons-flat-flatarticons/64/000000/external-currency-exchange-taxes-flatart-icons-flat-flatarticons.png"/>
</button>
<div class="rate m-auto" id="rate"></div>
</div>
<div class="col-md-8 dates currency m-auto">
<label for="to_currency" class="m-3">To</label>
<select id="to_currency" onchange="calculate()" class="form-control">
<option value="AED">AED</option><option value="ARS">ARS</option>
<option value="AUD">AUD</option><option value="BGN">BGN</option>
<option value="BRL">BRL</option><option value="BSD">BSD</option>
<option value="CAD">CAD</option><option value="CHF">CHF</option>
<option value="CLP">CLP</option><option value="CNY">CNY</option>
<option value="COP">COP</option><option value="CZK">CZK</option>
<option value="DKK">DKK</option><option value="DOP">DOP</option>
<option value="EGP">EGP</option><option value="EUR">EUR</option>
<option value="FJD">FJD</option><option value="GBP">GBP</option>
<option value="GTQ">GTQ</option><option value="HKD">HKD</option>
<option value="HRK">HRK</option><option value="HUF">HUF</option>
<option value="IDR">IDR</option><option value="ILS">ILS</option>
<option value="INR" selected>INR</option><option value="ISK">ISK</option>
<option value="JPY">JPY</option><option value="KRW">KRW</option>
<option value="KZT">KZT</option><option value="MXN">MXN</option>
<option value="MYR">MYR</option><option value="NOK">NOK</option>
<option value="NZD">NZD</option><option value="PAB">PAB</option>
<option value="PEN">PEN</option><option value="PHP">PHP</option>
<option value="PKR">PKR</option><option value="PLN">PLN</option>
<option value="PYG">PYG</option><option value="RON">RON</option>
<option value="RUB">RUB</option><option value="SAR">SAR</option>
<option value="SEK">SEK</option><option value="SGD">SGD</option>
<option value="THB">THB</option><option value="TRY">TRY</option>
<option value="TWD">TWD</option><option value="UAH">UAH</option>
<option value="USD">USD</option><option value="UYU">UYU</option>
<option value="VND">VND</option><option value="ZAR">ZAR</option>
</select>
<input type="number" id="to_ammount" oninput="calculate()" class="form-control ml-4" placeholder="0" />
</div>
<h4 class="mt-3 text-center" id="con-from-to"></h4>
</div>
<!-- Date Calculation -->
<div id="Date-Difference">
<!-- Calculator & History-->
<div class="m-auto pb-0 date-type">
<div class="">
<select class="form-control date-type" onchange="dropdowndate(this.value)" id="date-dropd">
<option selected value="difference">Difference Between Dates</option>
<option value="calculations">Add/Subtract Dates</option>
</select>
</div>
<div class="pt-1 dates" id="id-dates-diff">
<label for="date-from" class="mt-5">From</label>
<input type="date" id="date-from" class="form-control mb-3 ">
<label for="date-to" class="mt-3">To</label>
<input type="date" id="date-to" onchange="dateDiff()" class="form-control">
<button class="btn mt-4" id="mybutton" onclick="cleardates('date-from')">
Clear
</button>
<h4 class="mt-3 alert alert-info text-center" id="diff-dates"></h4>
</div>
<div class="dates" id="id-date-cal">
<form action="">
<label for="date-cal-from" class="mt-5">From</label>
<input type="date" id="date-cal-from" class="form-control mb-3 ">
<input type="number" class="form-control mb-2" id="opdate" placeholder="Enter Number of Days ex.5"><br>
<label for="date-to" class="mt-1">Operation</label><br>
<input type="radio" id="addop" name="opr" onclick="adddates()" value="add">
<label for="addop">ADD</label>
<input type="radio" id="subop" name="opr" onclick="subdates()" value="sub">
<label for="subop">SUBTRACT</label><br>
<button class="btn mt-4" id="mybutton" onclick="cleardates('date-cal-from')">
Clear
</button>
</form>
<h4 class="mt-3 alert alert-info text-center" id="cal-dates"></h4>
</div>
</div>
<br>
</div>
<!-- JS file -->
<script type="text/javascript" src="script.js"></script>
<script>
AOS.init();
</script>
</body>
</html>
<!-- Calc: <img src="https://img.icons8.com/ios-glyphs/30/000000/calculator.png"/>
Flask: <img src="https://img.icons8.com/external-kiranshastry-lineal-kiranshastry/64/000000/external-flask-advertising-kiranshastry-lineal-kiranshastry.png"/>
Code: <img src="https://img.icons8.com/ios-glyphs/64/000000/code.png"/>
Calendar: <img src="https://img.icons8.com/ios-filled/30/000000/calendar.png"/>
-->