Explorar el Código

Added Twitter link

AddTwitter link to the menu bar if options has a url set in Skin.conf
Josh Smith hace 4 años
padre
commit
6aed30fc3b
Se han modificado 5 ficheros con 178 adiciones y 173 borrados
  1. 69 62
      index.html.tmpl
  2. 39 41
      month.html.tmpl
  3. 20 23
      summary.html.tmpl
  4. 17 15
      text.php.tmpl
  5. 33 32
      year.html.tmpl

+ 69 - 62
index.html.tmpl

@@ -7,9 +7,9 @@
     <!-- 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 $station.location ($Extras.cwop). This web site is powered by WeeWx. ">
+    <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 $station.location. This web site is powered by WeeWx. ">
+    <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="profile" href="http://gmpg.org/xfn/11" />
@@ -30,9 +30,9 @@
     <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 $station.location ($Extras.cwop). This web site is powered by WeeWx. " />
+    <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 $station.location ($Extras.cwop). This web site is powered by WeeWx. " />
+    <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 -->
@@ -46,9 +46,12 @@
     <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 $station.location ($Extras.cwop). This web site is powered by WeeWx. " />
+    <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 $station.location ($Extras.cwop). This web site is powered by WeeWx. " />
+    <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 -->
@@ -58,11 +61,12 @@
     <!-- Styles -->
     <link href='http://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/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
-      
+    
     <!-- Script -->
     <script src="js/modernizr-2.6.2.min.js"></script>
     <script src="js/checkdiff.js"></script>
@@ -111,6 +115,9 @@
             <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="fas fa-rss" ></i></a></li>
+	    #if $Extras.has_key('twitter_url')
+	    <li><a href=$Extras.twitter_url><i class="fab fa-twitter" ></i></a></li>
+	    #end if
           </ul>
         </nav>
       </div>
@@ -217,28 +224,26 @@
                 <td>$current.radiation</td>
               </tr>
               #end if
-	      #if $day.lux.has_data
+	            #if $day.illuminance.has_data
               <tr>
                 <td>Brightness</td>
-                <td>$current.lux</td>
+                <td>$current.illuminance</td>
               </tr>
               #end if
-	      <!--
-	      #if $day.lightningStrikes.has_data
+	            #if $day.lightning_strike_count.has_data
               <tr>
                 <td>Lightning Strikes</td>
-                <td>$current.lightningStrikes</td>
+                <td>$current.lightning_strike_count</td>
               </tr>
-	      <tr>
+	            <tr>
                 <td>Average Strike Distance</td>
-                <td>$current.lightningAvgDistance</td>
+                <td>$current.lightning_avg_distance</td>
               </tr>
               #end if
-	      -->
             </table>
           </div>
           <div class="card" >
-            <h1><i class="fas fa-moon m-grau" ></i> Since Midnight</h1>
+            <h1><i class="far fa-moon m-grau" ></i> Since Midnight</h1>
             <table class="tablespacer">
               <tr>
                 <td>High Temperature</td>
@@ -325,7 +330,7 @@
                 <td>$day.wind.vecdir</td>
                 <td></td>
               </tr>
-	      #if $day.inTemp.has_data
+              #if $day.inTemp.has_data
               <tr>
                 <td>High Inside Temperature</td>
                 <td>$day.inTemp.max</td>
@@ -336,8 +341,8 @@
                 <td>$day.inTemp.min</td>
                 <td>$day.inTemp.mintime</td>
               </tr>
-	      #end if
-	      #if $day.inHumidity.has_data
+              #end if
+              #if $day.inHumidity.has_data
               <tr>
                 <td>High Inside Humidity</td>
                 <td>$day.inHumidity.max</td>
@@ -348,7 +353,7 @@
                 <td>$day.inHumidity.min</td>
                 <td>$day.inHumidity.mintime</td>
               </tr>
-	      #end if
+              #end if
               #if $day.extraTemp1.has_data
               <tr>
                 <td>High Pond Temp</td>
@@ -387,27 +392,25 @@
                 <td>$day.radiation.maxtime</td>
               </tr>
               #end if
-	      #if $day.lux.has_data
+              #if $day.illuminance.has_data
               <tr>
                 <td>High Brightness</td>
-                <td>$day.lux.max</td>
-                <td>$day.lux.maxtime</td>
+                <td>$day.illuminance.max</td>
+                <td>$day.illuminance.maxtime</td>
               </tr>
               #end if
