feat: completed front end basics

This commit is contained in:
Mike 2023-10-03 15:37:18 -04:00
parent d58bef13a6
commit 8b78b5bc3a
2 changed files with 104 additions and 0 deletions

64
calculator/css/style.css Normal file
View file

@ -0,0 +1,64 @@
.container {
width: 500px;
padding: 15px 0;
background-color: #C7B198;
border-radius: 10px;
}
.screen {
height: 100px;
background-color: #DFD3C3;
margin: 10px 18px 15px;
border: 2px solid #596E79;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: flex-end;
font-family: 'Orbitron', sans-serif;
font-weight: 500;
font-size: 4.5em;
padding: 4px;
color: #000;
}
.buttons {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: center;
width: 500px;
}
.btn {
padding: 20px;
border: 2px solid #596E79;
border-radius: 5px;
cursor: pointer;
margin: 5px;
font-size: 25px;
width: 110px;
}
#clear {
background-color: #F1C93B;
}
#action {
background-color: #7EAA92;
}
#zero {
width: 230px;
}
body {
display: flex;
justify-content: center;
align-content: center;
align-items: center;
height: 75vh;
min-height: 500px;
margin-top: 80px;
padding: 10px;
background-color: #F0ECE2;
}

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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=Orbitron:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<title>Calculator</title>
</head>
<body>
<div class="container">
<div class="screen">
0
</div>
<div class="buttons">
<button id="clear" class="btn">A/C</button>
<button id="action" class="btn">+/-</button>
<button id="action" class="btn">%</button>
<button id="action" class="btn">÷</button>
<button class="btn">7</button>
<button class="btn">8</button>
<button class="btn">9</button>
<button id="action" class="btn">*</button>
<button class="btn">4</button>
<button class="btn">5</button>
<button class="btn">6</button>
<button id="action" class="btn">-</button>
<button class="btn">1</button>
<button class="btn">2</button>
<button class="btn">3</button>
<button id="action" class="btn">+</button>
<button id="zero" class="btn">0</button>
<button id="decimal" class="btn">.</button>
<button id="action" class="btn">=</button>
</div>
</div>
</body>
</html>