This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
66 lines (63 loc) · 2.82 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 lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Calculator</title>
<meta name="description" content="Simple Calculator With Dark Mode." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="assets/calculator.ico">
<link rel="stylesheet" href="styles/dark.css" id="theme" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap" rel="stylesheet">
</head>
<body>
<div class="wrapper">
<div class="container">
<div class="header-container">
<!-- This heading also notifies about the theme change.-->
<h1 id="toast">Calculator</h1>
<div class="top-buttons">
<a href="https://github.com/zxcodes/JavaScript-Calculator">
<img src="assets/GitHubLight.svg" alt="Sun Icon" height="22.5" width="22.5" id="github-icon">
</a>
<button type="button" onclick="changeTheme()" class="theme-button">
<img src="assets/SunIcon.svg" alt="Theme Icon" height="19" width="19" id="theme-icon">
</button>
</div>
</div>
<div class="first-row">
<input type="text" name="result" id="result" placeholder="Result" readonly />
<input type="button" value="C" onclick="result.value=''" id="clear-button" />
</div>
<div class="second-row">
<input type="button" value="1" onclick="liveScreen(1)" />
<input type="button" value="2" onclick="liveScreen(2)" />
<input type="button" value="3" onclick="liveScreen(3)" />
<input type="button" value="+" onclick="liveScreen('+')" />
</div>
<div class="third-row">
<input type="button" value="4" onclick=" liveScreen(4)" />
<input type="button" value="5" onclick=" liveScreen(5)" />
<input type="button" value="6" onclick=" liveScreen(6)" />
<input type="button" value="-" onclick="liveScreen('-')" />
</div>
<div class="fourth-row">
<input type="button" value="7" onclick="liveScreen(7)" />
<input type="button" value="8" onclick="liveScreen(8)" />
<input type="button" value="9" onclick=" liveScreen(9)" />
<input type="button" value="x" onclick="liveScreen('*')" />
</div>
<div class="fifth-row">
<input type="button" value="/" onclick="liveScreen('/')" />
<input type="button" value="0" onclick="liveScreen(0)" />
<input type="button" value="." onclick="liveScreen('.')" />
<input type="button" value="=" onclick="calculate(result.value)" />
</div>
</div>
</div>
<script src="scripts/script.js">
</script>
</body>
</html>