File tree Expand file tree Collapse file tree 5 files changed +84
-0
lines changed Expand file tree Collapse file tree 5 files changed +84
-0
lines changed Original file line number Diff line number Diff line change
1
+ .DS_Store
2
+ node_modules
3
+ /dist
4
+
5
+ # local env files
6
+ .env.local
7
+ .env. * .local
8
+
9
+ # Log files
10
+ npm-debug.log *
11
+ yarn-debug.log *
12
+ yarn-error.log *
13
+ pnpm-debug.log *
14
+
15
+ # Editor directories and files
16
+ .idea
17
+ .vscode
18
+ * .suo
19
+ * .ntvs *
20
+ * .njsproj
21
+ * .sln
22
+ * .sw ?
Original file line number Diff line number Diff line change
1
+ # Editor directories and files
2
+ .idea
3
+ .vscode
4
+ * .suo
5
+ * .ntvs *
6
+ * .njsproj
7
+ * .sln
8
+ * .sw ?
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < title > Калькулятор</ title >
6
+ < link rel ="stylesheet " href ="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css "
7
+ integrity ="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh " crossorigin ="anonymous ">
8
+ < link href ="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap " rel ="stylesheet ">
9
+ < link rel ="stylesheet " href ="style.css " type ="text/css "/>
10
+ </ head >
11
+ < body >
12
+ < div class ="container ">
13
+ < div class ="row calc-row align-items-center ">
14
+ < div class ="col col-md-4 offset-md-4 ">
15
+ < div class ="form-group ">
16
+ < div class ="card " id ="calc ">
17
+ < div class ="card-body ">
18
+ < input class ="form-control input-window " id ="inputWindow " value ="">
19
+ < div class ="row no-gutters ">
20
+ < div class ="col ">
21
+ < button class ="btn btn-outline-danger form-control " id ="btn_clr "> C</ button >
22
+ </ div >
23
+ </ div >
24
+ </ div >
25
+
26
+ </ div >
27
+ </ div >
28
+ </ div >
29
+ </ div >
30
+ </ div >
31
+ < script src ="script.js "> </ script >
32
+ </ body >
33
+ </ html >
Original file line number Diff line number Diff line change
1
+ let lastOperand = 0 ;
2
+ let operation = null ;
3
+
4
+ const inputWindow = document . getElementById ( 'inputWindow' ) ;
5
+
6
+
7
+ document . getElementById ( 'btn_clr' ) . addEventListener ( 'click' , function ( ) {
8
+ lastOperand = 0 ;
9
+ operation = null ;
10
+ inputWindow . value = '' ;
11
+ } )
12
+
Original file line number Diff line number Diff line change
1
+ .calc-row {
2
+ height : 100vh ;
3
+ font-family : 'Share Tech Mono' , monospace;
4
+ }
5
+
6
+ .input-window {
7
+ text-align : end;
8
+ font-size : x-large;
9
+ }
You can’t perform that action at this time.
0 commit comments