-
Notifications
You must be signed in to change notification settings - Fork 0
/
Weather.html
48 lines (45 loc) · 1.97 KB
/
Weather.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html lang="en">
{%load static%}
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.5.3/cerulean/bootstrap.min.css" integrity="sha512-dQLT/B7byn2LjN/DN4zeBKpwGV6qbidV0XiMRWQOL7TGrV7FkZFldkGG+DGMU+CQnMTcRZlUI7GMWt1j6akNew==" crossorigin="anonymous" />
<title>Weather App</title>
</head>
<body>
<br/><br/><br>
<div id="jumbotron" class="jumbotron" style="text-align: center; margin-top:-50px">
<h1 class="display-4">Weather Desktop App</h1>
<h5>Using Python Language and Django Framework</h5>
</div>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<form method="post" class="col-md">
{%csrf_token%}
<div class="input-group">
<input type="text" class="form-control" name="city" placeholder="Choose Your City">
<div class="input-group-btn">
<button type="submit" class="btn btn-primary">Search</button>
</div>
</div>
</form>
</nav>
<br/><br>
<div class="row">
{% if country_code and coordinate and temp and pressure and humidity %}
<div class="col d-flex justify-content-center">
<div class="card text-white bg-light mb-6">
<div class="card-body">
<h4><span class="badge badge-primary">City:</span> {{city}} </h4>
<h4><span class="badge badge-primary">Country Code:</span> {{country_code}} </h4>
<h4><span class="badge badge-primary">Coordinates [X,Y]:</span> {{coordinate}} </h4>
<h4><span class="badge badge-primary">Temperature:</span> {{temp}} </h4>
<h4><span class="badge badge-primary">Pressure:</span> {{pressure}} </h4>
<h4><span class="badge badge-primary">Humidity:</span> {{humidity}} </h4>
</div>
</div>
</div>
</div>
{%endif%}
</body>
</html>