Skip to content

Commit 9c1062a

Browse files
authored
Merge branch 'main' into main
2 parents 4435810 + e7c56e1 commit 9c1062a

File tree

165 files changed

+6895
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+6895
-113
lines changed

.github/labels.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[
2+
{
3+
"name": "good first issue",
4+
"description": "This issue is good for first timers",
5+
"color": "a9e3ff"
6+
},
7+
{
8+
"name": "🆘 help wanted",
9+
"description": "This issue needs help ! Please help if possible !",
10+
"color": "ff00ff"
11+
},
12+
{
13+
"name": "🟥 Level4 ",
14+
"description": "This issue will be considered as level 4 issue for LGM-SOC 21.Points will be 45.",
15+
"color": "b60205"
16+
},
17+
{
18+
"name": "🟧 Level3 ",
19+
"description": "This issue will be considered as level 3 issue for LGM-SOC 21.Points will be 30.",
20+
"color": "ff9f1c"
21+
},
22+
{
23+
"name": "🟨 Level2 ",
24+
"description": "This issue will be considered as level 2 issue for LGM-SOC 21.Points will be 15",
25+
"color": "ffcc00"
26+
},
27+
{
28+
"name": "🟩 Level1 ",
29+
"description": "This issue will be considered as level 1 issue for LGM-SOC 21.Points will be 10",
30+
"color": "cfda2c"
31+
},
32+
{
33+
"name": "🟪 Level0 ",
34+
"description": "This issue will be considered as level 0 issue for LGM-SOC 21.Points will be 5",
35+
"color": "aa00de"
36+
},
37+
{
38+
"name": " LGMSOC21 ",
39+
"description": "This issue will be considered for LGM-SOC 21",
40+
"color": "d93f0b"
41+
},
42+
{
43+
"name": " 🤩 Up for Grab ",
44+
"description": "This issue will is not assigned ! Grab It !",
45+
"color": "bf00ff"
46+
}
47+
]

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Description
2+
3+
(Describe your project over here.)
4+
5+
### Checklist
6+
7+
- [ ] I've been assigned an issue related to this PR.
8+
- [ ] I've used beautifiers.
9+
- [ ] I've added my Project's name and description to `Index.md`
10+
- [ ] I've made a README.md file for my Project.
11+
- [ ] The README.md file of my projrct contains Project title, Description, Use of project, Set up, Stack used and Output (Screenshots).
12+
13+
## Related Issues or Pull Requests number
14+
15+
(Write your answer here.)

.github/workflows/issue-label.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Default
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Label Syncer
11+
uses: micnncim/[email protected]
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GITHUB_REPOSITORY: ${{ github.repository }}
15+
with:
16+
manifest: .github/labels.json
17+
prune: false

BMI Calculator (Flask)/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# BMI Calculator using Flask
2+
3+
A simple calculator used to calculate the Body Mass Index (BMI).
4+
5+
## Technologies used:
6+
7+
- HTML
8+
- CSS
9+
- Python
10+
- Flask
11+
12+
## How to use:
13+
14+
1. Fork and clone [this](https://github.com/Ayushparikh-code/Web-dev-mini-projects) project.
15+
2. In your command prompt, navigate to **Web-dev-mini-projects/BMI Calculator (Flask)**.
16+
3. Run this app using the command `python app.py`.
17+
4. Now, navigate to `http://127.0.0.1:5000/` in your web browser to use the calculator.
18+
19+
## Screenshot
20+
21+
<img src="https://imgur.com/PoJcIsR.png"/>

BMI Calculator (Flask)/app.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from flask import Flask, render_template, request
2+
3+
# declare the app
4+
app = Flask(__name__)
5+
6+
# start an app route
7+
@app.route("/")
8+
def main():
9+
return render_template("index.html")
10+
11+
12+
# route for bmi calculation result
13+
@app.route("/bmi", methods=["GET", "POST"])
14+
def calculate():
15+
try:
16+
w = float(request.form.get("weight"))
17+
h = float(request.form.get("height"))
18+
if w and h:
19+
bmi = round(w / ((h / 100) ** 2), 3)
20+
return render_template("index.html", bmi=bmi)
21+
except ValueError as error:
22+
error = "Please enter all the values"
23+
return render_template("index.html", error=error)
24+
25+
26+
if __name__ == "__main__":
27+
app.run(debug=True)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
body {
2+
font-size: 20px;
3+
text-align: center;
4+
background: #ace1af;
5+
font-family: "Quicksand", sans-serif;
6+
}
7+
8+
h1,
9+
h2 {
10+
text-align: center;
11+
padding-top: 25px;
12+
font-style: bold;
13+
}
14+
15+
table,
16+
th,
17+
td {
18+
border: 2px solid black;
19+
text-align: center;
20+
width: 50%;
21+
margin-left: auto;
22+
margin-right: auto;
23+
}
24+
25+
th {
26+
height: 45px;
27+
}
28+
29+
#calc_btn,
30+
#ht,
31+
#wt {
32+
padding: 7px;
33+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<!-- Required meta tags -->
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<!-- Bootstrap CSS -->
8+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
9+
<!-- Stylesheets-->
10+
<link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='style.css') }}" />
11+
<!--Google Fonts-->
12+
<link rel="preconnect" href="https://fonts.googleapis.com">
13+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
14+
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@500&display=swap" rel="stylesheet">
15+
<title>BMI Calculator</title>
16+
</head>
17+
<body>
18+
<h1>
19+
<u>BMI Calculator using Flask</u>
20+
</h1>
21+
<br>
22+
<!--Calculator starts-->
23+
<div class="container text-center">
24+
<div class="row">
25+
<div class="col-sm">
26+
<form action="/bmi" method="POST">
27+
<label for="height" id="ht">Height</label>
28+
<input type="text" name="height" class="u-full-width" placeholder="Height (in cm)" id="ht" />
29+
<br>
30+
<label for="weight" id="wt">Weight</label>
31+
<input type="text" name="weight" class="u-full-width" placeholder="Weight (in kg)" id="wt" />
32+
<br>
33+
<br>
34+
<input type="submit" value="Calculate" id="calc_btn" /> {% if bmi %} <div class="alert">
35+
<p>Your BMI is {{bmi}}</p>
36+
</div> {% else %} <div class="alert">
37+
<p>{{error}}</p>
38+
</div> {% endif %}
39+
</form>
40+
</div>
41+
</div>
42+
</div>
43+
<!--Calculator ends-->
44+
<hr>
45+
<!--BMI values chart-->
46+
<div class="container text-center">
47+
<div class="row">
48+
<div class="col-sm">
49+
<h2>
50+
<u>BMI Chart</u>
51+
</h2>
52+
<br>
53+
<table>
54+
<tr>
55+
<th>BMI Value</th>
56+
<th>Category</th>
57+
</tr>
58+
<tr>
59+
<td>
60+
<18.5 </td>
61+
<td>Underweight</td>
62+
</tr>
63+
<tr>
64+
<td>18.5 - 24.9</td>
65+
<td>Normal weight</td>
66+
</tr>
67+
<tr>
68+
<td>25 - 29.9</td>
69+
<td>Overweight</td>
70+
</tr>
71+
<tr>
72+
<td>>=30</td>
73+
<td>Obesity</td>
74+
</tr>
75+
</table>
76+
</div>
77+
</div>
78+
</div>
79+
</body>
80+
</html>

