Skip to content

Commit

Permalink
Addec changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakesh9100 authored Dec 28, 2024
1 parent 35ee622 commit bf6e520
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
3 changes: 3 additions & 0 deletions Calculators/Ballistic-Coefficient-Calculator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ Ballistic coefficient calculator is a tool used in ballistics to determine the b

## Screenshots :-

![image](https://github.com/user-attachments/assets/bbb67e72-4630-4d26-8fe4-3c1e376434af)

![image](https://github.com/user-attachments/assets/9ec517fb-886e-496d-8186-3b667f0b4923)
7 changes: 5 additions & 2 deletions Calculators/Ballistic-Coefficient-Calculator/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ballistic Coefficient Calculator</title>
<link rel="stylesheet" href="./style.css">
<title>Ballistic Coefficient Calculator</title>
</head>

<body>
<div class="calculator">
<h1>Ballistic Coefficient Calculator</h1>
Expand Down Expand Up @@ -45,4 +47,5 @@ <h1>Ballistic Coefficient Calculator</h1>

<script src="./script.js"></script>
</body>
</html>

</html>
13 changes: 7 additions & 6 deletions Calculators/Ballistic-Coefficient-Calculator/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ function calculateBallisticDetails() {
<p>Wind Drift: ${windDrift.toFixed(2)} m</p>
`;
}

function moveToNextField(event, nextFieldId) {
if (event.key === 'Enter') {
event.preventDefault(); // Prevent form submission on Enter
const nextField = document.getElementById(nextFieldId);
if (nextField) {
nextField.focus(); // Focus the next input field
}
event.preventDefault(); // Prevent form submission on Enter
const nextField = document.getElementById(nextFieldId);
if (nextField) {
nextField.focus(); // Focus the next input field
}
}
}
}
10 changes: 5 additions & 5 deletions Calculators/Ballistic-Coefficient-Calculator/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #0d1117;
background-image:"./assets/background.png";
color:white;
height: 100%;
min-height: 100vh;
color: white;
background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.calculator {
Expand Down Expand Up @@ -68,7 +68,7 @@ body {
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group input:focus + .info {
.form-group input:focus+.info {
display: block;
}

Expand Down
12 changes: 6 additions & 6 deletions calculators.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@
"link": "./Calculators/Averages-Calculator/index.html",
"source": "https://github.com/Rakesh9100/CalcDiverse/tree/main/Calculators/Averages-Calculator"
},
{
"title": "Ballistic-Coefficient-Calculator",
"description": "Calculates the ballaistic coefficient and trajectory related details",
"link": "./Calculators/Ballistic-Coefficient-Calculator/index.html",
"source": "https://github.com/Rakesh9100/CalcDiverse/tree/main/Calculators/Ballistic-Coefficient-Calculator"
},
{
"title": "BMI Calculator",
"description": "Calculates the Body Mass Index of a person using Height & Weight.",
Expand All @@ -197,6 +191,12 @@
"link": "./Calculators/BSA-Calculator/index.html",
"source": "https://github.com/Rakesh9100/CalcDiverse/tree/main/Calculators/BSA-Calculator"
},
{
"title": "Ballistic Coefficient Calculator",
"description": "Calculates the ballistic coefficient and trajectory related details.",
"link": "./Calculators/Ballistic-Coefficient-Calculator/index.html",
"source": "https://github.com/Rakesh9100/CalcDiverse/tree/main/Calculators/Ballistic-Coefficient-Calculator"
},
{
"title": "Banker's Algorithm Calculator",
"description": "Calculates the safety sequence for resource allocation.",
Expand Down

0 comments on commit bf6e520

Please sign in to comment.