-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
55 lines (53 loc) · 2.63 KB
/
index.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
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
{% load static %}
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fair Weather</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.6.1/slate/bootstrap.min.css" integrity="sha512-vcxGhXoYp4V+Px82NLfIO/aoZjAXBnkVDNaII83WBgEe5bfPGD1wgUu9Av3+IzTh3ilPiEie5Zc21hrk84oBUg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<div class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark">
<div class="container">
<a href="../" class="navbar-brand">Fair Weather</a>
</div>
</div>
<br /><br /> <br>
<div id="jumbotron" class="jumbotron" style="text-align: center; margin-top:-50px">
<h1 class="display-5">Get Current Weather</h1>
<q>After rain comes fair Weather</q><br/><br/>
<img src="{% static 'images/weather-icon.png' %}" class="image" style="width:80px; margin-bottom:-50px; ">
</div>
<nav class="navbar navbar-expand-lg navbar-dark bg-secondary">
<form method="post" class="col-md">
{% csrf_token %}
<div class=" input-group">
<input type="text" class="form-control" name="city" placeholder="Search City ...">
<div class="input-group-btn">
<button type="submit" class="btn btn-light">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-dark bg-light mb-6">
<div class=" card-body">
<h4><span class="badge badge-secondary">Country Code :</span> {{country_code}}</h4>
<h4><span class="badge badge-secondary">Coordinates [X,Y] :</span> {{coordinate}}</h4>
<h4><span class="badge badge-secondary">Temperature in Celsius :</span> {{temp}}</h4>
<h4><span class="badge badge-secondary">Pressure :</span> {{pressure}} </h4>
<h4><span class="badge badge-secondary">Humidity : </span> {{humidity}}</h4>
<h4><span class="badge badge-secondary">Wind Speed : </span> {{windspeed}}</h4>
<h4><span class="badge badge-secondary">Forecast : </span> {{main}} <img
src="http://openweathermap.org/img/w/{{icon}}.png" alt="Image" style="width:70px"></h4>
<h4><span class="badge badge-secondary">Description : </span> {{description}}</h4>
</div>
{% endif %}
</div>
</body>
</html>