-	      <!--
-	      #if $day.lightningStrikes.has_data
+              #if $day.lightning_strike_count.has_data
               <tr>
                 <td>Lightning Strikes</td>
-                <td>$day.lightningStrikes.sum</td>
+                <td>$day.lightning_strike_count.sum</td>
                 <td></td>
               </tr>
-	       <tr>
+              <tr>
                 <td>Average Strike Distance</td>
-                <td>$day.lightningAvgDistance.avg</td>
-		<td></td>
+                <td>$day.lightning_avg_distance.avg</td>
+                <td></td>
               </tr>
               #end if
-	      -->
             </table>
           </div>
           
@@ -419,20 +422,20 @@
                   #if $day.dateTime.format("%d-%b") == '29-Feb'
                     #set $n = 1461
                   #else if $day.dateTime.format("%d-%b") >= '01-Mar'
-                    #set $n = 366
+                    #set $n = 367
                   #else
-                    #set $n = 365
+                    #set $n = 366
                   #end if
                 #else
-                  #set $n = 365
+                  #set $n = 366
                 #end if
               #else
                 #if $day.dateTime.format("%d-%b") == '29-Feb'
                   #set $n = 1461
                 #else if $day.dateTime.format("%d-%b") >= '01-Mar'
-                  #set $n = 366
+                  #set $n = 367
                 #else
-                  #set $n = 365
+                  #set $n = 366
                 #end if
               #end if
             #else
@@ -440,13 +443,13 @@
             #if $yrNew % 100 == 0
               #if $yrNew % 400 == 0
                 #if $day.dateTime.format("%d-%b") < '01-Mar'
-                  #set $n = 366
+                  #set $n = 367
                 #else
-                  #set $n = 365
+                  #set $n = 366
                 #end if
               #end if
               #else
-                #set $n = 365
+                #set $n = 366
               #end if
             #end if
 	  #if $days_ago($days_ago=$n).outTemp.max.string != "   N/A"
@@ -508,7 +511,7 @@
                 <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
+              #if $days_ago($days_ago=$n).inTemp.has_data
               <tr>
                 <td>High Inside Temperature</td>
                 <td>$days_ago($days_ago=$n).inTemp.max</td>
@@ -519,8 +522,8 @@
                 <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
+              #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>
@@ -531,7 +534,7 @@
                 <td>$days_ago($days_ago=$n).inHumidity.min</td>
                 <td>$days_ago($days_ago=$n).inHumidity.mintime</td>
               </tr>
-	      #end if
+              #end if
               #if $days_ago($days_ago=$n).extraTemp1.has_data
               <tr>
                 <td>High Pond Temp</td>
@@ -570,16 +573,23 @@
                 <td>$days_ago($days_ago=$n).radiation.maxtime</td>
               </tr>
               #end if
-	      #if $days_ago($days_ago=$n).lux.has_data
+              #if $days_ago($days_ago=$n).illuminance.has_data
               <tr>
                 <td>High Brightness</td>
-                <td>$days_ago($days_ago=$n).lux.max</td>
-                <td>$days_ago($days_ago=$n).lux.maxtime</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
+          #end if
           #if $Extras.has_key('radar')
           <div class="card" >
 	    <h1><i class="fab fa-react m-rot"></i> Radar</h1>
@@ -609,6 +619,7 @@
               #for $i in $Extras.camera
               <div class="mySlides"><b>$Extras.cameratitle[$b]</b><br>
                 <img src="$i" alt="camera $b" style="width:100%">
+		<meta name="description" content="A webcam located at $Extras.cameratitle[$b]">
               </div>
               #set $b=$b+1 
               #end for
@@ -808,9 +819,9 @@
             <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
+            #if $day.inTemp.has_data
             <img src="dayinside.png" alt="Inside" />
-	    #end if
+            #end if
             <img src="dayinhumid.png" alt="Inside/Outside Humidity" />
             #if $day.radiation.has_data
             <img src="dayradiation.png" alt="Radiation" />
@@ -821,12 +832,10 @@
             #if $day.rxCheckPercent.has_data
             <img src="dayrx.png" alt="day rx percent"/>
             #end if
-	    <!--
-	    #if $day.lightningStrikes.has_data
+            #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
+            #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
@@ -854,15 +863,13 @@
       </div>
     </footer>
     #if $Extras.has_key('googleAnalyticsId')
