-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (56 loc) · 2.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A simple calculator website created by Brajesh Kumar.">
<meta name="author" content="Brajesh Kumar">
<meta property="og:url" content="https://brajesh3.github.io/Simple_Calculator">
<meta name="keywords" content="calculator, simple calculator, online calculator">
<title>Simple Calculator</title>
<link rel="icon" href="calculator.png">
<link rel="stylesheet" href="index.css">
<script src="index.js"></script>
</head>
<!-- Created by Brajesh -->
<body data-theme="dark"/>
<div id="wrapper">
<header>
<div class="icon" data-icon="calc-icon">
<svg xmlns="http://www.w3.org/2000/svg" height="32" viewBox="0 0 24 24" width="32"><g><rect fill="none" height="24" width="24"/></g><g><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M13.03,7.06L14.09,6l1.41,1.41 L16.91,6l1.06,1.06l-1.41,1.41l1.41,1.41l-1.06,1.06L15.5,9.54l-1.41,1.41l-1.06-1.06l1.41-1.41L13.03,7.06z M6.25,7.72h5v1.5h-5 V7.72z M11.5,16h-2v2H8v-2H6v-1.5h2v-2h1.5v2h2V16z M18,17.25h-5v-1.5h5V17.25z M18,14.75h-5v-1.5h5V14.75z" fill="currentColor"/></g></svg>
</div>
<h3>CALCULATOR</h1>
<div class="switch" onclick="toggleTheme()"></div>
</header>
<div class="screen" id="scr" data-show-result="false">
<div class="exp" id="exp"></div>
<div class="result" id="result"></div>
</div>
<div class="history-panel">
<div class="head">
<div class="icon" data-icon="history-icon"></div>
<div>HISTORY</div>
</div>
<div class="body"></div>
</div>
<div class="panel" data-show="false">
<div class="handle" onclick="togglePanel()"></div>
<div class="action">
<div class="key clear" onclick="press('back')">DEL</div>
<div class="key on" onclick="press('on')">ON</div>
</div>
<div class="keypad"></div>
</div>
</div>
<!-- SHORTHANDS -->
<script>
const doc = document ;
const qs = q => doc.querySelector(q);
const qsa = q => doc.querySelectorAll(q);
const ce = q => doc.createElement(q);
function addEventHooks(o){
o.on = (...p) => o.addEventListener(...p);
o.off = (...p) => o.removeEventListener(...p);
}
</script>
</html>