From 5a2a684ec8b02f33d76dda743d57ebd5eb87ddc7 Mon Sep 17 00:00:00 2001
From: Kashishgarg248 <153218193+Kashishgarg248@users.noreply.github.com>
Date: Wed, 29 May 2024 19:13:38 +0530
Subject: [PATCH 01/11] Addition of Reset Button in 2-D Distance Calculator
---
Calculators/2D-Distance-Calculator/index.html | 3 +++
Calculators/2D-Distance-Calculator/script.js | 11 +++++++++++
2 files changed, 14 insertions(+)
diff --git a/Calculators/2D-Distance-Calculator/index.html b/Calculators/2D-Distance-Calculator/index.html
index 9b8e36ec4..112b01cdd 100644
--- a/Calculators/2D-Distance-Calculator/index.html
+++ b/Calculators/2D-Distance-Calculator/index.html
@@ -22,7 +22,10 @@
2D Distance Calculator
+
+
+
diff --git a/Calculators/2D-Distance-Calculator/script.js b/Calculators/2D-Distance-Calculator/script.js
index 2db5a478d..bc0be6649 100644
--- a/Calculators/2D-Distance-Calculator/script.js
+++ b/Calculators/2D-Distance-Calculator/script.js
@@ -16,4 +16,15 @@ function calculateDistance() {
// Display the result
document.getElementById('result').innerHTML = 'Distance: ' + distance.toFixed(2);
+
+ //To Reset
+
+ document.getElementById('resetButton').addEventListener('click',function(resetForm){
+ document.getElementById('x1').value='';
+ document.getElementById('y1').value='';
+ document.getElementById('x2').value='';
+ document.getElementById('y2').value='';
+ document.getElementById('result').innerHTML='';
+
+ })
}
From a78c12f11fef1b13c103483a1579d51f4872fc1b Mon Sep 17 00:00:00 2001
From: Kashishgarg248 <153218193+Kashishgarg248@users.noreply.github.com>
Date: Fri, 31 May 2024 18:04:07 +0530
Subject: [PATCH 02/11] Added Responsive to Split Bill Calculator
---
Calculators/Bill-Split-Calculator/style.css | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Calculators/Bill-Split-Calculator/style.css b/Calculators/Bill-Split-Calculator/style.css
index 2b517c1af..167df6e4f 100644
--- a/Calculators/Bill-Split-Calculator/style.css
+++ b/Calculators/Bill-Split-Calculator/style.css
@@ -5,6 +5,10 @@ body {
font-family: "Open Sans", sans-serif;
font-size: x-large;
background-image: linear-gradient(to right, #9796f0, #fbc7d4);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
}
.container {
@@ -15,7 +19,7 @@ body {
}
.calculator {
- width: 25%;
+ width: 100%;
background-color: #413543;
color: #F0EB8D;
padding: 20px;
@@ -23,6 +27,7 @@ body {
text-align: center;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 1.2);
+ max-width: 400px;
}
label {
From 2da67fd349153db5ef99c25f89d41207ab772faf Mon Sep 17 00:00:00 2001
From: Rakesh Roshan
Date: Fri, 31 May 2024 19:46:50 +0530
Subject: [PATCH 03/11] Update index.html
---
Calculators/2D-Distance-Calculator/index.html | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/Calculators/2D-Distance-Calculator/index.html b/Calculators/2D-Distance-Calculator/index.html
index 112b01cdd..149c412d3 100644
--- a/Calculators/2D-Distance-Calculator/index.html
+++ b/Calculators/2D-Distance-Calculator/index.html
@@ -22,13 +22,11 @@ 2D Distance Calculator
-
+
-
-