Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
293 changes: 293 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,293 @@
@font-face {
font-family: digital;
src: url('/imgs/digital.ttf');
}

body {
position: fixed;
background-image: url("/imgs/calculator.jpg");
background-repeat: no-repeat;
}

#display {
position: fixed;
height: 85px;
width: 295px;
left: 455px;
top: 156px;
border-radius: 5px;
font-size: 50px;
font-family: "digital";
word-wrap: break-word;
text-shadow: 4px 4px #4D834D;
overflow-wrap: break-word;
overflow-y: hidden;
line-height: 40px;
}

#seven {
position: fixed;
height: 42px;
width: 60px;
left: 420px;
top: 320px;
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#eight {
position: fixed;
height: 42px;
width: 60px;
left: 488px;
top: 320px;
transform: skew(2deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#nine {
position: fixed;
height: 42px;
width: 60px;
left: 556px;
top: 320px;
transform: skew(3deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#four {
position: fixed;
height: 42px;
width: 62px;
left: 420px;
top: 368px;
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#five {
position: fixed;
height: 42px;
width: 62px;
left: 490px;
top: 367px;
transform: skew(1.5deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#six {
position: fixed;
height: 42px;
width: 62px;
left: 558px;
top: 367px;
transform: skew(3deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#one {
position: fixed;
height: 42px;
width: 62px;
left: 420px;
top: 415px;
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#two {
position: fixed;
height: 42px;
width: 62px;
left: 491px;
top: 415px;
transform: skew(1.5deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#three {
position: fixed;
height: 42px;
width: 62px;
left: 562px;
top: 414px;
transform: skew(3deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#zero {
position: fixed;
height: 44px;
width: 64px;
left: 420px;
top: 464px;
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#zeroZero {
position: fixed;
height: 44px;
width: 63px;
left: 493px;
top: 463px;
transform: skew(1deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#deci {
position: fixed;
height: 43px;
width: 64px;
left: 564px;
top: 462px;
transform: skew(3deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
}

#divide {
position: fixed;
height: 39px;
width: 60px;
left: 645px;
top: 321px;
transform: skew(5deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
background-color: #F0DD0A;
}

#multiply {
position: fixed;
height: 42px;
width: 61px;
left: 649px;
top: 365px;
transform: skew(5deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
background-color: #F0DD0A;
}

#minus {
position: fixed;
height: 42px;
width: 62px;
left: 653px;
top: 412px;
transform: skew(5deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
background-color: #F0DD0A;
}

#plus {
position: fixed;
height: 42px;
width: 65px;
left: 657px;
top: 461px;
transform: skew(5deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
background-color: #F0DD0A;
}

#equal {
position: fixed;
height: 88px;
width: 61px;
left: 735px;
top: 318px;
transform: skew(9deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
background-color: #E31E1E;
}

#clear {
position: fixed;
height: 42px;
width: 63px;
left: 744px;
top: 412px;
transform: skew(9deg);
font-size: 30px;
font-weight: bold;
border-radius: 5px;
background-color: #E31E1E;
}

#balance {
position: fixed;
height: 43px;
width: 65px;
left: 750px;
top: 460px;
transform: skew(9deg);
font-size: 22px;
font-weight: bold;
border-radius: 5px;
background-color: #39AD36;
}

#deposit{
position: fixed;
height: 90px;
width: 195px;
left: 205px;
top: 340px;
transform: skew(-2deg);
font-size: 22px;
font-weight: bold;
border-radius: 5px;
background-color: #39AD36;
}

#withdraw{
position: fixed;
height: 92px;
width: 195px;
left: 200px;
top: 431px;
transform: skew(-2.5deg);
font-size: 22px;
font-weight: bold;
border-radius: 5px;
background-color: #39AD36;
}

#fck {
position: fixed;
height: 4px;
width: 500px;
left: 695px;
top: 545px;
font-size: 10px;
font-family: arial;
}
Binary file added imgs/calculator.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/digital.ttf
Binary file not shown.
Binary file added imgs/showmethemoney.wav
Binary file not shown.
47 changes: 47 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="./css/style.css" rel="stylesheet" media="screen">
<title>"The Gang Makes a Calculator"</title>
</head>
<body>
<div id ="fck">fck yeh we smart as hell bruh</div>
<div id="display"></div>
<button id="seven">7</button>
<button id="eight">8</button>
<button id="nine">9</button>
<br><br>
<button id="four">4</button>
<button id="five">5</button>
<button id="six">6</button>
<br><br>
<button id="one">1</button>
<button id="two">2</button>
<button id="three">3</button>
<br><br>
<button id="zero">0</button>
<button id="zeroZero">00</button>
<button id="deci">.</button>
<br><br>
<button id="divide">÷</button>
<button id="multiply">×</button>
<button id="minus">-</button>
<button id="plus">+</button>
<button id="equal">=</button>
<button id="clear">C</button>
<button id="balance">BAL</button>
<button id="deposit">DEPOSIT</button>
<button id="withdraw">WITHDRAW</button>



<script src= "./js/calculator.js"></script>
<script src= "./js/cash_register.js"></script>

<audio id="audio" src="imgs/showmethemoney.wav"></audio>


</body>

</html>
49 changes: 49 additions & 0 deletions js/calculator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

var total = 0;
// var _memory = 0;

function Calculator(){


function load(x){
total += x;
return total;
}
function add(x){
total += x;
}
function subtract(x){
total -= x;
}
function multiply(x){
total *= x;
}
function divide(x){
total /= x;
}
function deleteTotal(){
total = 0;

}
// function saveMemory(){
// _memory = total;
// }
// function recallMemory() {
// return _memory;
// }
function returnTotal(){
return total;
}

return{
add: add,
subtract: subtract,
multiply: multiply,
divide: divide,
load: load,
// saveMemory: saveMemory,
// recallMemory: recallMemory,
deleteTotal: deleteTotal,
returnTotal: returnTotal
};
}
Loading