Skip to content

Commit d4c0b23

Browse files
author
avsudnichnikov
committed
init & add work SkillfactoryCoding#7
0 parents  commit d4c0b23

File tree

5 files changed

+84
-0
lines changed

5 files changed

+84
-0
lines changed

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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?

bjs/07_Number_and_string/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Editor directories and files
2+
.idea
3+
.vscode
4+
*.suo
5+
*.ntvs*
6+
*.njsproj
7+
*.sln
8+
*.sw?

bjs/07_Number_and_string/index.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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>

bjs/07_Number_and_string/script.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+

bjs/07_Number_and_string/style.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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+
}

0 commit comments

Comments
 (0)