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
Binary file added Calculator/.DS_Store
Binary file not shown.
Binary file added Calculator/Calculator Image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Calculator/c10.jpg
Binary file not shown.
226 changes: 165 additions & 61 deletions Calculator/cal.css
Original file line number Diff line number Diff line change
@@ -1,64 +1,168 @@
body{
background-image: url(c10.jpg);
background-repeat: no-repeat;
height: 100%;
width: 100%;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
background-position: center;
background-size: cover;
}
button{
width: 200px;
height: 50px;
margin: 2px 2px;
background-color: blue;
color: #fff4a7;
border-radius: 20px;
font-weight: bolder;
font-style: italic;
font-size: larger;
}
#outside{
color: white;
border-radius: 5px;
margin: auto;
margin-top: 100px;
width: 1000px;
height: 600px;
padding: 5px;
}
#heading{
margin: auto;
width: 412px;
font-size: xxx-large;
}
#btn{
margin: auto;
margin-top: 20px;
width: 815px;
}
.btn-inside{
width: 900px;
}
#val{
/* border: 2px solid red; */
height: 55px;
width: 783px;
margin-left: 100px;
color: white;
padding-left: 37px;
padding-top: 20px;
font-weight: bolder;
}
#res{
/* border: 2px solid red; */
height: 50px;
width: 783px;
margin-left: 100px;
color: white;
padding-left: 37px;
padding-top: 25px;
font-weight: bolder;
font-size: x-large;
background:
radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 0 2px, transparent 3px),
radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.25) 0 1.5px, transparent 2.5px),
radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.18) 0 1.8px, transparent 3px),
linear-gradient(135deg, #031029 0%, #032457 55%, #0f3d92 100%);
color: #f5f7ff;
}

body::after {
content: "";
position: absolute;
inset: 0;
background:
radial-gradient(circle at 15% 30%, rgba(84, 140, 255, 0.15), transparent 55%),
radial-gradient(circle at 85% 70%, rgba(87, 210, 255, 0.12), transparent 55%);
pointer-events: none;
z-index: 0;
}

#outside {
position: relative;
z-index: 1;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}

.calculator-shell {
width: 320px;
padding: 28px;
border-radius: 36px;
background: linear-gradient(160deg, #0a162c 0%, #14263f 60%, #1b2f50 100%);
box-shadow:
0 30px 50px rgba(2, 10, 32, 0.8),
inset 0 1px 0 rgba(255, 255, 255, 0.08),
inset 0 -8px 14px rgba(0, 0, 0, 0.55);
}

.display {
background: linear-gradient(145deg, #f2f6ff 0%, #dbe6f4 100%);
border-radius: 22px;
padding: 26px 22px;
margin-bottom: 26px;
min-height: 120px;
box-shadow:
inset 0 8px 18px rgba(0, 0, 0, 0.18),
0 12px 22px rgba(0, 0, 0, 0.4);
display: flex;
flex-direction: column;
justify-content: center;
gap: 10px;
}

#val {
color: #51627d;
font-size: 18px;
text-align: right;
min-height: 24px;
word-wrap: break-word;
letter-spacing: 0.12em;
}

#res {
color: #1e2a3f;
font-size: 44px;
font-weight: 700;
text-align: right;
word-wrap: break-word;
line-height: 1;
}

.button-grid {
display: grid;
grid-template-columns: repeat(4, 72px);
grid-auto-rows: 72px;
gap: 16px;
justify-content: center;
}

.btn {
border: none;
border-radius: 50%;
font-size: 22px;
font-weight: 700;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
box-shadow:
0 14px 20px rgba(2, 10, 32, 0.45),
inset 0 4px 8px rgba(255, 255, 255, 0.35);
}

.btn:hover {
transform: translateY(-4px);
box-shadow:
0 18px 26px rgba(2, 10, 32, 0.55),
inset 0 4px 10px rgba(255, 255, 255, 0.4);
}

.btn:active {
transform: translateY(-1px);
box-shadow:
0 8px 14px rgba(2, 10, 32, 0.5),
inset 0 3px 6px rgba(255, 255, 255, 0.28);
filter: brightness(0.95);
}

