-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
151 lines (148 loc) · 7.59 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
<!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">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="src/style.css">
<title>Desk calculator</title>
<script src="src/calculator.js"></script>
</head>
<body>
<div id="fb-root"></div>
<script>(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.12';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="w3-container w3-teal">
<div class="w3-center">
<h1>Simple desk calculator</h1>
</div>
</div>
<div id="main-container" class="w3-container">
<!-- form for the calculator -->
<form class="w3-container">
<label>Display area:</label>
<input type="text" title="displays the inputs and the results" id="io-display" class="w3-input" style="font-size: 30px;">
<!-- keyboard of the calculator -->
<div class="w3-row">
<div class="w3-col m3 l3 s3">
<button type="button" id="button-six" class="w3-btn w3-blue-grey w3-block w3-round-large">6</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-seven" class="w3-btn w3-blue-grey w3-block w3-round-large">7</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-eight" class="w3-btn w3-blue-grey w3-block w3-round-large">8</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-nine" class="w3-btn w3-blue-grey w3-block w3-round-large">9</button>
</div>
</div>
<div class="w3-row">
<div class="w3-col m3 l3 s3">
<button type="button" id="button-two" class="w3-btn w3-blue-grey w3-block w3-round-large">2</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-three" class="w3-btn w3-blue-grey w3-block w3-round-large">3</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-four" class="w3-btn w3-blue-grey w3-block w3-round-large">4</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-five" class="w3-btn w3-blue-grey w3-block w3-round-large">5</button>
</div>
</div>
<div class="w3-row">
<div class="w3-col m3 l3 s3">
<button type="button" id="button-zero" class="w3-btn w3-blue-grey w3-block w3-round-large">0</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-one" class="w3-btn w3-blue-grey w3-block w3-round-large">1</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-minus" class="w3-btn w3-red w3-block w3-round-large">
<span style="font-size:140%;">−</span>
</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-plus" class="w3-btn w3-red w3-block w3-round-large">
<span style="font-size:140%;">+</span>
</button>
</div>
</div>
<div class="w3-row">
<div class="w3-col m3 l3 s3">
<button type="button" id="button-div" class="w3-btn w3-red w3-block w3-round-large">
<span style="font-size:140%;">÷</span>
</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-mul" class="w3-btn w3-red w3-block w3-round-large">
<span style="font-size:140%;">×</span>
</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-sign" class="w3-btn w3-red w3-block w3-round-large">
<span style="font-size:140%;">±</span>
</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-calc" class="w3-btn w3-black w3-block w3-round-large">
<span style="font-size:140%;">=</span>
</button>
</div>
</div>
<div class="w3-row">
<div class="w3-col m3 l3 s3">
<button type="button" title="clears the input" id="button-clear" class="w3-btn w3-black w3-block w3-round-large">C</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-square" class="w3-btn w3-purple w3-block w3-round-large">x²</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-obracket" class="w3-btn w3-red w3-block w3-round-large">
<span style="font-size:140%;">⁽</span>
</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" id="button-cbracket" class="w3-btn w3-red w3-block w3-round-large">
<span style="font-size:140%;">⁾</span>
</button>
</div>
</div>
<div class="w3-row">
<div class="w3-col m3 l3 s3">
<button type="button" id="button-sroot" class="w3-btn w3-purple w3-block w3-round-large">
<span style="font-size:140%;">√</span>
</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" title="calculates the power; after that click on = " id="button-power" class="w3-btn w3-purple w3-block w3-round-large">
<span style="font-size:140%;"> x^y</span>
</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" title="removes the last digit of the input." id="button-shift" class="w3-btn w3-black w3-block w3-round-large">
<span style="font-size:140%;">→</span>
</button>
</div>
<div class="w3-col m3 l3 s3">
<button type="button" title="decimal point" id="button-point" class="w3-btn w3-black w3-block w3-round-large">
<span style="font-size:140%;">⚫</span>
</button>
</div>
</div>
</form>
</div>
<div class="w3-container w3-teal">
<div class="fb-like" data-href="http://christianbender.github.io/desk-calculator" data-layout="standard" data-action="like"
data-size="large" data-show-faces="true" data-share="true"></div>
</div>
</body>
</html>