diff --git a/INSTALL b/INSTALL index 65c558f..85f802c 100644 --- a/INSTALL +++ b/INSTALL @@ -2,7 +2,7 @@ Installation ============ Before we begin... - 1) This release (v4.0) has been tested on Weewx version 4.10.2 and Python 3.9.2 + 1) This release (v4.1) has been tested on Weewx version 4.10.2 and Python 3.9.2 Versions of Weewx before v3 will not work. 2) This has been tested on sqlite databases. Mysql and any other Weewx supported databases should work too. diff --git a/bin/user/historygenerator.py b/bin/user/historygenerator.py index 866c6a8..774097d 100644 --- a/bin/user/historygenerator.py +++ b/bin/user/historygenerator.py @@ -59,6 +59,7 @@ class MyXSearch(SearchList): # Make some config available to templates self.add_to_extension_list('Navigation', generator.skin_dict) + self.add_to_extension_list('StationInfo', generator.skin_dict) self.add_to_extension_list('TranslationLinks', generator.skin_dict) self.add_to_extension_list('HistoryReport', generator.skin_dict) self.add_to_extension_list('ImageGenerator', generator.skin_dict) diff --git a/skins/Bootstrap/livegauges.html.inc b/skins/Bootstrap/livegauges.html.inc index 086eed9..4203201 100644 --- a/skins/Bootstrap/livegauges.html.inc +++ b/skins/Bootstrap/livegauges.html.inc @@ -23,38 +23,9 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + #for $station_info_item in $StationInfo['station_info_items'] + #include $station_info_item + ".html.inc" + #end for
$gettext("Latitude")$station.latitude[0]° $station.latitude[1]' $station.latitude[2]
$gettext("Longitude")$station.longitude[0]° $station.longitude[1]' $station.longitude[2]
$gettext("Altitude")$station.altitude
$gettext("Sunrise")$almanac.sunrise
$gettext("Sunset")$almanac.sunset
$gettext("Moon Phase")$almanac.moon_phase ($almanac.moon_fullness%)
$gettext("Station Uptime")$station.uptime.long_form
$gettext("Server Uptime")$station.os_uptime.long_form
diff --git a/skins/Bootstrap/location.html.inc b/skins/Bootstrap/location.html.inc new file mode 100644 index 0000000..2be9cd3 --- /dev/null +++ b/skins/Bootstrap/location.html.inc @@ -0,0 +1,12 @@ + + $gettext("Latitude") + $station.latitude[0]° $station.latitude[1]' $station.latitude[2] + + + $gettext("Longitude") + $station.longitude[0]° $station.longitude[1]' $station.longitude[2] + + + $gettext("Altitude") + $station.altitude + \ No newline at end of file diff --git a/skins/Bootstrap/moonphase.html.inc b/skins/Bootstrap/moonphase.html.inc new file mode 100644 index 0000000..af4f114 --- /dev/null +++ b/skins/Bootstrap/moonphase.html.inc @@ -0,0 +1,4 @@ + + $gettext("Moon Phase") + $almanac.moon_phase ($almanac.moon_fullness%) + \ No newline at end of file diff --git a/skins/Bootstrap/skin.conf b/skins/Bootstrap/skin.conf index de36d73..c547cc1 100644 --- a/skins/Bootstrap/skin.conf +++ b/skins/Bootstrap/skin.conf @@ -15,7 +15,6 @@ # # ############################################################################################ - [Extras] # @@ -114,6 +113,11 @@ # copy_always = ############################################################################################ +[StationInfo] + # This list determines which station info items will appear in the station info section, as well as in which order. + # You can define a custom part, to do so, create a template called "customStationInfo.html.inc" and include it in the list + station_info_items = location, sunRiseSet, moonphase, uptime #, customStationInfo + [Navigation] #this section lets you define Elements for the navbar # This list determines which navigation items will appear in the navbar, as well as in which order. diff --git a/skins/Bootstrap/sunRiseSet.html.inc b/skins/Bootstrap/sunRiseSet.html.inc new file mode 100644 index 0000000..524119e --- /dev/null +++ b/skins/Bootstrap/sunRiseSet.html.inc @@ -0,0 +1,8 @@ + + $gettext("Sunrise") + $almanac.sunrise + + + $gettext("Sunset") + $almanac.sunset + \ No newline at end of file diff --git a/skins/Bootstrap/uptime.html.inc b/skins/Bootstrap/uptime.html.inc new file mode 100644 index 0000000..a5ab8b4 --- /dev/null +++ b/skins/Bootstrap/uptime.html.inc @@ -0,0 +1,8 @@ + + $gettext("Station Uptime") + $station.uptime.long_form + + + $gettext("Server Uptime") + $station.os_uptime.long_form + \ No newline at end of file