Basic Contact Form/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<h1>Basic Contact Form</h1>
2+
3+
<p>A Basic Contact Form written in HTML, CSS and JAVASCRIPT .</p>
4+
5+
### Use of the Project:
6+
7+
<p>This basic contact form can be added to any website to make it attractive. </p>
8+
9+
<h3>Used Technologies</h3>
10+
<ul>
11+
<li>HTML5</li>
12+
<li>CSS3</li>
13+
<li>JavaScript</li>
14+
</ul>
15+
16+
#### Steps to Use:
17+
18+
---
19+
20+
- Download or clone the repository
21+
22+
```
23+
git clone https://github.com/Ayushparikh-code/Web-dev-mini-projects.git
24+
```
25+
26+
- Go to the directory
27+
- Run the index.html file
28+
- Result is here!!!
29+
30+
<h3> Screenshot:</h3>
31+
<img src="https://user-images.githubusercontent.com/66966120/125250300-ec32c500-e2aa-11eb-8a50-31d4cf729d72.png" alt="Screenshot (19)" style="max-width:100%;">
32+
33+
34+
<h3> Demo </h3>
35+
36+
<a href="https://sonamgupta136.github.io/Basic-Contact-Form.io/">Demo</a>
37+
38+
<br>
39+

Basic Contact Form/app.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
let sendButton = document.getElementById('send');
2+
let resetButton = document.getElementById('reset');
3+
let form = document.getElementById('form');
4+
5+
6+
form.addEventListener('submit', function (e) {
7+
e.preventDefault();
8+
})
9+
10+
resetButton.addEventListener('click', function () {
11+
let name = document.getElementById('name');
12+
let email = document.getElementById('email');
13+
let message = document.getElementById('message');
14+
15+
name.value = '';
16+
email.value = '';
17+
message.value = '';
18+
})
19+
20+
sendButton.addEventListener('click', function (e) {
21+
let name = document.getElementById('name');
22+
let email = document.getElementById('email');
23+
let message = document.getElementById('message');
24+
25+
name = name.value;
26+
localStorage.setItem('name', name);
27+
28+
email = email.value;
29+
localStorage.setItem('email', email);
30+
31+
message = message.value;
32+
localStorage.setItem('message', message);
33+
34+
})
35+

Basic Contact Form/index.html

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<link rel="stylesheet" href="style.css">
9+
<title>Contact Form</title>
10+
</head>
11+
12+
<body>
13+
<form id="form">
14+
<h1>Please Contact me</h1>
15+
<div>
16+
<label for="name">Name</label></br>
17+
<input id="name" name="name">
18+
</div>
19+
<div>
20+
<label for="email">Email</label><br>
21+
<input type="email" id="email" name="email">
22+
</div>
23+
<div>
24+
<label for="message">Message</label><br>
25+
<textarea id="message" name="message"></textarea>
26+
</div>
27+
<div id="buttons-row">
28+
<div class="buttons">
29+
<button type="submit" id="send">Send</button>
30+
</div>
31+
<div class="buttons">
32+
<button id="reset">Reset</button>
33+
</div>
34+
</div>
35+
</form>
36+
<script src="app.js"></script>
37+
</body>
38+
39+
</html>
40+

0 commit comments

Comments
 (0)