-    <!-- Google Analytics -->
+    <!-- Global site tag (gtag.js) - Google Analytics -->
+    <script async src="https://www.googletagmanager.com/gtag/js?id=$Extras.googleAnalyticsId"></script>
     <script>
-      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-      
-      ga('create', '$Extras.googleAnalyticsId', 'auto');
-      ga('send', 'pageview');
+      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 -->

+ 39 - 41
month.html.tmpl

@@ -30,11 +30,12 @@
     <!-- Styles -->
     <link href='http://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/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
-     
+    
     <!-- Script -->
     <script src="js/modernizr-2.6.2.min.js"></script>
     <script src="js/checkdiff.js"></script>
@@ -83,6 +84,9 @@
             <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="fas fa-rss" ></i></a></li>
+            #if $Extras.has_key('twitter_url')
+            <li><a href=$Extras.twitter_url><i class="fab fa-twitter" ></i></a></li>
+            #end if
           </ul>
         </nav>
       </div>
@@ -189,7 +193,7 @@
                 <td>$month.inTemp.min</td>
                 <td>$month.inTemp.mintime</td>
               </tr>
-	      #end if
+              #end if
               #if $month.extraTemp1.has_data
               <tr>
                 <td>High Pond Temp</td>
@@ -228,30 +232,28 @@
                 <td>$month.radiation.maxtime</td>
               </tr>
               #end if
-	      #if $month.lux.has_data
+              #if $month.illuminance.has_data
               <tr>
                 <td>High Brightness</td>
-                <td>$month.lux.max</td>
-		<td>$month.lux.maxtime</td>
+                <td>$month.illuminance.max</td>
+                <td>$month.illuminance.maxtime</td>
               </tr>
               #end if
-	      <!-- Lightning data not needed for most stations
-	      #if $month.lightningStrikes.has_data
-	      <tr>
+              #if $month.lightning_strike_count.has_data
+              <tr>
                 <td>Max Lightning Day</td>
-                <td>$month.lightningStrikes.max</td>
-		<td>$month.lightningStrikes.maxtime</td>
+                <td>$month.lightning_strike_count.max</td>
+                <td>$month.lightning_strike_count.maxtime</td>
               </tr>
               <tr>
                 <td>Lightning Total</td>
-                <td>$month.lightningStrikes.sum</td>
-		<td></td>
+                <td>$month.lightning_strike_count.sum</td>
+                <td></td>
               </tr>
               #end if
-	      -->
             </table>
           </div>
-	 #if $month($months_ago=12).outTemp.max.string != "   N/A"
+          #if $month($months_ago=12).outTemp.max.string != "   N/A"
           <div class="card" >
             <h1><i class="far fa-calendar-alt m-orange" ></i> Last $month($months_ago=12).dateTime.format("%B %Y")</h1>
             <table class="tablespacer">
@@ -340,7 +342,7 @@
                 <td>$month($months_ago=12).wind.vecdir</td>
                 <td></td>
               </tr>
-	      #if $month($months_ago=12).inTemp.has_data
+              #if $month($months_ago=12).inTemp.has_data
               <tr>
                 <td>High Inside Temperature</td>
                 <td>$month($months_ago=12).inTemp.max</td>
@@ -351,7 +353,7 @@
                 <td>$month($months_ago=12).inTemp.min</td>
                 <td>$month($months_ago=12).inTemp.mintime</td>
               </tr>
-	      #end if
+              #end if
               #if $month($months_ago=12).extraTemp1.has_data
               <tr>
                 <td>High Pond Temp</td>
@@ -385,30 +387,28 @@
                 <td>$month($months_ago=12).radiation.maxtime</td>
               </tr>
               #end if
-	      #if $month($months_ago=12).lux.has_data
+              #if $month($months_ago=12).illuminance.has_data
               <tr>
                 <td>High Brightness</td>
-                <td>$month($months_ago=12).lux.max</td>
-		<td>$month($months_ago=12).lux.maxtime</td>
+                <td>$month($months_ago=12).illuminance.max</td>
+                <td>$month($months_ago=12).illuminance.maxtime</td>
               </tr>
               #end if
-	      <!-- Most stations don't use lightning data
-	      #if $month($months_ago=12).lightningStrikes.has_data
-	      <tr>
+              #if $month($months_ago=12).lightning_strike_count.has_data
+              <tr>
                 <td>Max Lightning Day</td>
