-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
101 lines (98 loc) · 3.71 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
<!DOCTYPE html>
<html lang="en" theme="light">
<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" />
<meta name="description"
content="JS calculator with Light Mode & Dark Mode Without eval()! Calculator made with HTML5, CSS3 & JS vanilla" />
<meta name="author" content="David, Toni, Pablosky & Joe" />
<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.0/css/line.css" />
<link type="image/png" rel="icon"
href="https://cdn2.iconfinder.com/data/icons/ios7-inspired-mac-icon-set/512/Calculator_512.png" />
<script src="./calculator.js" type="text/javascript"></script>
<script src="./display.js" type="text/javascript"></script>
<script src="./script.js" type="text/javascript" defer></script>
<title>JS Calculator | Light & Dark Mode Without eval()</title>
</head>
<body>
<div class="main">
<div class="full-content">
<!-- Rounded switch of Theme -->
<div class="modeColour">
<div class="flash-container">
<label class="switch" id="theme">
<input type="checkbox" />
<span class="slider round">
<i class="uil uil-sun" id="sun"></i>
<i class="uil uil-moon" id="moon"></i>
</span>
</label>
</div>
</div>
<div class="links">
<button class="mode-btn" id="evalMode">EVAL</button>
<button class="history-btn hide" onclick="showHistory()">
<i class="uil uil-history icon"></i>
</button>
</div>
<p class="past-result" id="history-result"></p>
<p class="op" id="previous"></p>
<p id="result" class="result"></p>
</div>
<div class="buttons">
<div class="box">
<button id="" class="btn yellow" onclick="display.deleteAll()">
C
</button>
<button class="btn" onclick="display.negate()">±</button>
<button data-btn="operator" class="btn" value="percent">%</button>
<button data-btn="operator" class="btn gray yellow" value="divide">
/
</button>
</div>
<div class="box">
<button data-btn="number" class="btn">7</button>
<button data-btn="number" class="btn">8</button>
<button data-btn="number" class="btn">9</button>
<button data-btn="operator" class="btn gray yellow" value="multiply">
*
</button>
</div>
<div class="box">
<button data-btn="number" class="btn">4</button>
<button data-btn="number" class="btn">5</button>
<button data-btn="number" class="btn">6</button>
<button data-btn="operator" class="btn gray yellow" value="substract">
-
</button>
</div>
<div class="box">
<button data-btn="number" class="btn">1</button>
<button data-btn="number" class="btn">2</button>
<button data-btn="number" class="btn">3</button>
<button data-btn="operator" class="btn gray yellow" value="add">
+
</button>
</div>
<div class="box">
<button data-btn="number" class="btn">.</button>
<button data-btn="number" class="btn">0</button>
<button data-btn="operator" class="btn gray yellow" value="equal">
=
</button>
<button class="btn gray yellow" onclick="display.delete()">
←
</button>
</div>
</div>
<div id="log" class="history hide" name="hide"></div>
<div id="trash" name="hideTrash">
<button onclick="display.deleteHistory()" class="trash">
<i class="uil uil-trash-alt icon"></i>
</button>
</div>
</div>
</body>
</html>