-
Notifications
You must be signed in to change notification settings - Fork 28
/
index.html
317 lines (297 loc) · 14.9 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>AmatYr - {{ conf.station.name }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Tor Hveem">
<link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link href="/static/fa/css/font-awesome.min.css" rel="stylesheet">
<link href="/static/meteocons-font/FONT/Font-face/stylesheet.css" rel="stylesheet">
<link href="/static/cal-heatmap/cal-heatmap.css" rel="stylesheet">
<link href="/static/screen.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="shortcut icon" href="/static/favicon.png">
</head>
<body>
<div class="navbar main">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="/"><i class="fa fa-cloud"></i> AmatYR</a>
<div class="nav-collapse collapse">
<ul id="main_nav" class="nav">
<li class=""><a href="/">3 day</a></li>
<li class=""><a href="/day/today">Today</a></li>
<li class=""><a href="/day/yesterday">Yesterday</a></li>
<li class=""><a href="/hour/week">Week</a></li>
<li class=""><a href="/hour/month">Month</a></li>
{%
local currentyear = tonumber(string.sub(ngx.today(),1,4))
for i=currentyear,conf.firstyear,-1 do
%}
<li class=""><a href="/year/{{i}}">{{i}}</a></li>
{% end %}
</ul>
<ul class="nav pull-right">
<li>
<a class="" href="{{conf.station.url}}"><i class="fa fa-globe"></i> {{ conf.station.name }}</a>
</li>
</ul>
</div>
</div>
</div>
</div>
{( "dashbar.html" )}
<div class="container-fluid">
<div class="row-fluid">
<div class="span12" id="main">
<!--
<h6>From <span class="" data-text='first.datetime'></span> to <span class="" data-text='current.datetime'></span>
</h6>
-->
<div class="svgholder" id="temp"><i class="fa fa-spin fa fa-spinner"></i>Loading data...</div>
<h5>
Legend:
<span class="high">High</span>, <span class="avg">avg</span>, <span class="min">min</span> temperature. <span class="rain">Rain</span> in mm. <span class="pressure">Pressure</span>
</h5>
</div>
<div class="row-fluid windroserow">
<div class="span6" id="windrose"></div>
<div class="span6" id="windroseavg"></div>
</div>
<div class="row-fluid">
<!--
<h5>Pressure </h5>
<div class="svgholder" id="pressure"><i class="icon-spin icon-spinner"></i>Loading data...</div>
<h5>Wind speed by time<span class="pull-right" data-text='current.windspeed | wind'></span></h5>
<div class="svgholder wind" id="wind"><i class="icon-spin icon-spinner"></i>Loading data...</div>
<h5>Rain <span class="pull-right" data-text='current.rain | rain'></span></h5>
<div class="svgholder" id="rain"><i class="icon-spin icon-spinner"></i>Loading data...</div>
<h5>Wind direction by time<span class="pull-right" data-text='current.winddir | degree '></span></h5>
<div class="svgholder winddir" id="winddir"><i class="icon-spin icon-spinner"></i>Loading data...</div>
<h5>Humidity by time<span class="pull-right" data-text='current.outhumidity | percent '></span></h5>
<div class="svgholder humidity" id="humidity"><i class="icon-spin icon-spinner"></i>Loading data...</div>
-->
</div>
<div id="graphtabs" class="row-fluid">
<ul class="nav nav-tabs">
</ul>
<div class="tab-content">
</div>
</div>
</div>
</div>
<br>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12" id="record_weather">
<h3>Records <small>Maximum and minimum values</small></h3>
<ul class="nav nav-tabs">
<li class="active"><a href="#tab_today" data-toggle="tab">Today</a></li>
<li class=""><a href="#tab_yesterday" data-toggle="tab">Yesterday</a></li>
<li class=""><a href="#tab_week" data-toggle="tab">Week</a></li>
<li class=""><a href="#tab_month" data-toggle="tab">Month</a></li>
<li class=""><a href="#r2013" data-toggle="tab">Year</a></li>
<li class=""><a href="#rall" data-toggle="tab">All</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_today"></div>
<div class="tab-pane" id="tab_yesterday"></div>
<div class="tab-pane" id="tab_week"></div>
<div class="tab-pane" id="tab_month"></div>
<div class="tab-pane" id="r2013"></div>
<div class="tab-pane" id="rall"></div>
</div>
</div>
</div>
</div>
<br>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12" id="cal-heatmap">
<h3>Rain calendar <small>Intensity by rain amount</small></h3>
<div class="spinner"><i class="fa fa-spinner fa fa-spin"></i> Loading calendar data... </div>
</div>
</div>
</div>
<br>
{% if conf.webcam then %}
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<h3><a href="/cam">Live camera</a> <small>Image updated every 30 seconds</small> </h3>
<div style="text-align: center">
<a href="/cam">
<img id="webcam" style="border: 1px solid #111; margin: 0 auto; width: 100%; max-width: {{conf.webcam.width}}px" src="{{conf.webcam.url}}?nocache=1">
</a>
</div>
</div>
</div>
</div>
<br>
{% end %}
<div class="container-fluid">
<div class="row-fluid">
<div class="span12" id="tabular">
<h3>Aggregated monthly data</a> <small></small> </h3>
<div class="spinner"><i class="fa fa-spinner fa fa-spin"></i> Loading calendar data... </div>
<div class="panel-group" id="accordion"></div>
</div>
</div>
</div>
<br>
<hr>
<div class="container-fluid">
<div class="row-fluid">
<footer class="footer">
<a class="brand" href="https://github.com/torhve/Amatyr"><i class="fa fa-cloud"></i> AmatYR</a>
is a personal weather site. The source is free software written by
<span class="muted">© 2013-2015</span> <a href="http://hveem.no/">Tor Hveem</a>
<p class="pull-right">Find the source over at <a href="https://github.com/torhve/Amatyr">GitHub</a>.</p>
</footer>
</div>
</div>
<div id="tooltip">
<table class="table table-condensed">
<tr>
<th>
Date
</th>
<th><i class="fa fa-clock-o"></i></th>
<th data-text="d.datetime | date"></th>
</tr>
<tr class="avg"><td>Temperature </td><td><i class="icon-met icon-temp"></i></td><td data-text="d.outtemp | temp"></td></tr>
<tr class="rain"><td>Daily rain </td><td><i class="fa fa-tint"></i></td><td data-text="d.dayrain | rain"></td></tr>
<tr class="wind"><td>Wind speed </td><td><i class="icon-met icon-wind"></i></td><td data-text="d.windspeed | wind"></td></tr>
<tr class="wind"><td>Wind direction </td><td><i class="icon-met icon-compass"></i></td><td data-text="d.winddir | degree"></td></tr>
<tr class="pressure"><td>Pressure</td><td><i class="fa fa-signal"></i></td><td data-text="d.barometer | pressure"></td></tr>
<tr class="hum"><td>Humidity</td><td><i class="fa fa-dashboard"></i></td><td data-text="d.outhumidity | percent"></td></tr>
</table>
</div>
<script id="record_table_template" type="text/html">
<table class="table">
<tr>
<th>Data</th>
<th>What</th>
<th>When</th>
<th>Age</th>
</tr>
<tr>
<td>Highest temperature</td>
<td data-text='current.maxouttempvalue | temp'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.maxouttempdate'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.maxouttempage'><i class="fa fa-spinner fa fa-spin"></i></td>
</tr>
<tr>
<td>Lowest temperature</td>
<td data-text='current.minouttempvalue | temp'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.minouttempdate'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.minouttempage'><i class="fa fa-spinner fa fa-spin"></i></td>
</tr>
<tr>
<td>Lowest wind chill</td>
<td data-text='current.minwindchillvalue | temp'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.minwindchilldate'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.minwindchillage'><i class="fa fa-spinner fa fa-spin"></i></td>
</tr>
<tr>
<td>Highest heat index</td>
<td data-text='current.maxheatindexvalue | temp'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.maxheatindexdate'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.maxheatindexage'><i class="fa fa-spinner fa fa-spin"></i></td>
</tr>
<tr>
<td>Highest avg wind speed</td>
<td data-text='current.maxwindspeedvalue | wind'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.maxwindspeeddate'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.maxwindspeedage'><i class="fa fa-spinner fa fa-spin"></i></td>
</tr>
<tr>
<td>Highest wind gust speed</td>
<td data-text='current.maxwindgustvalue | wind'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.maxwindgustdate'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.maxwindgustage'><i class="fa fa-spinner fa fa-spin"></i></td>
</tr>
<tr>
<td>Amount of rain in period</td>
<td data-text='current.sumrainvalue | rain'><i class="fa fa-spinner fa fa-spin"></i></td>
<td data-text='current.sumraindate'><i class="fa fa-spinner fa-spin"></i></td>
<td data-text='current.sumrainage'><i class="fa fa-spinner fa-spin"></i></td>
</tr>
<tr>
<td>Highest daily rain</td>
<td data-text='current.maxdayrainvalue | rain'><i class="fa fa-spinner fa-spin"></i></td>
<td data-text='current.maxdayraindate'><i class="fa fa-spinner fa-spin"></i></td>
<td data-text='current.maxdayrainage'><i class="fa fa-spinner fa-spin"></i></td>
</tr>
<tr>
<td>Highest pressure</td>
<td data-text='current.maxbarometervalue | pressure'><i class="fa fa-spinner fa-spin"></i></td>
<td data-text='current.maxbarometerdate'><i class="fa fa-spinner fa-spin"></i></td>
<td data-text='current.maxbarometerage'><i class="fa fa-spinner fa-spin"></i></td>
</tr>
<tr>
<td>Lowest pressure</td>
<td data-text='current.minbarometervalue | pressure'><i class="fa fa-spinner fa-spin"></i></td>
<td data-text='current.minbarometerdate'><i class="fa fa-spinner fa-spin"></i></td>
<td data-text='current.minbarometerage'><i class="fa fa-spinner fa-spin"></i></td>
</tr>
</table>
</script>
<div style="width:0;height:0">
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" id="gradientholder">
<defs>
<linearGradient id="myLinearGradient1"
x1="0%" y1="0%"
x2="0%" y2="100%"
spreadMethod="pad">
<stop offset="0%" stop-color="#fafafa" stop-opacity="1"/>
<stop offset="100%" stop-color="#f0f0f0" stop-opacity="1"/>
</linearGradient>
<linearGradient id="temperature-gradient">
</linearGradient>
</defs>
</svg>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/static/js/path.min.js"></script>
<script src="/static/js/watch.js"></script>
<script src="/static/js/rivets.min.js"></script>
<script src="/static/js/d3.v3.min.js"></script>
<script src="/static/js/bootstrap-collapse.js"></script>
<script src="/static/js/bootstrap-tab.js"></script>
<script src="/static/js/drawline.js"></script>
<script src="/static/js/timelinegraph.js"></script>
<script src="/static/js/drawbars.js"></script>
<script src="/static/js/temprain.js"></script>
<script src="/static/js/sparkline.js"></script>
<script src="/static/js/windrose.js"></script>
<script src="/static/cal-heatmap/cal-heatmap.js"></script>
<script src="/static/js/amatyrlib.js"></script>
<script src="/static/js/amatyr.js"></script>
<script>
!function ($) {
$(function(){
var pkBaseURL = (("https:" == document.location.protocol) ? "https://statistikk.idrift.no/" : "http://statistikk.idrift.no/");
$.getScript(pkBaseURL + 'piwik.js', function(){
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 116);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
});
})
}(window.jQuery)
</script>
<noscript><p><img src="http://statistikk.idrift.no/piwik.php?idsite=116" style="border:0" alt=""><p></noscript>
</body>
</html>