index.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>Weather Station</title>
  7. <style>
  8. div.graph-container {
  9. text-align: center;
  10. }
  11. h2, #last-update {
  12. text-align: center;
  13. font-family: sans, 'sans-serif';
  14. }
  15. #time-series-graphs canvas {
  16. max-width: 800px;
  17. max-height: 300px;
  18. display: inline-block !important;
  19. }
  20. div.graph-container h2 {
  21. display: inline-block;
  22. margin-right: 0.5em;
  23. }
  24. #gauges {
  25. display: flex;
  26. flex-flow: row wrap;
  27. justify-content: center;
  28. width: 100%;
  29. }
  30. #gauges > div {
  31. flex-grow: 1;
  32. flex-shrink: 1;
  33. flex-basis: 2cm;
  34. max-width: 5cm;
  35. }
  36. /* The unfilled part of a dial */
  37. #gauges .gauge > .dial {
  38. stroke-width: 3px;
  39. }
  40. /* The filled part of a dial */
  41. #gauges .gauge > .value {
  42. stroke-width: 7px;
  43. }
  44. @media only screen and (max-width: 500px) {
  45. #gauges > div.temperature {
  46. min-width: 80%;
  47. flex-grow: 2;
  48. flex-shrink: 0;
  49. }
  50. #gauges > div:not(.temperature) {
  51. min-width: 30%;
  52. }
  53. }
  54. </style>
  55. </head>
  56. <body>
  57. <div id="gauges"></div>
  58. <div id="last-update">
  59. <strong>Latest reading:</strong>
  60. <span id="last-update-value"></span>
  61. </div>
  62. <div id="time-series-graphs"></div>
  63. <div id="hour-selector">
  64. <label>
  65. Hours to show:
  66. <select id="hours-ago"></select>
  67. </label>
  68. <!-- <button id="log-entries">Log raw entries</button>-->
  69. </div>
  70. <!--suppress HtmlUnknownTarget -->
  71. <script src="js/main.js" async></script>
  72. </body>
  73. </html>