-                <td>$month($months_ago=12).lightningStrikes.max</td>
-		<td>$month($months_ago=12).lightningStrikes.maxtime</td>
+                <td>$month($months_ago=12).lightning_strike_count.max</td>
+                <td>$month($months_ago=12).lightning_strike_count.maxtime</td>
               </tr>
               <tr>
                 <td>Lightning Total</td>
-                <td>$month($months_ago=12).lightningStrikes.sum</td>
-		<td></td>
+                <td>$month($months_ago=12).lightning_strike_count.sum</td>
+                <td></td>
               </tr>
               #end if
-	      -->
             </table>
           </div>
-	  #end if
+        #end if
         </div>
         <div class="right" >
           <div class="card cc graphs" >
@@ -419,9 +419,9 @@
             <img src="monthwinddir.png" alt="Hi Wind" />
             <img src="monthwindvec.png" alt="Wind Vector" />
             <img src="monthbarometer.png" alt="barometer"/>
-	    #if $month.inTemp.has_data
+            #if $month.inTemp.has_data
             <img src="monthinside.png" alt="Inside" />
-	    #end if
+            #end if
             <img src="monthinhumid.png" alt="Inside/Outside Humidity" />
             #if $month.UV.has_data
             <img src="monthuv.png" alt="UV Index" />
@@ -429,10 +429,10 @@
             #if $month.radiation.has_data
             <img src="monthradiation.png" alt="Radiation" />
             #end if
-	    #if $month.lightningStrikes.has_data
+	          #if $month.lightning_strike_count.has_data
             <img src="monthlightning.png" alt="Lightning" />
             #end if
-	    #if $month.windBatteryStatus.has_data and $month.outTempBatteryStatus.has_data
+	          #if $month.windBatteryStatus.has_data and $month.outTempBatteryStatus.has_data
             <img src="monthbattery.png" alt="battery"/>
             #end if
             #if $month.rxCheckPercent.has_data
@@ -463,15 +463,13 @@
       </div>
     </footer>
     #if $Extras.has_key('googleAnalyticsId')
-    <!-- Google Analytics -->
+    <!-- Global site tag (gtag.js) - Google Analytics -->
+    <script async src="https://www.googletagmanager.com/gtag/js?id=$Extras.googleAnalyticsId"></script>
     <script>
-      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-      
-      ga('create', '$Extras.googleAnalyticsId', 'auto');
-      ga('send', 'pageview');
+      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 -->

+ 20 - 23
summary.html.tmpl

@@ -36,9 +36,9 @@
 	
 	<!-- Font Awesome Icon links -->
    
-        <!-- Free license -->
-        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
-    
+	<!-- Free license -->
+	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
+
         <!-- Script -->
         <script src="js/modernizr-2.6.2.min.js"></script>
 	<script src="js/checkdiff.js"></script>
@@ -79,6 +79,9 @@
 			<li class="active" ><a href="summary.html" >Summaries</a></li>
 			<li><a href="about.html" >About</a></li>
                         <li><a href="RSS/weewx_rss.xml" ><i class="fas fa-rss" ></i></a></li>
+	    		#if $Extras.has_key('twitter_url')
+	    		<li><a href=$Extras.twitter_url><i class="fab fa-twitter" ></i></a></li>
+	    		#end if
                     </ul>
                 </nav>
             </div>
@@ -116,16 +119,14 @@
 			<tr><td colspan="3"><br><b>Solar Radiation</b></td></tr>
 			<tr><td>Highest</td><td>$alltime.radiation.max</td><td>$alltime.radiation.maxtime</td></tr>
 			#end if
-			#if $alltime.lux.has_data
+			#if $alltime.illuminance.has_data
 			<tr><td colspan="3"><br><b>Brightness</b></td></tr>
-			<tr><td>Highest</td><td>$alltime.lux.max</td><td>$alltime.lux.maxtime</td></tr>
+			<tr><td>Highest</td><td>$alltime.illuminance.max</td><td>$alltime.illuminance.maxtime</td></tr>
 			#end if
-			<!--
-			#if $alltime.lightningStrikes.has_data
+			#if $alltime.lightning_strike_count.has_data
 			<tr><td colspan="3"><br><b>Lightning</b></td></tr>
-			<tr><td>Highest</td><td>$alltime.lightningStrikes.max</td><td>$alltime.lightningStrikes.maxtime</td></tr>
+			<tr><td>Highest</td><td>$alltime.lightning_strike_count.max</td><td>$alltime.lightning_strike_count.maxtime</td></tr>
 			#end if
