-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.html.tmpl
914 lines (892 loc) · 34.6 KB
/
index.html.tmpl
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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
<!DOCTYPE html>
<html lang="en" class="no-js">
<head itemscope itemtype="https://schema.org/Website">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Refresh" content="180">
<!-- Google verification tag -->
<meta name="google-site-verification" content="skDuSC68YDlkfq2GfylRvmzM4WE5RgCKZIV275lKZ1A" />
#if $Extras.has_key('cwop')
<meta name="description" content="A $station.hardware weather station reporting current weather conditions from the Century Farm Subdivision in $station.location ($Extras.cwop). This web site is powered by WeeWx. ">
#else
<meta name="description" content="A $station.hardware weather station reporting current weather conditions from the Century Farm Subdivision in $station.location. This web site is powered by WeeWx. ">
#end if
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials">
<link rel="profile" href="https://gmpg.org/xfn/11" />
#if $Extras.has_key('web_url')
<link rel="canonical" href="$Extras.web_url"/>
#end if
<title>$station.location Current Weather Conditions</title>
<!-- Open Graph -->
#if $Extras.has_key('cwop')
<meta property="og:site_name" content="$station.location Weather Station ($Extras.cwop)" />
<meta property="og:title" content="$station.location ($Extras.cwop) Current Weather Conditions"/>
#else
<meta property="og:site_name" content="$station.location Weather Station" />
<meta property="og:title" content="$station.location Current Weather Conditions"/>
#end if
#if $Extras.has_key('web_url')
<meta property="og:image" content="$Extras.web_url/daytempdew.png"/>
<meta property="og:url" content="$Extras.web_url"/>
#end if
#if $Extras.has_key('cwop')
<meta property="og:description" content="A $station.hardware weather station reporting current weather conditions from the Century Farm Subdivision in $station.location ($Extras.cwop). This web site is powered by WeeWx. " />
#else
<meta property="og:description" content="A $station.hardware weather station reporting current weather conditions from the Century Farm Subdivision in $station.location ($Extras.cwop). This web site is powered by WeeWx. " />
#end if
<meta property="og:type" content="website" />
<!--SM Markups -->
#if $Extras.has_key('cwop')
<meta itemprop="name" content="Current Weather Conditions for station.location ($Extras.cwop) "/>
#else
<meta itemprop="name" content="Current Weather Conditions for $station.location"/>
#end if
<meta itemprop="image" content="$Extras.web_url/daytempdew.png"/>
#if $Extras.has_key('web_url')
<meta itemprop="url" content="$Extras.web_url"/>
#end if
#if $Extras.has_key('cwop')
<meta itemprop="description" content="A $station.hardware weather station reporting current weather conditions from the Century Farm Subdivision in $station.location ($Extras.cwop). This web site is powered by WeeWx. " />
#else
<meta itemprop="description" content="A $station.hardware weather station reporting current weather conditions from the Century Farm Subdivision in $station.location ($Extras.cwop). This web site is powered by WeeWx. " />
#end if
#if $Extras.has_key('keywords_meta')
<meta name="keywords" content="$Extras.keywords_meta" />
#end if
<!-- FavIcons -->
<link rel="icon" href="favicon.ico" type="image/png">
<link rel="apple-touch-icon" href="touch-icon.png"/>
<!-- Styles -->
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/main.css">
<!-- Font Awesome Icon links -->
<!-- Free license -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.5.1/css/all.css" crossorigin="anonymous">
<!-- Script -->
<script src="js/modernizr-2.6.2.min.js"></script>
<script src="js/checkdiff.js"></script>
</head>
<body>
<header>
<div class="container-fix" >
<div class="h-left" >
<h1><i class="fa-solid fa-cloud" ></i> $station.location </h1>
<p>$station.latitude[0]° $station.latitude[1]' $station.latitude[2] | $station.longitude[0]° $station.longitude[1]' $station.longitude[2] | $station.altitude | <a href="https://www.google.com/maps/?q=$station.latitude[0]°%20$station.latitude[1]%20$station.latitude[2],$station.longitude[0]°%20$station.longitude[1]%20$station.longitude[2]" target="_blank" ><i class="fa-solid fa-location-dot" ></i> Show on map</a></p>
<h2>Current Weather Conditions</h2>
<p><i class="fa-solid fa-clock" ></i> $current.dateTime $current.dateTime.format("%Z")</p>
<p id="freshweather" class="m-orange"></p>
<script>
window.onload = checkDiff("$current.dateTime ($current.dateTime.format('%Z'))");
</script>
</div>
<div class="h-right" >
<table>
<tr>
<td><b>Station:</b></td>
<td>$station.hardware</td>
</tr>
<tr>
<td><b>Software:</b></td>
<td><a href="https://weewx.com/" target="_blank" >WeeWX v$station.version</a></td>
</tr>
<tr>
<td><b>Weewx uptime:</b></td>
<td>$station.uptime.long_form</td>
</tr>
<tr>
<td><b>Server uptime:</b></td>
<td>$station.os_uptime.long_form</td>
</tr>
</table>
</div>
<nav>
<ul class="topnav" id="myTopnav">
<li class="icon"><a href="javascript:void(0);" onclick="myFunction()"><i class="fa-solid fa-bars" ></i></a></li>
<li class="active" ><a href="/" >Current</a></li>
<li><a href="week.html" >Week</a></li>
<li><a href="month.html" >Month</a></li>
<li><a href="year.html" >Year</a></li>
<li><a href="summary.html" >Summaries</a></li>
<li><a href="about.html" >About</a></li>
<li><a href="RSS/weewx_rss.xml" ><i class="fa-solid fa-rss" ></i></a></li>
#if $Extras.has_key('twitter_url')
<li><a href=$Extras.twitter_url><i class="fa-brands fa-twitter" ></i></a></li>
#end if
#if $Extras.has_key('youtube_url')
<li><a href=$Extras.youtube_url><i class="fa-brands fa-youtube" ></i></a></li>
#end if
</ul>
</nav>
</div>
</header>
<div class="main" >
<div class="container" >
<div class="left" >
<div class="card" >
#if $current.rainRate.raw == 0.0
<h1><i class="fa-solid fa-sun m-orange" ></i> Current Conditions</h1>
#else if $current.rainRate.raw >= 0.01
<h1><i class="fa-solid fa-cloud-rain m-blau" ></i> Current Conditions</h1>
#else
<h1><i class="fa-solid fa-sun m-orange" ></i> Current Conditions</h1>
#end if
<table class="tablespacer">
<tr>
<td>Outside Temperature</td>
<td>$current.outTemp</td>
</tr>
<tr>
<td>Wind Chill</td>
<td>$current.windchill</td>
</tr>
<tr>
<td>Heat Index</td>
<td>$current.heatindex</td>
</tr>
<tr>
<td>Dewpoint</td>
<td>$current.dewpoint</td>
</tr>
<tr>
<td>Humidity</td>
<td>$current.outHumidity</td>
</tr>
<tr>
<td>Barometer</td>
<td>$current.barometer</td>
</tr>
<tr>
<td>Barometer Trend ($trend.time_delta.hour.format("%.0f"))</td>
<td>$trend.barometer</td>
</tr>
#if $current.windSpeed.raw == 0.0
<tr>
<td>Wind</td>
<td>$current.windSpeed </td>
</tr>
#else
<tr>
<td>Wind</td>
<td>$current.windSpeed $current.windDir.ordinal_compass ($current.windDir)</td>
</tr>
#end if
#if $current.windGust.raw == 0.0
<tr>
<td>Wind Gust</td>
<td>$current.windGust </td>
</tr>
#else
<tr>
<td>Wind Gust</td>
<td>$current.windGust $current.windGustDir.ordinal_compass ($current.windGustDir)</td>
</tr>
#end if
<tr>
<td>Rain Rate</td>
<td>$current.rainRate</td>
</tr>
#if $day.inTemp.has_data
<tr>
<td>Inside Temperature</td>
<td>$current.inTemp</td>
</tr>
#end if
#if $day.inHumidity.has_data
<tr>
<td>Inside Humidity</td>
<td>$current.inHumidity</td>
</tr>
#end if
#if $day.extraTemp1.has_data
<tr>
<td>Pond Temperature</td>
<td>$current.extraTemp1</td>
</tr>
#end if
#if $day.UV.has_data
<tr>
<td>UV Index</td>
<td>$current.UV</td>
</tr>
#end if
#if $day.ET.has_data and $day.ET.sum.raw is not None and $day.ET.sum.raw > 0.0
<tr>
<td>Evapotranspiration</td>
<td>$current.ET.format(format_string="%.5f")</td>
</tr>
#end if
#if $day.radiation.has_data
<tr>
<td>Solar Radiation</td>
<td>$current.radiation</td>
</tr>
#end if
#if $day.illuminance.has_data
<tr>
<td>Brightness</td>
<td>$current.illuminance</td>
</tr>
#end if
#if $day.lightning_strike_count.has_data
<tr>
<td>Lightning Strikes</td>
<td>$current.lightning_strike_count</td>
</tr>
<tr>
<td>Average Strike Distance</td>
<td>$current.lightning_avg_distance.format(format_string="%.1f")</td>
</tr>
#end if
</table>
</div>
<div class="card" >
<h1><i class="fa-solid fa-moon m-grau" ></i> Since Midnight</h1>
<table class="tablespacer">
<tr>
<td>High Temperature</td>
<td>$day.outTemp.max</td>
<td>$day.outTemp.maxtime</td>
</tr>
<tr>
<td>Low Temperature</td>
<td>$day.outTemp.min</td>
<td>$day.outTemp.mintime</td>
</tr>
<tr>
<td>High Heat Index</td>
<td>$day.heatindex.max</td>
<td>$day.heatindex.maxtime</td>
</tr>
<tr>
<td>Low Wind Chill</td>
<td>$day.windchill.min</td>
<td>$day.windchill.mintime</td>
</tr>
<tr>
<td>High Dewpoint</td>
<td>$day.dewpoint.max</td>
<td>$day.dewpoint.maxtime</td>
</tr>
<tr>
<td>Low Dewpoint</td>
<td>$day.dewpoint.min</td>
<td>$day.dewpoint.mintime</td>
</tr>
<tr>
<td>High Humidity</td>
<td>$day.outHumidity.max</td>
<td>$day.outHumidity.maxtime</td>
</tr>
<tr>
<td>Low Humidity</td>
<td>$day.outHumidity.min</td>
<td>$day.outHumidity.mintime</td>
</tr>
<tr>
<td>High Barometer</td>
<td>$day.barometer.max</td>
<td>$day.barometer.maxtime</td>
</tr>
<tr>
<td>Low Barometer</td>
<td>$day.barometer.min</td>
<td>$day.barometer.mintime</td>
</tr>
<tr>
<td>Today's Rain</td>
<td>$day.rain.sum</td>
<td></td>
</tr>
<tr>
<td>High Rain Rate</td>
<td>$day.rainRate.max</td>
<td>$day.rainRate.maxtime</td>
</tr>
<tr>
<td>High Wind</td>
<td>$day.wind.max $day.wind.gustdir</td>
<td>$day.wind.maxtime</td>
</tr>
<tr>
<td>Average Wind</td>
<td>$day.wind.avg</td>
<td></td>
</tr>
<tr>
<td>RMS Wind</td>
<td>$day.wind.rms</td>
<td></td>
</tr>
<tr>
<td>Vector Avg Speed</td>
<td>$day.wind.vecavg</td>
<td></td>
</tr>
<tr>
<td>Vector Avg Direction</td>
<td>$day.wind.vecdir</td>
<td></td>
</tr>
#if $day.inTemp.has_data
<tr>
<td>High Inside Temperature</td>
<td>$day.inTemp.max</td>
<td>$day.inTemp.maxtime</td>
</tr>
<tr>
<td>Low Inside Temperature</td>
<td>$day.inTemp.min</td>
<td>$day.inTemp.mintime</td>
</tr>
#end if
#if $day.inHumidity.has_data
<tr>
<td>High Inside Humidity</td>
<td>$day.inHumidity.max</td>
<td>$day.inHumidity.maxtime</td>
</tr>
<tr>
<td>Low Inside Humidity</td>
<td>$day.inHumidity.min</td>
<td>$day.inHumidity.mintime</td>
</tr>
#end if
#if $day.extraTemp1.has_data
<tr>
<td>High Pond Temp</td>
<td>$day.extraTemp1.max</td>
<td>$day.extraTemp1.maxtime</td>
</tr>
<tr>
<td>Low Pond Temp</td>
<td>$day.extraTemp1.min</td>
<td>$day.extraTemp1.mintime</td>
</tr>
#end if
#if $day.UV.has_data
<tr>
<td>High UV</td>
<td>$day.UV.max</td>
<td>$day.UV.maxtime</td>
</tr>
#end if
#if $day.ET.has_data and $day.ET.sum.raw is not None and $day.ET.sum.raw > 0.0
<tr>
<td>High Evapotranspiration</td>
<td>$day.ET.max.format(format_string="%.5f")</td>
<td>$day.ET.maxtime</td>
</tr>
<tr>
<td>Today's Evapotranspiration</td>
<td>$day.ET.sum</td>
<td></td>
</tr>
#end if
#if $day.radiation.has_data
<tr>
<td>High Radiation</td>
<td>$day.radiation.max</td>
<td>$day.radiation.maxtime</td>
</tr>
#end if
#if $day.illuminance.has_data
<tr>
<td>High Brightness</td>
<td>$day.illuminance.max</td>
<td>$day.illuminance.maxtime</td>
</tr>
#end if
#if $day.lightning_strike_count.has_data
<tr>
<td>Lightning Strikes</td>
<td>$day.lightning_strike_count.sum</td>
<td></td>
</tr>
<tr>
<td>Average Strike Distance</td>
<td>$day.lightning_avg_distance.avg.format(format_string="%.1f")</td>
<td></td>
</tr>
#end if
</table>
</div>
<!--Leap Year Code -->
<!--If this year was a leap year -->
#set $yr = int($day.dateTime.format("%Y"))%4
#if $yr == 0
#if $yr % 100 == 0
#if $yr % 400 == 0
#if $day.dateTime.format("%d-%b") == '29-Feb'
#set $n = 1461
#else if int($day.dateTime.format("%m")) >= 3
#set $n = 366
#else
#set $n = 365
#end if
#else
#set $n = 365
#end if
#else
#if $day.dateTime.format("%d-%b") == '29-Feb'
#set $n = 1461
#else if int($day.dateTime.format("%m")) >= 3
#set $n = 366
#else
#set $n = 365
#end if
#end if
#else
<!--If last year was a leap year -->
#set $yrNew = ($yr - 1)
#if $yrNew % 100 == 0
#if $yrNew % 400 == 0
#if $day.dateTime.format("%d-%b") < '01-Mar'
#set $n = 366
#else
#set $n = 365
#end if
#else
#set $n = 365
#end if
#else
#set $n = 365
#end if
#end if
#if $days_ago($days_ago=$n).dateTime.raw is not None
<div class="card" >
<h1><i class="fa-solid fa-clock-rotate-left" ></i> Last $days_ago($days_ago=$n).dateTime.format("%d-%b (%Y)") </h1>
<table class="tablespacer">
<tr>
<td>High Temperature</td>
<td>$days_ago($days_ago=$n).outTemp.max</td>
<td>$days_ago($days_ago=$n).outTemp.maxtime</td>
</tr>
<tr>
<td>Low Temperature</td>
<td>$days_ago($days_ago=$n).outTemp.min</td>
<td>$days_ago($days_ago=$n).outTemp.mintime</td>
</tr>
<tr>
<td>High Dewpoint</td>
<td>$days_ago($days_ago=$n).dewpoint.max</td>
<td>$days_ago($days_ago=$n).dewpoint.maxtime</td>
</tr>
<tr>
<td>Low Dewpoint</td>
<td>$days_ago($days_ago=$n).dewpoint.min</td>
<td>$days_ago($days_ago=$n).dewpoint.mintime</td>
</tr>
<tr>
<td>High Humidity</td>
<td>$days_ago($days_ago=$n).outHumidity.max</td>
<td>$days_ago($days_ago=$n).outHumidity.maxtime</td>
</tr>
<tr>
<td>Low Humidity</td>
<td>$days_ago($days_ago=$n).outHumidity.min</td>
<td>$days_ago($days_ago=$n).outHumidity.mintime</td>
</tr>
<tr>
<td>High Barometer</td>
<td>$days_ago($days_ago=$n).barometer.max</td>
<td>$days_ago($days_ago=$n).barometer.maxtime</td>
</tr>
<tr>
<td>Low Barometer</td>
<td>$days_ago($days_ago=$n).barometer.min</td>
<td>$days_ago($days_ago=$n).barometer.mintime</td>
</tr>
<tr>
<td>Rain</td>
<td>$days_ago($days_ago=$n).rain.sum</td>
<td></td>
</tr>
<tr>
<td>High Rain Rate</td>
<td>$days_ago($days_ago=$n).rainRate.max</td>
<td>$days_ago($days_ago=$n).rainRate.maxtime</td>
</tr>
<tr>
<td>High Wind</td>
<td>$days_ago($days_ago=$n).wind.max <br> $days_ago($days_ago=$n).wind.gustdir</td>
<td>$days_ago($days_ago=$n).wind.maxtime</td>
</tr>
#if $days_ago($days_ago=$n).inTemp.has_data
<tr>
<td>High Inside Temperature</td>
<td>$days_ago($days_ago=$n).inTemp.max</td>
<td>$days_ago($days_ago=$n).inTemp.maxtime</td>
</tr>
<tr>
<td>Low Inside Temperature</td>
<td>$days_ago($days_ago=$n).inTemp.min</td>
<td>$days_ago($days_ago=$n).inTemp.mintime</td>
</tr>
#end if
#if $days_ago($days_ago=$n).inHumidity.has_data
<tr>
<td>High Inside Humidity</td>
<td>$days_ago($days_ago=$n).inHumidity.max</td>
<td>$days_ago($days_ago=$n).inHumidity.maxtime</td>
</tr>
<tr>
<td>Low Inside Humidity</td>
<td>$days_ago($days_ago=$n).inHumidity.min</td>
<td>$days_ago($days_ago=$n).inHumidity.mintime</td>
</tr>
#end if
#if $days_ago($days_ago=$n).extraTemp1.has_data
<tr>
<td>High Pond Temp</td>
<td>$days_ago($days_ago=$n).extraTemp1.max</td>
<td>$days_ago($days_ago=$n).extraTemp1.maxtime</td>
</tr>
<tr>
<td>Low Pond Temp</td>
<td>$days_ago($days_ago=$n).extraTemp1.min</td>
<td>$days_ago($days_ago=$n).extraTemp1.mintime</td>
</tr>
#end if
#if $days_ago($days_ago=$n).UV.has_data
<tr>
<td>High UV</td>
<td>$days_ago($days_ago=$n).UV.max</td>
<td>$days_ago($days_ago=$n).UV.maxtime</td>
</tr>
#end if
#if $days_ago($days_ago=$n).ET.has_data and $days_ago($days_ago=$n).ET.sum.raw is not None and $days_ago($days_ago=$n).ET.sum.raw > 0.0
<tr>
<td>High Evapotranspiration</td>
<td>$days_ago($days_ago=$n).ET.max.format(format_string="%.5f")</td>
<td>$days_ago($days_ago=$n).ET.maxtime</td>
</tr>
<tr>
<td>Total Evapotranspiration</td>
<td>$days_ago($days_ago=$n).ET.sum</td>
<td></td>
</tr>
#end if
#if $days_ago($days_ago=$n).radiation.has_data
<tr>
<td>High Radiation</td>
<td>$days_ago($days_ago=$n).radiation.max</td>
<td>$days_ago($days_ago=$n).radiation.maxtime</td>
</tr>
#end if
#if $days_ago($days_ago=$n).illuminance.has_data
<tr>
<td>High Brightness</td>
<td>$days_ago($days_ago=$n).illuminance.max</td>
<td>$days_ago($days_ago=$n).illuminance.maxtime</td>
</tr>
#end if
#if $days_ago($days_ago=$n).lightning_strike_count.has_data
<tr>
<td>Lightning Strikes</td>
<td>$days_ago($days_ago=$n).lightning_strike_count.sum</td>
<td></td>
</tr>
#end if
</table>
</div>
#end if
#if $Extras.has_key('radar')
<div class="card" >
<h1><i class="fa-solid fa-satellite-dish m-rot"></i> Radar</h1>
$Extras.radar
<br>
</div>
#end if
#if $Extras.has_key('lightning_map')
<div class="card" >
#if $Extras.has_key('lightning_url')
<a href="$Extras.lightning_url" target="_blank">
#end if
<img src="$Extras.lightning_map" alt="Lightning Map" class="space small" />
#if $Extras.has_key('lightning_url')
</a>
#end if
</div>
#end if
#if $Extras.has_key('camera')
<!--camera section-->
<div class="card" >
<h1><i class="fa-solid fa-camera" style="color:#999"></i> Local Cameras</h1>
<div class="s-center s-content s-display-container" style="max-width:768px">
#set $b=0
#for $i in $Extras.camera
<div class="mySlides"><b>$Extras.cameratitle[$b]</b><br>
<img src="$i?$current.dateTime.raw" alt="camera $b" style="width:100%">
<meta name="description" content="A webcam located at $Extras.cameratitle[$b]">
</div>
#set $b=$b+1
#end for
<div class="s-center s-container s-section s-large s-text-white s-display-bottommiddle" style="width:100%">
<div class="s-left" onclick="plusDivs(-1)"> <i class="fa fa-chevron-left s-hover-text-gray"></i></div>
<div class="s-right" onclick="plusDivs(1)"><i class="fa fa-chevron-right s-hover-text-gray"></i> </div>
#set $a=1
#for $j in $Extras.camera
<span class="s-badge demo s-border s-transparent s-hover-white" onclick="currentDiv($a)"></span>
#set $a=$a+1
#end for
</div>
</div>
<script>
var slideIndex = 1;
showDivs(slideIndex);
function plusDivs(n) {
showDivs(slideIndex += n);
}
function currentDiv(n) {
showDivs(slideIndex = n);
}
function showDivs(n) {
var i;
var x = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("demo");
if (n > x.length) {slideIndex = 1}
if (n < 1) {slideIndex = x.length}
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" s-white", "");
}
x[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " s-white";
}
</script>
</div>
#end if
#if $Extras.has_key('camloop')
<!--camera loop section-->
<div class="card" >
<h1><i class="fa-solid fa-camera" style="color:#999"></i> Camera loop</h1>
<div class="s-center s-content s-display-container" style="max-width:768px">
$Extras.camloop
</div>
</div>
#end if
</div>
<div class="right" >
<div class="card" >
<h1><i class="fa-regular fa-star m-rot" ></i> Almanac</h1>
#if $almanac.hasExtras
## Extended almanac information is available. Do the full set of tables.
#set $sun_altitude = $almanac.sun.alt
#if $sun_altitude < 0
#set $sun_None="<i>(Always down)</i>"
#else
#set $sun_None="<i>(Always up)</i>"
#end if
<div class="haelfte" >
<h3>Sun</h3>
<table>
<tr>
<td>Start civil twilight:</td>
<td>$almanac(horizon=-6).sun(use_center=1).rise</td>
</tr>
<tr>
<td>Sunrise</td>
<td>$almanac.sun.rise.string($sun_None)</td>
</tr>
<tr>
<td>Transit:</td>
<td>$almanac.sun.transit</td>
</tr>
<tr>
<td>Sunset:</td>
<td>$almanac.sun.set.string($sun_None)</td>
</tr>
<tr>
<td>End civil twilight:</td>
<td>$almanac(horizon=-6).sun(use_center=1).set</td>
</tr>
<tr>
<td>Azimuth:</td>
<td>$("%.1f°" % $almanac.sun.az)</td>
</tr>
<tr>
<td>Altitude:</td>
<td>$("%.1f°" % $sun_altitude)</td>
</tr>
<tr>
<td>Right ascension:</td>
<td>$("%.1f°" % $almanac.sun.ra)</td>
</tr>
<tr>
<td>Declination:</td>
<td>$("%.1f°" % $almanac.sun.dec)</td>
</tr>
#if $almanac.next_equinox.raw < $almanac.next_solstice.raw
## The equinox is before the solstice. Display them in order.
<tr>
<td>Equinox:</td>
<td>$almanac.next_equinox</td>
</tr>
<tr>
<td>Solstice:</td>
<td>$almanac.next_solstice</td>
</tr>
#else
## The solstice is before the equinox. Display them in order.
<tr>
<td>Solstice:</td>
<td>$almanac.next_solstice</td>
</tr>
<tr>
<td>Equinox:</td>
<td>$almanac.next_equinox</td>
</tr>
#end if
</table>
</div>
<div class="haelfte" >
<h3>Moon</h3>
<table>
<tr>
<td>Rise:</td>
<td>$almanac.moon.rise</td>
</tr>
<tr>
<td>Transit:</td>
<td>$almanac.moon.transit</td>
</tr>
<tr>
<td>Set:</td>
<td>$almanac.moon.set</td>
</tr>
<tr>
<td>Azimuth:</td>
<td>$("%.1f°" % $almanac.moon.az)</td>
</tr>
<tr>
<td>Altitude:</td>
<td>$("%.1f°" % $almanac.moon.alt)</td>
</tr>
<tr>
<td>Right ascension:</td>
<td>$("%.1f°" % $almanac.moon.ra)</td>
</tr>
<tr>
<td>Declination:</td>
<td>$("%.1f°" % $almanac.moon.dec)</td>
</tr>
#if $almanac.next_full_moon.raw < $almanac.next_new_moon.raw
<tr>
<td>Full moon:</td>
<td>$almanac.next_full_moon</td>
</tr>
<tr>
<td>New moon:</td>
<td>$almanac.next_new_moon</td>
</tr>
#else
<tr>
<td>New moon:</td>
<td>$almanac.next_new_moon</td>
</tr>
<tr>
<td>Full moon:</td>
<td>$almanac.next_full_moon</td>
</tr>
#end if
<tr>
<td>Phase:</td>
<td>$almanac.moon_phase<br />($almanac.moon_fullness% full)</td>
</tr>
</table>
</div>
#else
## No extended almanac information available. Fall back to a simple table.
<table>
<tr>
<td>Sunrise:</td>
<td>$almanac.sunrise</td>
</tr>
<tr>
<td>Sunset:</td>
<td>$almanac.sunset</td>
</tr>
<tr>
<td>Moon Phase:</td>
<td>$almanac.moon_phase<br/>($almanac.moon_fullness% full)</td>
</tr>
</table>
#end if
</div>
<div class="card cc graphs" >
<h1><i class="fa-solid fa-chart-line m-gruen" ></i> Graphs</h1>
<img src="daytempdew.png" alt="temperatures" />
<img src="dayrain.png" alt="rain" />
<img src="daywind.png" alt="wind" />
<img src="daywinddir.png" alt="Hi Wind" />
<img src="daywindvec.png" alt="Wind Vector" />
<img src="daybarometer.png" alt="barometer"/>
#if $day.inTemp.has_data
<img src="dayinside.png" alt="Inside" />
#end if
<img src="dayinhumid.png" alt="Inside/Outside Humidity" />
#if $day.radiation.has_data
<img src="dayradiation.png" alt="Radiation" />
#end if
#if $day.UV.has_data
<img src="dayuv.png" alt="UV Index" />
#end if
#if $day.rxCheckPercent.has_data
<img src="dayrx.png" alt="day rx percent"/>
#end if
#if $day.lightning_strike_count.has_data
<img src="daylightning.png" alt="Lightning" />
#end if
#if $day.windBatteryStatus.has_data and $day.outTempBatteryStatus.has_data
<img src="daybattery.png" alt="day battery"/>
#end if
#if $day.extraTemp1.has_data
<img src="daypond.png" alt="Pond Temperatures" />
#end if
</div>
</div>
</div>
</div>
<footer>
<div class="container-fix">
<div style="text-align:center">
#if $Extras.has_key('you')
<i class="fa-solid fa-dragon"> </i><a href=mailto:$Extras.email> $Extras.you</a>
#end if
⋅
Copyright <i class="fa-regular fa-copyright"></i> $latest.dateTime.format("%Y")
<br>
Sofaskin by <a href="https://neoground.com">Neoground</a>
⋅
CW9009 Version by <a href="https://www.centuryfarmweather.com">Century Farm Weather</a>
⋅
Powered by<i class="fa-solid fa-cog fa-spin fa-fw" aria-hidden="true"></i><a href="https://weewx.com/" target="_blank">WeeWX</a>
</div>
</div>
</footer>
#if $Extras.has_key('googleAnalyticsId')
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=$Extras.googleAnalyticsId"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '$Extras.googleAnalyticsId');
</script>
#end if
<!-- Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon -->
<script>
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
</body>
</html>