added possibility to configure station info items
This commit is contained in:
2
INSTALL
2
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.
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -23,38 +23,9 @@
|
||||
<div class="row stationInfo">
|
||||
<table class="table table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>$gettext("Latitude")</td>
|
||||
<td>$station.latitude[0]° $station.latitude[1]' $station.latitude[2]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Longitude")</td>
|
||||
<td>$station.longitude[0]° $station.longitude[1]' $station.longitude[2]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Altitude")</td>
|
||||
<td>$station.altitude</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Sunrise")</td>
|
||||
<td>$almanac.sunrise</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Sunset")</td>
|
||||
<td>$almanac.sunset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Moon Phase")</td>
|
||||
<td>$almanac.moon_phase ($almanac.moon_fullness%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Station Uptime")</td>
|
||||
<td>$station.uptime.long_form</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Server Uptime")</td>
|
||||
<td>$station.os_uptime.long_form</td>
|
||||
</tr>
|
||||
#for $station_info_item in $StationInfo['station_info_items']
|
||||
#include $station_info_item + ".html.inc"
|
||||
#end for
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
12
skins/Bootstrap/location.html.inc
Normal file
12
skins/Bootstrap/location.html.inc
Normal file
@@ -0,0 +1,12 @@
|
||||
<tr>
|
||||
<td>$gettext("Latitude")</td>
|
||||
<td>$station.latitude[0]° $station.latitude[1]' $station.latitude[2]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Longitude")</td>
|
||||
<td>$station.longitude[0]° $station.longitude[1]' $station.longitude[2]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Altitude")</td>
|
||||
<td>$station.altitude</td>
|
||||
</tr>
|
||||
4
skins/Bootstrap/moonphase.html.inc
Normal file
4
skins/Bootstrap/moonphase.html.inc
Normal file
@@ -0,0 +1,4 @@
|
||||
<tr>
|
||||
<td>$gettext("Moon Phase")</td>
|
||||
<td>$almanac.moon_phase ($almanac.moon_fullness%)</td>
|
||||
</tr>
|
||||
@@ -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.
|
||||
|
||||
8
skins/Bootstrap/sunRiseSet.html.inc
Normal file
8
skins/Bootstrap/sunRiseSet.html.inc
Normal file
@@ -0,0 +1,8 @@
|
||||
<tr>
|
||||
<td>$gettext("Sunrise")</td>
|
||||
<td>$almanac.sunrise</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Sunset")</td>
|
||||
<td>$almanac.sunset</td>
|
||||
</tr>
|
||||
8
skins/Bootstrap/uptime.html.inc
Normal file
8
skins/Bootstrap/uptime.html.inc
Normal file
@@ -0,0 +1,8 @@
|
||||
<tr>
|
||||
<td>$gettext("Station Uptime")</td>
|
||||
<td>$station.uptime.long_form</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$gettext("Server Uptime")</td>
|
||||
<td>$station.os_uptime.long_form</td>
|
||||
</tr>
|
||||
Reference in New Issue
Block a user