-			-->
 			#if $alltime.inTemp.has_data
 			<tr><td colspan="3"><br><b>House Temperatures</b></td></tr>
 			<tr><td>Highest</td><td>$alltime.inTemp.max</td><td>$alltime.inTemp.maxtime</td></tr>
@@ -178,9 +179,8 @@
 			</div>
                 </div>
 		#end if
-		
-		<!--
-		#if $month.lightningStrikes.has_data
+
+		#if $month.lightning_strike_counts.has_data
 		<div class="card">
                     <h1><i class="fas fa-bolt m-orange" ></i> Total Lightning Strikes </h1>
 			<div class="tablefix">
@@ -188,7 +188,6 @@
 			</div>
                 </div>
 		#end if
-		-->
 
 		<div class="card">
                     <h1><i class="fas fa-table m-grau" ></i> Number of Days with Observations</h1>
@@ -220,16 +219,14 @@
         </footer>
 
         #if $Extras.has_key('googleAnalyticsId')
-        <!-- Google Analytics -->
-        <script>
-            (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-            })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-            
-            ga('create', '$Extras.googleAnalyticsId', 'auto');
-            ga('send', 'pageview');
-        </script>
+        <!-- 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 -->

+ 17 - 15
text.php.tmpl

@@ -66,11 +66,12 @@ if (\$count == 4){
         <!-- Styles -->
         <link href='http://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/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
- 
+
+	<!-- Font Awesome Icon links -->
+   
+	<!-- Free license -->
+	<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
+
         <!-- Script -->
         <script src="js/modernizr-2.6.2.min.js"></script>
 	<script src="js/checkdiff.js"></script>
@@ -113,6 +114,9 @@ if (\$count == 4){
 			<li class="active" ><a href="summary.html" >Summaries</a></li>
 			<li><a href="about.html" >About</a></li>
                         <li><a href="RSS/weewx_rss.xml" ><i class="fas fa-rss" ></i></a></li>
+	    		#if $Extras.has_key('twitter_url')
+	    		<li><a href=$Extras.twitter_url><i class="fab fa-twitter" ></i></a></li>
+	    		#end if
                     </ul>
                 </nav>
             </div>
@@ -153,16 +157,14 @@ if (\$count == 4){
         </footer>
 
         #if $Extras.has_key('googleAnalyticsId')
-        <!-- Google Analytics -->
-        <script>
-            (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-            })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-            
-            ga('create', '$Extras.googleAnalyticsId', 'auto');
-            ga('send', 'pageview');
-        </script>
+	<!-- 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 -->

+ 33 - 32
year.html.tmpl

@@ -35,7 +35,7 @@
    
     <!-- Free license -->
     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
-    
+   
     <!-- Script -->
     <script src="js/modernizr-2.6.2.min.js"></script>
     <script src="js/checkdiff.js"></script>
@@ -83,6 +83,10 @@
             <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="fas fa-rss" ></i></a></li>
+            #if $Extras.has_key('twitter_url')
+            <li><a href=$Extras.twitter_url><i class="fab fa-twitter" ></i></a></li>
+            #end if
+            
           </ul>
         </nav>
       </div>
@@ -168,7 +172,7 @@
                 <td>$year.wind.vecdir</td>
                 <td></td>
               </tr>
-	      #if $year.inTemp.has_data
+              #if $year.inTemp.has_data
               <tr>
                 <td>High Inside Temperature</td>
                 <td>$year.inTemp.max</td>
@@ -179,7 +183,7 @@
                 <td>$year.inTemp.min</td>
                 <td>$year.inTemp.mintime</td>
               </tr>
-	      #end if
+              #end if
               #if $year.extraTemp1.has_data
               <tr>
                 <td>High Pond Temp</td>
@@ -199,7 +203,7 @@
                 <td>$year.UV.maxtime</td>
               </tr>
               #end if
-              #if $year.ET.has_data and $year.ET.sum.raw >1
+              #if $year.ET.has_data and $year.ET.sum.raw == 0.00
               <tr>
                 <td>High ET</td>
                 <td>$year.ET.max</td>
@@ -218,11 +222,11 @@
                 <td>$year.radiation.maxtime</td>
               </tr>
               #end if
-	      #if $year.lux.has_data
+              #if $year.illuminance.has_data
               <tr>
                 <td>High Brightness</td>
-                <td>$year.lux.max</td>
-                <td>$year.lux.maxtime</td>
+                <td>$year.illuminance.max</td>
+                <td>$year.illuminance.maxtime</td>
               </tr>
               #end if
             </table>
@@ -254,25 +258,23 @@
 	      #end if
             </table>
           </div>
-	  <!-- Only needed if your stations has lightning detection
-	  #if $year.lightningStrikes.has_data
-	  <div class="card" >
+      #if $year.lightning_strike_count.has_data
+          <div class="card" >
             <h1><i class="fas fa-bolt m-orange" ></i> Total Lightning Strikes</h1>
             <table class="tablespacer">
               <tr>
                 <td>Lightning Strikes for $year.dateTime.format("%Y")</td>
-                <td>$year.lightningStrikes.sum</td>
+                <td>$year.lightning_strike_count.sum</td>
               </tr>
-	      #if $year($years_ago=1).lightningStrikes.sum.string != "   N/A"
+	      #if $year($years_ago=1).lightning_strike_count.sum.string != "   N/A"
               <tr>
                 <td>Lightning Strikes for $year($years_ago=1).dateTime.format("%Y")</td>
-                <td>$year($years_ago=1).lightningStrikes.sum</td>
+                <td>$year($years_ago=1).lightning_strike_count.sum</td>
               </tr>
 	      #end if
             </table>
           </div>
-	  #end if
-	  -->
+      #end if
 	  #if $year($years_ago=1).outTemp.max.string != "   N/A"
           <div class="card" >
             <h1><i class="far fa-calendar-alt m-rot" ></i> Last Calendar Year ($year($years_ago=1).dateTime.format("%Y"))</h1>
@@ -383,7 +385,7 @@
                 <td>$year($years_ago=1).UV.maxtime</td>
               </tr>
               #end if
-              #if $year($years_ago=1).ET.has_data and $year($years_ago=1).ET.sum.raw >0.0
+              #if $year($years_ago=1).ET.has_data and $year($years_ago=1).ET.sum.raw == 0.00
               <tr>
                 <td>High ET</td>
                 <td>$year($years_ago=1).ET.max</td>
@@ -402,11 +404,11 @@
                 <td>$year($years_ago=1).radiation.maxtime</td>
               </tr>
               #end if
-	      #if $year($years_ago=1).lux.has_data
+              #if $year($years_ago=1).illuminance.has_data
               <tr>
                 <td>High Brightness</td>
-                <td>$year($years_ago=1).lux.max</td>
-                <td>$year($years_ago=1).lux.maxtime</td>
+                <td>$year($years_ago=1).illuminance.max</td>
+                <td>$year($years_ago=1).illuminance.maxtime</td>
               </tr>
               #end if
             </table>
@@ -423,9 +425,9 @@
             <img src="yearwinddir.png" alt="Hi Wind" /> 
             <img src="yearwindvec.png" alt="Wind Vector" />
             <img src="yearbarometer.png" alt="barometer"/>
-	    #if $year.inTemp.has_data
+            #if $year.inTemp.has_data
             <img src="yearinside.png" alt="Inside" />
-	    #end if
+	          #end if
             <img src="yearinhumid.png" alt="Inside/Outside Humidity" />
             #if $year.UV.has_data
             <img src="yearuv.png" alt="UV Index" />
@@ -433,11 +435,12 @@
             #if $year.radiation.has_data
             <img src="yearradiation.png" alt="Radiation" />
             #end if
-	    <!-- 
-            #if $year.lightningStrikes.has_data
+            #if $year.lightning_strike_count.has_data
             <img src="yearlightning.png" alt="lightning" />
             #end if
-	    -->
+            #if $year.windBatteryStatus.has_data and $year.outTempBatteryStatus.has_data
+            <img src="yearbattery.png" alt="battery"/>
+            #end if
             #if $year.rxCheckPercent.has_data
             <img src="yearrx.png" alt="year rx percent"/>
             #end if
@@ -466,15 +469,13 @@
       </div>
     </footer>
     #if $Extras.has_key('googleAnalyticsId')
-    <!-- Google Analytics -->
+    <!-- Global site tag (gtag.js) - Google Analytics -->
+    <script async src="https://www.googletagmanager.com/gtag/js?id=$Extras.googleAnalyticsId"></script>
     <script>
-      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-      
-      ga('create', '$Extras.googleAnalyticsId', 'auto');
-      ga('send', 'pageview');
+      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 -->