.btn-blue {
background: radial-gradient(circle at 25% 25%, #69d4ff 0%, #1ea2ff 65%, #0b3fc1 100%);
color: #021232;
}

.btn-green {
background: radial-gradient(circle at 25% 25%, #7cf5b4 0%, #26d97b 60%, #0a7a49 100%);
color: #022012;
}

.btn-yellow {
background: radial-gradient(circle at 25% 25%, #ffe482 0%, #ffc648 60%, #d98c00 100%);
color: #2c1b00;
}

.btn-red {
background: radial-gradient(circle at 25% 25%, #ff9aa2 0%, #ff475a 60%, #b8071d 100%);
color: #2e040a;
}

.btn-slate {
background: radial-gradient(circle at 25% 25%, #96a4c3 0%, #5e6d8c 60%, #2c374d 100%);
color: #f2f6ff;
}

.btn.placeholder {
cursor: default;
opacity: 0.35;
box-shadow: 0 8px 14px rgba(2, 10, 32, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.btn.placeholder:hover,
.btn.placeholder:active {
transform: none;
filter: none;
box-shadow: 0 8px 14px rgba(2, 10, 32, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

button:disabled {
pointer-events: none;
}

62 changes: 29 additions & 33 deletions Calculator/cal.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,36 @@

<body>
<div id="outside">
<h1 id="heading">🖩CALCULATOR🖩</h1>
<div>
<div>
<h1 id="val"> </h1>
<div class="calculator-shell">
<div class="display">
<div id="val"></div>
<div id="res">0</div>
</div>
<div>
<p id="res"></p>
</div>
<div id="btn">
<div class="btn-inside">
<button onclick="adder('1')">1</button>
<button onclick="adder('2')">2</button>
<button onclick="adder('3')">3</button>
<button onclick="adder('*')">*</button>
</div>
<div class="btn-inside">
<button onclick="adder('4')">4</button>
<button onclick="adder('5')">5</button>
<button onclick="adder('6')">6</button>
<button onclick="adder('+')">+</button>
</div>
<div class="btn-inside">
<button onclick="adder('7')">7</button>
<button onclick="adder('8')">8</button>
<button onclick="adder('9')">9</button>
<button onclick="adder('-')">-</button>
</div>
<div class="btn-inside">
<button onclick="clearer()">C</button>
<button onclick="adder('0')">0</button>
<button onclick="compute(1)">=</button>
<button onclick="adder('/')">/</button>
</div>
<button onclick="adder('.')">.</button>
<div class="button-grid">
<button class="btn btn-blue" onclick="clearer()">C</button>
<button class="btn btn-slate" onclick="backspace()">←</button>
<button class="btn btn-yellow" onclick="adder('/')">÷</button>
<button class="btn btn-yellow" onclick="adder('*')">×</button>

<button class="btn btn-blue" onclick="adder('7')">7</button>
<button class="btn btn-green" onclick="adder('8')">8</button>
<button class="btn btn-red" onclick="adder('9')">9</button>
<button class="btn btn-yellow" onclick="adder('-')">-</button>

<button class="btn btn-blue" onclick="adder('4')">4</button>
<button class="btn btn-green" onclick="adder('5')">5</button>
<button class="btn btn-red" onclick="adder('6')">6</button>
<button class="btn btn-yellow" onclick="adder('+')">+</button>

<button class="btn btn-blue" onclick="adder('1')">1</button>
<button class="btn btn-green" onclick="adder('2')">2</button>
<button class="btn btn-red" onclick="adder('3')">3</button>
<button class="btn btn-yellow" onclick="compute(1)">=</button>

<button class="btn btn-blue" onclick="adder('0')">0</button>
<button class="btn btn-green" onclick="adder('.')">.</button>
<button class="btn btn-slate" onclick="adder('00')">00</button>
<button class="btn btn-slate placeholder" disabled aria-hidden="true"></button>
</div>
</div>
</div>
Expand Down
Loading