forked from zxcodes/Calculator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
66 lines (62 loc) · 2.95 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Calculator</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="styles/light.css" id="theme" />
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300&display=swap" rel="stylesheet" />
</head>
<body>
<div class="wrapper">
<div class="container">
<h1>Calculator</h1>
<div class="first-row">
<input type="text" name="result" class="result" id="result" value="" placeholder="Result" readonly />
<input type="button" value="C" onclick="clearScreen()" id="clear" />
<input type="button" value="+" onclick="liveScreen('+')" />
</div>
<div class="second-row">
<input type="button" value="2nd" onclick="second()"/>
<input type="button" value="1" onclick="liveScreen(1)" id="one" />
<input type="button" value="2" onclick="liveScreen(2)" id="two" />
<input type="button" value="3" id="three" onclick="liveScreen(3)" />
<input type="button" value="-" onclick="liveScreen('-')" />
</div>
<div class="third-row">
<input type="button" id="cos" value="cos()" onclick="trigo('cos')"/>
<input type="button" value="4" id="four" onclick="liveScreen(4)" />
<input type="button" value="5" id="five" onclick="liveScreen(5)" />
<input type="button" value="6" id="six" onclick="liveScreen(6)" />
<input type="button" value="x" onclick="liveScreen('*')" />
</div>
<div class="fourth-row">
<input type="button" id="sin" value="sin()" onclick="trigo('sin')"/>
<input type="button" value="7" id="seven" onclick="liveScreen(7)" />
<input type="button" value="8" id="eight" onclick="liveScreen(8)" />
<input type="button" value="9" id="nine" onclick="liveScreen(9)" />
<input type="button" value="/" onclick="liveScreen('/')" />
</div>
<div class="fifth-row">
<input type="button" id="tan" value="tan()" onclick="trigo('tan')"/>
<input type="button" id="sqrt" value="√" onclick="sqr()"/>
<input type="button" value="0" id="zero" onclick="liveScreen(0)" />
<input type="button" value="," class="dot" onclick="liveScreen('.')" />
<input type="button" value="=" onclick="result.value = eval(result.value)" />
</div>
<div class="bottom-buttons">
<a href="https://github.com/handyopensource/Calculator"><i class="fab fa-github"></i>
Source</a>
<button onclick="changeTheme()" id="dark-mode">
Dark Mode 🌙
</button>
</div>
</div>
</div>
<!-- Fontawesome Script -->
<script src="https://kit.fontawesome.com/f28b055962.js" crossorigin="anonymous"></script>
<script src="scripts/script.js"></script>
</body>
</html>