-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforecast.html
More file actions
135 lines (120 loc) · 5.7 KB
/
forecast.html
File metadata and controls
135 lines (120 loc) · 5.7 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Weather App</title>
<!-- Oswald google fonts -->
<link href="https://fonts.googleapis.com/css?family=Oswald:400,700" rel="stylesheet">
<!-- Font awesome cdn-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top" id="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand navbar-link" href="index.html">
<span id="brand"><i class="fa fa-sun-o" aria-hidden="true"></i> WEATHER APP</span>
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="current.html">Current</a></li>
<li><a href="forecast.html">Forecast</a></li>
<li><a href="https://openweathermap.org/" target="_blank">Open Weather Map</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="jumbotron current">
<div class="container">
<h2 class="text-center">Get Weather Forecast</h2>
</div>
</div>
<div class="container" >
<div class="row">
<div class="form-group form-inline forecast" id="divCity">
<div class="col-sm-12">
<div class="col-md-8 col-md-offset-2">
<div id="error"></div>
</div>
<input type="text" name="city" id="city" class="form-control" placeholder="Enter city name ...">
<input type="number" name="days" id="days" min="1" max="16" class="form-control" placeholder="Number of days / Min: 1 & Max: 16 days">
<button type="submit" name="search" id="submitForecast" class="btn btn-primary button btn-block-inline" title="Show forecast for next couple days"><i class="fa fa-question-circle"></i> Search</button>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div id="search" class="text-center">
</div>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Icon</th>
<th>Weather</th>
<th>Description</th>
<th>Morning</th>
<th>Night</th>
<th>Minimum</th>
<th>Maximum</th>
<th>Preassure</th>
<th>Humidity</th>
<th>Wind Speed</th>
<th>Cloudiness</th>
</tr>
</thead>
<tbody id="forecastWeather">
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="row">
<p class="text-center">Copyright © Weather App <small>by: <i><a href="https://www.facebook.com/aleksandar.ljubisic" target="_blank">Aleksandar Ljubišić</a></i></small></p>
</div>
</div>
</div>
<a id="back-to-top" href="#" class="btn btn-primary btn-lg back-to-top" role="button" title="Click to return on the top page" data-toggle="tooltip" data-placement="left"><span class="glyphicon glyphicon-chevron-up"></span></a>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="forecast.js"></script>
<script>
$(document).ready(function(){
$(window).scroll(function () {
if ($(this).scrollTop() > 50) {
$('#back-to-top').fadeIn();
} else {
$('#back-to-top').fadeOut();
}
});
// scroll body to 0px on click
$('#back-to-top').click(function () {
$('#back-to-top').tooltip('hide');
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
$('#back-to-top').tooltip('show');
});
</script>
</body>
</html>