wahs-the-weather/index.php

200 lines
6.2 KiB
PHP
Raw Normal View History

2024-12-11 21:20:28 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="weather data">
<meta name="keywords" content="Cumulus, weather, data, weather station">
<title>Cumulus MX</title>
<link rel="icon" type="image/png" href="images/favicon.png">
<script src="lib/jquery/jquery-latest.min.js"></script>
<!-- All Styles -->
<link href="css/wah.css" rel="stylesheet"> <!-- Specific styles for these templates. -->
<!-- Scripts -->
<script src="js/setpagedata.js"></script> <!-- Utility javascripts for all pages. -->
<script>
window.onload = () => {
$('#moonImg').attr('src', 'images/moon.png?' + Date.now());
// update the moon image every 20 minutes if the page is left open
setInterval(() => {
$('#moonImg').attr('src', 'images/moon.png?' + Date.now());
}, 1200000);
};
</script>
</head>
<body>
<div class="page-container">
<div id="header">
<h1>wah's the weather?</h1>
<nav>
<strong>Pages:</strong>
<a href="/">now</a> |
<a href="">today</a> |
<a href="">yesterday</a> |
<a href="">today-yest</a> |
<a href="">gauges</a> |
<a href="">records</a> |
<a href="">charts</a> |
<a href="">reports</a>
</nav>
</div>
<div id="content">
<h3>Almanac</h3>
<table class="almanac">
<tbody>
<tr>
<td>Dawn:</td>
<td><span data-cmxdata="dawn"></span></td>
<td>Sun Rise:</td>
<td><span data-cmxdata="sunrise"></span></td>
<td>Moon Rise:</td>
<td><span data-cmxdata="moonrise"></span></td>
<td rowspan="3" style="width:75px; height: 75px; padding:0"><img id="moonImg"
src="images/moon.png" alt="Moon" width="75" height="75" class="w3-image" />Visible <span
data-cmxdata="MoonPercentAbs"></span>%
</td>
</tr>
<tr>
<td>Dusk:</td>
<td><span data-cmxdata="dusk"></span></td>
<td>Sun Set:</td>
<td><span data-cmxdata="sungaugeset"></span></td>
<td>Moon Set:</td>
<td><span data-cmxdata="moonset"></span></td>
</tr>
<tr>
<td>Daylight:</td>
<td><span data-cmxdata="daylightlength"></span></td>
<td>Day Length:</td>
<td><span data-cmxdata="daylength"></span></td>
<td>Moon Phase:</td>
<td><span id="moonPhase" data-cmxdata="moonphase"></span></td>
</tr>
</tbody>
</table>
<br><br>
<h3>Conditions at local time <span data-cmxdata="time"></span></h3>
<table class="conditions-now">
<tr>
<th colspan="4">Temperature and Humidity</th>
</tr>
<tr>
<td>Temperature</td>
<td><span data-cmxdata="temp"></span>&nbsp;<span data-cmxdata="tempunit"></span>
</td>
<td>Dew Point</td>
<td><span data-cmxdata="dew"></span>&nbsp;<span data-cmxdata="tempunit"></span>
</td>
</tr>
<tr>
<td>Windchill</td>
<td><span data-cmxdata="wchill"></span>&nbsp;<span data-cmxdata="tempunit"></span>
</td>
<td>Humidity</td>
<td><span data-cmxdata="hum"></span>&nbsp;%</td>
</tr>
<tr>
<td>Heat Index</td>
<td><span data-cmxdata="heatindex"></span>&nbsp;<span data-cmxdata="tempunit"></span></td>
<td><span data-cmx-feels>Feels
Like</span></td>
<td><span data-cmx-feels data-cmxdata="feelslike"></span>&nbsp;<span data-cmxdata="tempunit"></span>
</td>
</tr>
<tr>
<td>Temp change last hour</td>
<td><span data-cmxdata="TempChangeLastHour"></span>&nbsp;<span data-cmxdata="tempunit"></span></td>
<td></td>
<td></td>
</tr>
<tr>
<th colspan="4">Rainfall</th>
</tr>
<tr>
<td>Rainfall Today</td>
<td><span data-cmxdata="rfall"></span>&nbsp;<span data-cmxdata="rainunit"></span>
</td>
<td>Rainfall Rate</td>
<td><span data-cmxdata="rrate"></span>&nbsp;<span data-cmxdata="rainunit"></span>/hr
</td>
</tr>
<tr>
<td>Rainfall This Month</td>
<td><span data-cmxdata="rmonth"></span>&nbsp;<span data-cmxdata="rainunit"></span>
</td>
<td>Rainfall This Year</td>
<td><span data-cmxdata="ryear"></span>&nbsp;<span data-cmxdata="rainunit"></span>
</td>
</tr>
<tr>
<td>Rainfall Last Hour</td>
<td><span data-cmxdata="rhour"></span>&nbsp;<span data-cmxdata="rainunit"></span>
</td>
<td>Last rainfall</td>
<td><span data-cmxdata="LastRainTip"></span></td>
</tr>
<tr>
<td>Rainfall Since Midnight</td>
<td><span data-cmxdata="rmidnight"></span>&nbsp;<span data-cmxdata="rainunit"></span></td>
<td>Rainfall Last 24 Hours</td>
<td><span data-cmxdata="r24hour"></span>&nbsp;<span data-cmxdata="rainunit"></span>
</td>
</tr>
<tr>
<th colspan="4">Wind</th>
</tr>
<tr>
<td>Wind Speed <span class="subText">(gust)</span></td>
<td><span data-cmxdata="wgust"></span>&nbsp;<span data-cmxdata="windunit"></span>
</td>
<td>Wind Speed <span class="subText">(avg)</span></td>
<td><span data-cmxdata="wspeed"></span>&nbsp;<span data-cmxdata="windunit"></span>
</td>
</tr>
<tr>
<td>Wind Bearing</td>
<td><span data-cmxdata="avgbearing"></span>&deg; <span data-cmxdata="wdir"></span>
</td>
<td>Beaufort <span data-cmxdata="beaufort"></span></td>
<td><span data-cmxdata="beaudesc"></span></td>
</tr>
<tr>
<td>Wind Variation <span class="subText">(last 10 minutes)</span></td>
<td colspan="3">From <span data-cmxdata="BearingRangeFrom"></span>&deg; to <span
data-cmxdata="BearingRangeTo"></span>&deg;</td>
</tr>
<tr>
<th colspan="4">Pressure <span class="subText">(sea
level)</span></th>
</tr>
<tr>
<td>Barometer</td>
<td><span data-cmxdata="press"></span>&nbsp;<span data-cmxdata="pressunit"></span>
</td>
<td><span data-cmxdata="presstrend"></span></td>
<td><span data-cmxdata="presstrendval"></span>&nbsp;<span data-cmxdata="pressunit"></span>/hr</td>
</tr>
</table>
</div>
<div id="footer">
<div>
<span>
&copy; floppydisk 2021-2024
</span>
</div>
<div>
<span>
Powered by Cumulus MX v:<span data-cmxdata="version"></span>, b:<span data-cmxdata="build"></span>
</span>
</div>
</div>
</div>
</body>
</html>