-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·96 lines (84 loc) · 3.45 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
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
<!DOCTYPE html>
<html class="no-js">
<head>
<title>Kickflip WeatherApp</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/modernizr.custom.10824.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/weather-app/app.js"></script>
<script src="js/weather-app/controllers/mainController.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body background="./img/clear-sky.jpg" size:cover>
<main class="container main-frame" ng-app="WeatherApp" ng-controller="mainController" ng-init="init()">
<div class="page-header">
<h1>Kickflip WeatherApp</h1>
</div>
<noscript>
<article>
<div class="alert alert-danger">Javascript is disabled in your web browser. If you <a href="http://www.enable-javascript.com/">enable JavaScript</a>, this text will change.</div>
</article>
</noscript>
<div class="hide-on-no-js">
<!-- search form -->
<form class="form-inline" ng-submit="submit()">
<input type="text" class="form-control input-lg" placeholder="Enter town or city" ng-model="loc">
</form>
<!-- ajax loader image -->
<div ng-show="loader == 1" class="loader"><img src="img/ajax-loader.gif" alt=" "></div>
<!-- weather report --->
<article ng-show="status == 200 && data.cod == 200">
<div style="float:left; width:250px">
<h1>{{data.name}}</h1>
<h4>{{data.sys.country}}</h4>
<h1><img ng-src="{{img}}" alt=" " class="pull-left" width="75" height="75"></h1><br>
<h4>{{data.weather[0]['description']}}</h4><br>
<p><span class="glyphicon glyphicon-menu-up"></span>  {{data.main.temp_max | customKelvinToFahrenheitFilter | number:0}}°F   <span class="glyphicon glyphicon-menu-down"></span> {{data.main.temp_min | customKelvinToFahrenheitFilter | number:0}}°F</p>
<font size="7">{{data.main.temp | customKelvinToFahrenheitFilter | number:0}}°F</font><br><br>
</div>
<div style="float:left; padding-left:150px; width:350px">
<!-- <table class="table table-striped"> -->
<h3>Details:</h3>
<table class="table" style="width:25">
<tbody>
<tr>
<th>Humidity</th>
<td>{{data.main.humidity}}%</td>
</tr>
<tr>
<th>Wind</th>
<td>{{data.wind.speed}}mph</td>
</tr>
<tr>
<th>Direction</th>
<td>{{data.wind.deg}}</td>
</tr>
<tr>
<th>Sunrise</th>
<td>{{data.sys.sunrise | customTimeFilter}}</td>
</tr>
<tr>
<th>Sunset</th>
<td>{{data.sys.sunset | customTimeFilter}}</td>
</tr>
</tbody>
</table>
</div>
</article>
<!-- location not found error message --->
<article ng-show="status == 200 && data.cod == 404">
<div class="alert alert-danger">{{data.message}}</div>
</article>
<!-- failed ajax request error message --->
<article ng-show="status == 0">
<div class="alert alert-danger">{{data}}</div>
</article>
<!-- ajax response -->
<!-- <pre ng-show="data">{{data}}</pre> -->
</div>
</main>
</body>
</html>